9
9
Install the config along with its peer dependencies:
10
10
11
11
``` sh
12
+ # npm v7:
13
+ npm install --save-dev eslint-config-torchbox@latest
14
+ # npm v6 and below:
12
15
npx install-peerdeps --dev eslint-config-torchbox@latest
13
16
```
14
17
@@ -184,8 +187,8 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
184
187
185
188
- [ react-hooks/rules-of-hooks] ( https://github.com/jfmengels/eslint-rule-documentation/blob/master/contributing.md )
186
189
- [ react-hooks/exhaustive-deps] ( https://github.com/jfmengels/eslint-rule-documentation/blob/master/contributing.md )
187
- - [ jsx-a11y/anchor-has-content] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md ) : ` error, components: `
188
- - [ jsx-a11y/aria-role] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md ) : ` error, ignoreNonDom: false, ignoreNonDOM: false `
190
+ - [ jsx-a11y/anchor-has-content] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md ) : ` error, components: `
191
+ - [ jsx-a11y/aria-role] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md ) : ` error, ignoreNonDOM: false `
189
192
- [ jsx-a11y/aria-props] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md )
190
193
- [ jsx-a11y/aria-proptypes] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md )
191
194
- [ jsx-a11y/aria-unsupported-elements] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md )
@@ -199,29 +202,28 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
199
202
- [ jsx-a11y/role-has-required-aria-props] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md )
200
203
- [ jsx-a11y/role-supports-aria-props] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md )
201
204
- [ jsx-a11y/tabindex-no-positive] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md )
202
- - [ jsx-a11y/heading-has-content] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md ) : ` error, components: `
205
+ - [ jsx-a11y/heading-has-content] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md ) : ` error, components: `
203
206
- [ jsx-a11y/html-has-lang] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md )
204
207
- [ jsx-a11y/lang] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md )
205
208
- [ jsx-a11y/no-distracting-elements] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md ) : ` error, elements: marquee, blink `
206
209
- [ jsx-a11y/scope] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md )
207
210
- [ jsx-a11y/click-events-have-key-events] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md )
208
211
- [ jsx-a11y/no-static-element-interactions] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md ) : ` error, handlers: onClick, onMouseDown, onMouseUp, onKeyPress… `
209
212
- [ jsx-a11y/no-noninteractive-element-interactions] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md ) : ` error, handlers: onClick, onMouseDown, onMouseUp, onKeyPress… `
210
- - [ jsx-a11y/accessible-emoji] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md )
211
213
- [ jsx-a11y/aria-activedescendant-has-tabindex] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md )
212
214
- [ jsx-a11y/iframe-has-title] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md )
213
215
- [ jsx-a11y/no-autofocus] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md ) : ` error, ignoreNonDOM: true `
214
216
- [ jsx-a11y/no-redundant-roles] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md )
215
- - [ jsx-a11y/media-has-caption] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md ) : ` error, audio: , video: , track: `
217
+ - [ jsx-a11y/media-has-caption] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md ) : ` error, audio: , video: , track: `
216
218
- [ jsx-a11y/no-interactive-element-to-noninteractive-role] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md ) : ` error, tr: none, presentation `
217
219
- [ jsx-a11y/no-noninteractive-element-to-interactive-role] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md ) : ` error, ul: listbox, menu, menubar, radiogroup, tablist, tree… `
218
220
- [ jsx-a11y/no-noninteractive-tabindex] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md ) : ` error, tags: , roles: tabpanel `
219
221
- [ jsx-a11y/anchor-is-valid] ( https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md ) : ` error, components: Link, specialLink: to, aspects: noHref, i… `
220
222
- [ class-methods-use-this] ( https://eslint.org/docs/rules/class-methods-use-this ) : ` error, exceptMethods: render, getInitialState, getDefaultPro… `
221
- - [ react/jsx-boolean-value] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md ) : ` error, never, always: `
223
+ - [ react/jsx-boolean-value] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md ) : ` error, never, always: `
222
224
- [ react/jsx-no-duplicate-props] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md ) : ` error, ignoreCase: true `
223
225
- [ react/jsx-no-undef] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md )
224
- - [ react/jsx-pascal-case] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md ) : ` error, allowAllCaps: true, ignore: `
226
+ - [ react/jsx-pascal-case] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md ) : ` error, allowAllCaps: true, ignore: `
225
227
- [ react/jsx-uses-react] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md )
226
228
- [ react/jsx-uses-vars] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md )
227
229
- [ react/no-danger] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md ) : ` warn `
@@ -237,7 +239,7 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
237
239
- [ react/react-in-jsx-scope] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md )
238
240
- [ react/require-render-return] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md )
239
241
- [ react/self-closing-comp] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md )
240
- - [ react/sort-comp] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md ) : ` error, order: static-methods, instance-variables, lifecycle, … `
242
+ - [ react/sort-comp] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md ) : ` error, order: static-variables, static-methods, instance-var … `
241
243
- [ react/jsx-no-target-blank] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md ) : ` error, enforceDynamicLinks: always `
242
244
- [ react/jsx-no-comment-textnodes] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md )
243
245
- [ react/no-render-return-value] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md )
@@ -263,7 +265,7 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
263
265
- [ react/jsx-fragments] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md ) : ` error, syntax `
264
266
- [ react/state-in-constructor] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md ) : ` error, always `
265
267
- [ react/static-property-placement] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md ) : ` error, property assignment `
266
- - [ react/jsx-props-no-spreading] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md ) : ` error, html: enforce, custom: enforce, exceptions: `
268
+ - [ react/jsx-props-no-spreading] ( https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md ) : ` error, html: enforce, custom: enforce, explicitSpread: ignor… `
267
269
- [ strict] ( https://eslint.org/docs/rules/strict ) : ` error, never `
268
270
- [ import/no-unresolved] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md ) : ` error, commonjs: true, caseSensitive: true `
269
271
- [ import/named] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md )
@@ -275,15 +277,15 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
275
277
- [ import/first] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md )
276
278
- [ import/no-duplicates] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md )
277
279
- [ import/extensions] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md ) : ` error, ignorePackages, js: never, mjs: never, jsx: never `
278
- - [ import/order] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md ) : ` error, groups: builtin, external, internal `
280
+ - [ import/order] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md ) : ` error, groups: builtin, external, internal, warnOnUnassigned… `
279
281
- [ import/newline-after-import] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md )
280
282
- [ import/no-absolute-path] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md )
281
283
- [ import/no-dynamic-require] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md )
282
284
- [ import/no-webpack-loader-syntax] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md )
283
285
- [ import/no-named-default] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md )
284
286
- [ import/no-self-import] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-self-import.md )
285
- - [ import/no-cycle] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md ) : ` error, maxDepth: null `
286
- - [ import/no-useless-path-segments] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md )
287
+ - [ import/no-cycle] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md ) : ` error, maxDepth: ∞, ignoreExternal: false `
288
+ - [ import/no-useless-path-segments] ( https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md ) : ` error, commonjs: true `
287
289
- [ constructor-super] ( https://eslint.org/docs/rules/constructor-super )
288
290
- [ no-class-assign] ( https://eslint.org/docs/rules/no-class-assign )
289
291
- [ no-const-assign] ( https://eslint.org/docs/rules/no-const-assign )
@@ -305,7 +307,7 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
305
307
- [ symbol-description] ( https://eslint.org/docs/rules/symbol-description )
306
308
- [ no-delete-var] ( https://eslint.org/docs/rules/no-delete-var )
307
309
- [ no-label-var] ( https://eslint.org/docs/rules/no-label-var )
308
- - [ no-restricted-globals] ( https://eslint.org/docs/rules/no-restricted-globals ) : ` error, isFinite, isNaN, addEventListener, blur, close, close … `
310
+ - [ no-restricted-globals] ( https://eslint.org/docs/rules/no-restricted-globals ) : ` error, name: isFinite, message: Use Number.isFinite instead … `
309
311
- [ no-shadow] ( https://eslint.org/docs/rules/no-shadow )
310
312
- [ no-shadow-restricted-names] ( https://eslint.org/docs/rules/no-shadow-restricted-names )
311
313
- [ no-undef] ( https://eslint.org/docs/rules/no-undef )
@@ -329,7 +331,7 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
329
331
- [ one-var] ( https://eslint.org/docs/rules/one-var ) : ` error, never `
330
332
- [ operator-assignment] ( https://eslint.org/docs/rules/operator-assignment ) : ` error, always `
331
333
- [ prefer-object-spread] ( https://eslint.org/docs/rules/prefer-object-spread )
332
- - [ spaced-comment] ( https://eslint.org/docs/rules/spaced-comment ) : ` error, always, line: exceptions: -, +, markers: =, !, block: … `
334
+ - [ spaced-comment] ( https://eslint.org/docs/rules/spaced-comment ) : ` error, always, line: exceptions: -, +, markers: =, !, /, blo … `
333
335
- [ global-require] ( https://eslint.org/docs/rules/global-require )
334
336
- [ no-buffer-constructor] ( https://eslint.org/docs/rules/no-buffer-constructor )
335
337
- [ no-new-require] ( https://eslint.org/docs/rules/no-new-require )
@@ -365,11 +367,11 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
365
367
- [ no-unsafe-negation] ( https://eslint.org/docs/rules/no-unsafe-negation )
366
368
- [ use-isnan] ( https://eslint.org/docs/rules/use-isnan )
367
369
- [ valid-typeof] ( https://eslint.org/docs/rules/valid-typeof ) : ` error, requireStringLiterals: true `
368
- - [ array-callback-return] ( https://eslint.org/docs/rules/array-callback-return ) : ` error, allowImplicit: true `
370
+ - [ array-callback-return] ( https://eslint.org/docs/rules/array-callback-return ) : ` error, allowImplicit: true, checkForEach: false `
369
371
- [ block-scoped-var] ( https://eslint.org/docs/rules/block-scoped-var )
370
372
- [ consistent-return] ( https://eslint.org/docs/rules/consistent-return )
371
373
- [ default-case] ( https://eslint.org/docs/rules/default-case ) : ` error, commentPattern: ^no default$ `
372
- - [ dot-notation] ( https://eslint.org/docs/rules/dot-notation ) : ` error, allowKeywords: true, allowPattern: `
374
+ - [ dot-notation] ( https://eslint.org/docs/rules/dot-notation ) : ` error, allowKeywords: true, allowPattern: `
373
375
- [ eqeqeq] ( https://eslint.org/docs/rules/eqeqeq ) : ` error, always, null: ignore `
374
376
- [ guard-for-in] ( https://eslint.org/docs/rules/guard-for-in )
375
377
- [ max-classes-per-file] ( https://eslint.org/docs/rules/max-classes-per-file ) : ` error, 1 `
@@ -384,7 +386,7 @@ eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.jsx,.ts,.t
384
386
- [ no-extra-bind] ( https://eslint.org/docs/rules/no-extra-bind )
385
387
- [ no-extra-label] ( https://eslint.org/docs/rules/no-extra-label )
386
388
- [ no-fallthrough] ( https://eslint.org/docs/rules/no-fallthrough )
387
- - [ no-global-assign] ( https://eslint.org/docs/rules/no-global-assign ) : ` error, exceptions: `
389
+ - [ no-global-assign] ( https://eslint.org/docs/rules/no-global-assign ) : ` error, exceptions: `
388
390
- [ no-implied-eval] ( https://eslint.org/docs/rules/no-implied-eval )
389
391
- [ no-iterator] ( https://eslint.org/docs/rules/no-iterator )
390
392
- [ no-labels] ( https://eslint.org/docs/rules/no-labels ) : ` error, allowLoop: false, allowSwitch: false `
0 commit comments