@cabify/eslint-config 3.0.1-beta-19 → 3.0.1-beta-25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,278 +0,0 @@
1
- import importPlugin from 'eslint-plugin-import';
2
- import simpleImportSort from 'eslint-plugin-simple-import-sort';
3
- import globals from 'globals';
4
-
5
- const configs = {
6
- name: 'imports-cabify-eslint-config',
7
- languageOptions: {
8
- globals: {
9
- ...globals.es2015,
10
- },
11
- },
12
- plugins: {
13
- 'simple-import-sort': simpleImportSort,
14
- },
15
- settings: {
16
- 'import/resolver': {
17
- node: {
18
- extensions: ['.mjs', '.js', '.json'],
19
- },
20
- },
21
- 'import/extensions': ['.js', '.mjs', '.jsx', '.ts', '.tsx'],
22
- 'import/core-modules': [],
23
- 'import/ignore': [
24
- 'node_modules',
25
- '\\.(coffee|scss|css|less|hbs|svg|json)$',
26
- ],
27
- },
28
-
29
- rules: {
30
- 'simple-import-sort/imports': 'error',
31
- 'simple-import-sort/exports': 'error',
32
-
33
- // Static analysis:
34
-
35
- // ensure imports point to files/modules that can be resolved
36
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
37
- 'import/no-unresolved': ['error', { commonjs: true, caseSensitive: true }],
38
-
39
- // ensure named imports coupled with named exports
40
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
41
- 'import/named': 'error',
42
-
43
- // ensure default import coupled with default export
44
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
45
- 'import/default': 'off',
46
-
47
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md
48
- 'import/namespace': 'off',
49
-
50
- // Helpful warnings:
51
-
52
- // disallow invalid exports, e.g. multiple defaults
53
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md
54
- 'import/export': 'error',
55
-
56
- // do not allow a default import name to match a named export
57
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
58
- 'import/no-named-as-default': 'error',
59
-
60
- // warn on accessing default export property names that are also named exports
61
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
62
- 'import/no-named-as-default-member': 'error',
63
-
64
- // disallow use of jsdoc-marked-deprecated imports
65
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
66
- 'import/no-deprecated': 'off',
67
-
68
- // Forbid the use of extraneous packages
69
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
70
- // paths are treated both as absolute paths, and relative to process.cwd()
71
- 'import/no-extraneous-dependencies': [
72
- 'error',
73
- {
74
- devDependencies: [
75
- '.storybook/**', // react storybooks
76
- 'storybook/**', // react storybooks
77
- '**/*.scenario.*', // storybooks scenarios
78
- '**/*.story.*', // storybooks stories
79
- '**/*.stories.*', // storybooks stories
80
- 'conf/**', // our custom conf
81
- 'test/**', // tape, common npm pattern
82
- 'tests/**', // also common npm pattern
83
- 'spec/**', // mocha, rspec-like pattern
84
- '**/__tests__/**', // jest pattern
85
- '**/__mocks__/**', // jest pattern
86
- 'test.{js,jsx}', // repos with a single test file
87
- 'test-*.{js,jsx}', // repos with multiple top-level test files
88
- '**/*{.,_}{test,spec}.{js,jsx,ts,tsx}', // tests where the extension or filename suffix denotes that it is a test
89
- '**/jest.config.js', // jest config
90
- '**/vue.config.js', // vue-cli config
91
- '**/webpack.config.js', // webpack config
92
- '**/webpack.config.*.js', // webpack config
93
- '**/rollup.config.js', // rollup config
94
- '**/rollup.config.*.js', // rollup config
95
- '**/gulpfile.js', // gulp config
96
- '**/gulpfile.*.js', // gulp config
97
- '**/Gruntfile{,.js}', // grunt config
98
- '**/protractor.conf.js', // protractor config
99
- '**/protractor.conf.*.js', // protractor config
100
- '**/postcss.config.js', // postcss config
101
- ],
102
- optionalDependencies: false,
103
- },
104
- ],
105
-
106
- // Forbid mutable exports
107
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md
108
- 'import/no-mutable-exports': 'error',
109
-
110
- // Module systems:
111
-
112
- // disallow require()
113
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
114
- 'import/no-commonjs': 'off',
115
-
116
- // disallow AMD require/define
117
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md
118
- // 'import/no-amd': 'error',
119
-
120
- // No Node.js builtin modules
121
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md
122
- // TODO: enable?
123
- 'import/no-nodejs-modules': 'off',
124
-
125
- // Style guide:
126
-
127
- // disallow non-import statements appearing before import statements
128
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md
129
- 'import/first': 'error',
130
-
131
- // disallow non-import statements appearing before import statements
132
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md
133
- // deprecated: use `import/first`
134
- 'import/imports-first': 'off',
135
-
136
- // disallow duplicate imports
137
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
138
- 'import/no-duplicates': 'error',
139
-
140
- // disallow namespace imports
141
- // TODO: enable?
142
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md
143
- 'import/no-namespace': 'off',
144
-
145
- // Ensure consistent use of file extension within the import path
146
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
147
- 'import/extensions': [
148
- 'error',
149
- 'ignorePackages',
150
- {
151
- js: 'never',
152
- mjs: 'never',
153
- jsx: 'never',
154
- ts: 'never',
155
- tsx: 'never',
156
- },
157
- ],
158
-
159
- // ensure absolute imports are above relative imports and that unassigned imports are ignored
160
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
161
- // superseeded by import-order-alphabetical
162
- 'import/order': 'off',
163
-
164
- // Require a newline after the last import/require in a group
165
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md
166
- // 'import/newline-after-import': 'error',
167
-
168
- // Require modules with a single export to use a default export
169
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
170
- 'import/prefer-default-export': 'error',
171
-
172
- // Restrict which files can be imported in a given folder
173
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
174
- 'import/no-restricted-paths': 'off',
175
-
176
- // Forbid modules to have too many dependencies
177
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md
178
- 'import/max-dependencies': ['off', { max: 10 }],
179
-
180
- // Forbid import of modules using absolute paths
181
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md
182
- 'import/no-absolute-path': 'error',
183
-
184
- // Forbid require() calls with expressions
185
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
186
- 'import/no-dynamic-require': 'error',
187
-
188
- // prevent importing the submodules of other modules
189
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md
190
- 'import/no-internal-modules': [
191
- 'off',
192
- {
193
- allow: [],
194
- },
195
- ],
196
-
197
- // Warn if a module could be mistakenly parsed as a script by a consumer
198
- // leveraging Unambiguous JavaScript Grammar
199
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md
200
- // this should not be enabled until this proposal has at least been *presented* to TC39.
201
- // At the moment, it's not a thing.
202
- 'import/unambiguous': 'off',
203
-
204
- // Forbid Webpack loader syntax in imports
205
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md
206
- 'import/no-webpack-loader-syntax': 'error',
207
-
208
- // Prevent unassigned imports
209
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md
210
- // importing for side effects is perfectly acceptable, if you need side effects.
211
- 'import/no-unassigned-import': 'off',
212
-
213
- // Prevent importing the default as if it were named
214
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md
215
- 'import/no-named-default': 'error',
216
-
217
- // Reports if a module's default export is unnamed
218
- // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md
219
- 'import/no-anonymous-default-export': [
220
- 'off',
221
- {
222
- allowArray: false,
223
- allowArrowFunction: false,
224
- allowAnonymousClass: false,
225
- allowAnonymousFunction: false,
226
- allowLiteral: false,
227
- allowObject: false,
228
- },
229
- ],
230
-
231
- // This rule enforces that all exports are declared at the bottom of the file.
232
- // https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md
233
- // TODO: enable?
234
- 'import/exports-last': 'off',
235
-
236
- // Reports when named exports are not grouped together in a single export declaration
237
- // or when multiple assignments to CommonJS module.exports or exports object are present
238
- // in a single file.
239
- // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md
240
- 'import/group-exports': 'off',
241
-
242
- // forbid default exports. this is a terrible rule, do not use it.
243
- // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md
244
- 'import/no-default-export': 'off',
245
-
246
- // Prohibit named exports. this is a terrible rule, do not use it.
247
- // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md
248
- 'import/no-named-export': 'off',
249
-
250
- // Forbid a module from importing itself
251
- // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md
252
- 'import/no-self-import': 'error',
253
-
254
- // Forbid cyclical dependencies between modules
255
- // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md
256
- 'import/no-cycle': ['error', { maxDepth: Number.MAX_SAFE_INTEGER }],
257
-
258
- // Ensures that there are no useless path segments
259
- // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md
260
- 'import/no-useless-path-segments': 'error',
261
-
262
- // dynamic imports require a leading comment with a webpackChunkName
263
- // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md
264
- 'import/dynamic-import-chunkname': [
265
- 'off',
266
- {
267
- importFunctions: [],
268
- webpackChunknameFormat: '[0-9a-zA-Z-_/.]+',
269
- },
270
- ],
271
-
272
- // Use this rule to prevent imports to folders in relative parent paths.
273
- // https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md
274
- 'import/no-relative-parent-imports': 'off',
275
- },
276
- };
277
-
278
- export default [importPlugin.flatConfigs.recommended, configs];
package/configs/jest.js DELETED
@@ -1,9 +0,0 @@
1
- import jest from 'eslint-plugin-jest';
2
-
3
- export default {
4
- name: 'jest-cabify-eslint-config',
5
- ...jest.configs['flat/recommended'],
6
- rules: {
7
- ...jest.configs['flat/recommended'].rules,
8
- },
9
- };
package/configs/lodash.js DELETED
@@ -1,9 +0,0 @@
1
- import lodashPlugin from 'eslint-plugin-lodash';
2
-
3
- export default {
4
- name: 'lodash-cabify-eslint-config',
5
- plugins: { lodash: lodashPlugin },
6
- rules: {
7
- 'lodash/import-scope': ['error', 'method'],
8
- },
9
- };
package/configs/node.js DELETED
@@ -1,40 +0,0 @@
1
- export default {
2
- name: 'node-cabify-eslint-config',
3
- rules: {
4
- // enforce return after a callback
5
- 'callback-return': 'off',
6
-
7
- // require all requires be top-level
8
- // https://eslint.org/docs/rules/global-require
9
- 'global-require': 'error',
10
-
11
- // enforces error handling in callbacks (node environment)
12
- 'handle-callback-err': 'off',
13
-
14
- // disallow use of the Buffer() constructor
15
- // https://eslint.org/docs/rules/no-buffer-constructor
16
- 'no-buffer-constructor': 'error',
17
-
18
- // disallow mixing regular variable and require declarations
19
- 'no-mixed-requires': ['off', false],
20
-
21
- // disallow use of new operator with the require function
22
- 'no-new-require': 'error',
23
-
24
- // disallow string concatenation with __dirname and __filename
25
- // https://eslint.org/docs/rules/no-path-concat
26
- 'no-path-concat': 'error',
27
-
28
- // disallow use of process.env
29
- 'no-process-env': 'off',
30
-
31
- // disallow process.exit()
32
- 'no-process-exit': 'off',
33
-
34
- // restrict usage of specified node modules
35
- 'no-restricted-modules': 'off',
36
-
37
- // disallow use of synchronous methods (off by default)
38
- 'no-sync': 'off',
39
- },
40
- };
@@ -1,7 +0,0 @@
1
- export default {
2
- name: 'post-css-cabify-eslint-config',
3
- files: ['postcss.config.js'],
4
- rules: {
5
- 'global-require': 'off',
6
- },
7
- };
@@ -1,18 +0,0 @@
1
- export default {
2
- name: 'promises-cabify-eslint-config',
3
- rules: {
4
- 'no-floating-promises': 'off',
5
-
6
- // disallow using an async function as a Promise executor
7
- // https://eslint.org/docs/rules/no-async-promise-executor
8
- // TODO: enable, semver-major
9
- 'no-async-promise-executor': 'off',
10
-
11
- // disallow redundant `return await`
12
- 'no-return-await': 'error',
13
-
14
- // require `await` in `async function` (note: this is a horrible rule that should never be used)
15
- // https://eslint.org/docs/rules/require-await
16
- 'require-await': 'off',
17
- },
18
- };
@@ -1,230 +0,0 @@
1
- import jsxAllyPlugin from 'eslint-plugin-jsx-a11y';
2
-
3
- export default {
4
- name: 'react-a11y-cabify-eslint-config',
5
- plugins: { 'jsx-a11y': jsxAllyPlugin },
6
- languageOptions: {
7
- parserOptions: {
8
- ecmaFeatures: {
9
- jsx: true,
10
- },
11
- },
12
- },
13
- rules: {
14
- // Enforce that anchors have content
15
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md
16
- 'jsx-a11y/anchor-has-content': ['error', { components: [] }],
17
-
18
- // Require ARIA roles to be valid and non-abstract
19
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md
20
- 'jsx-a11y/aria-role': ['error', { ignoreNonDom: false }],
21
-
22
- // Enforce all aria-* props are valid.
23
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md
24
- 'jsx-a11y/aria-props': 'error',
25
-
26
- // Enforce ARIA state and property values are valid.
27
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md
28
- 'jsx-a11y/aria-proptypes': 'error',
29
-
30
- // Enforce that elements that do not support ARIA roles, states, and
31
- // properties do not have those attributes.
32
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md
33
- 'jsx-a11y/aria-unsupported-elements': 'error',
34
-
35
- // Enforce that all elements that require alternative text have meaningful information
36
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
37
- 'jsx-a11y/alt-text': [
38
- 'error',
39
- {
40
- elements: ['img', 'object', 'area', 'input[type="image"]'],
41
- img: [],
42
- object: [],
43
- area: [],
44
- 'input[type="image"]': [],
45
- },
46
- ],
47
-
48
- // Prevent img alt text from containing redundant words like "image", "picture", or "photo"
49
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md
50
- 'jsx-a11y/img-redundant-alt': 'error',
51
-
52
- // require that JSX labels use "htmlFor"
53
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
54
- // deprecated
55
- 'jsx-a11y/label-has-for': [
56
- 'off',
57
- {
58
- components: [],
59
- required: {
60
- every: ['nesting', 'id'],
61
- },
62
- allowChildren: false,
63
- },
64
- ],
65
-
66
- // Enforce that a label tag has a text label and an associated control.
67
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md
68
- 'jsx-a11y/label-has-associated-control': [
69
- 'error',
70
- {
71
- labelComponents: [],
72
- labelAttributes: [],
73
- controlComponents: [],
74
- assert: 'both',
75
- depth: 25,
76
- },
77
- ],
78
-
79
- // require that mouseover/out come with focus/blur, for keyboard-only users
80
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md
81
- 'jsx-a11y/mouse-events-have-key-events': 'error',
82
-
83
- // Prevent use of `accessKey`
84
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md
85
- 'jsx-a11y/no-access-key': 'error',
86
-
87
- // require onBlur instead of onChange
88
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md
89
- 'jsx-a11y/no-onchange': 'off',
90
-
91
- // Elements with an interactive role and interaction handlers must be focusable
92
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md
93
- 'jsx-a11y/interactive-supports-focus': 'error',
94
-
95
- // Enforce that elements with ARIA roles must have all required attributes
96
- // for that role.
97
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md
98
- 'jsx-a11y/role-has-required-aria-props': 'error',
99
-
100
- // Enforce that elements with explicit or implicit roles defined contain
101
- // only aria-* properties supported by that role.
102
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md
103
- 'jsx-a11y/role-supports-aria-props': 'error',
104
-
105
- // Enforce tabIndex value is not greater than zero.
106
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md
107
- 'jsx-a11y/tabindex-no-positive': 'error',
108
-
109
- // ensure <hX> tags have content and are not aria-hidden
110
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md
111
- 'jsx-a11y/heading-has-content': ['error', { components: [''] }],
112
-
113
- // require HTML elements to have a "lang" prop
114
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md
115
- 'jsx-a11y/html-has-lang': 'error',
116
-
117
- // require HTML element's lang prop to be valid
118
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md
119
- 'jsx-a11y/lang': 'error',
120
-
121
- // prevent distracting elements, like <marquee> and <blink>
122
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md
123
- 'jsx-a11y/no-distracting-elements': [
124
- 'error',
125
- {
126
- elements: ['marquee', 'blink'],
127
- },
128
- ],
129
-
130
- // only allow <th> to have the "scope" attr
131
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md
132
- 'jsx-a11y/scope': 'error',
133
-
134
- // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress
135
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
136
- 'jsx-a11y/click-events-have-key-events': 'off',
137
-
138
- // Enforce that DOM elements without semantic behavior not have interaction handlers
139
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
140
- 'jsx-a11y/no-static-element-interactions': 'off',
141
-
142
- // A non-interactive element does not support event handlers (mouse and key handlers)
143
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md
144
- 'jsx-a11y/no-noninteractive-element-interactions': 'off',
145
-
146
- // ensure emoji are accessible
147
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md
148
- 'jsx-a11y/accessible-emoji': 'error',
149
-
150
- // elements with aria-activedescendant must be tabbable
151
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md
152
- 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
153
-
154
- // ensure iframe elements have a unique title
155
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md
156
- 'jsx-a11y/iframe-has-title': 'error',
157
-
158
- // prohibit autoFocus prop
159
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md
160
- 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }],
161
-
162
- // ensure HTML elements do not specify redundant ARIA roles
163
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
164
- 'jsx-a11y/no-redundant-roles': 'error',
165
-
166
- // media elements must have captions
167
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md
168
- 'jsx-a11y/media-has-caption': [
169
- 'error',
170
- {
171
- audio: [],
172
- video: [],
173
- track: [],
174
- },
175
- ],
176
-
177
- // WAI-ARIA roles should not be used to convert an interactive element to non-interactive
178
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md
179
- 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
180
- 'error',
181
- {
182
- tr: ['none', 'presentation'],
183
- },
184
- ],
185
-
186
- // WAI-ARIA roles should not be used to convert a non-interactive element to interactive
187
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md
188
- 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
189
- 'error',
190
- {
191
- ul: [
192
- 'listbox',
193
- 'menu',
194
- 'menubar',
195
- 'radiogroup',
196
- 'tablist',
197
- 'tree',
198
- 'treegrid',
199
- ],
200
- ol: [
201
- 'listbox',
202
- 'menu',
203
- 'menubar',
204
- 'radiogroup',
205
- 'tablist',
206
- 'tree',
207
- 'treegrid',
208
- ],
209
- li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],
210
- table: ['grid'],
211
- td: ['gridcell'],
212
- },
213
- ],
214
-
215
- // Tab key navigation should be limited to elements on the page that can be interacted with.
216
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md
217
- 'jsx-a11y/no-noninteractive-tabindex': 'off',
218
-
219
- // ensure <a> tags are valid
220
- // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md
221
- 'jsx-a11y/anchor-is-valid': [
222
- 'off',
223
- {
224
- components: ['Link'],
225
- specialLink: ['to'],
226
- aspects: ['noHref', 'invalidHref', 'preferButton'],
227
- },
228
- ],
229
- },
230
- };