-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.js
77 lines (77 loc) · 2.08 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
module.exports = {
// All rules should be disabled or they should produce errors. No warnings.
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 11,
sourceType: 'module',
},
extends: ['plugin:@department-of-veterans-affairs/recommended'],
globals: {
__BUILDTYPE__: true,
__API__: true,
__MEGAMENU_CONFIG__: true,
__REGISTRY__: true,
},
rules: {
/* || Eslint main rules || */
camelcase: [2, { properties: 'always' }], // Override airbnb style.
'deprecate/import': [
'warn',
{
name:
'@department-of-veterans-affairs/component-library/CollapsiblePanel',
use: '<va-accordion>',
},
{
name: '@department-of-veterans-affairs/component-library/AlertBox',
use: '<va-alert>',
},
{
name:
'@department-of-veterans-affairs/component-library/LoadingIndicator',
use: '<va-loading-indicator>',
},
{
name:
'@department-of-veterans-affairs/component-library/AdditionalInfo',
use: '<va-additional-info>',
},
{
name: '@department-of-veterans-affairs/component-library/ProgressBar',
use: '<va-progress-bar>',
},
],
'jsx-a11y/control-has-associated-label': 1, // 2
'jsx-a11y/click-events-have-key-events': 1, // 24
'jsx-a11y/anchor-is-valid': 1, // 51
'jsx-a11y/label-has-associated-control': [
1,
{
controlComponents: ['select'],
},
], // 40
'jsx-a11y/no-static-element-interactions': 1, // 20
},
overrides: [
{
files: [
'**/*.spec.jsx',
'**/*.spec.js',
'src/platform/testing/**/*.js',
'src/platform/testing/**/*.jsx',
],
rules: {
'no-restricted-imports': ['error', 'raven'],
'no-unused-expressions': 0,
'react/no-find-dom-node': 0,
},
},
{
files: ['**/*.cypress.spec.js'],
rules: {
'@department-of-veterans-affairs/axe-check-required': 1,
'@department-of-veterans-affairs/cypress-viewport-deprecated': 1,
},
},
],
};