[email protected] is not marked as eslint@7 compatible. But we don't want to downgrade the Airbnb config, so you won't be able to get rid of these messages:
npm WARN [email protected] requires a peer of eslint-plugin-jsx-a11y@^6.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^3 || ^4 || ^5 || ^6 but none is installed. You must install peer dependencies yourself.
Even though the plugin itself should work fine, there are several possible points of failure. The latest Airbnb config that is compatible with [email protected] is v18.1.0. According to the v18.1.0...v18.2.1 diff:
jsx-a11y/aria-role
options have been changed from{ ignoreNonDom: false }
to{ ignoreNonDOM: false }
. This is probably a typo fix.jsx-a11y/accessible-emoji
rule has been disabled due to deprecation.jsx-a11y/autocomplete-valid
rule has been turned off.
If you use any of these rules, please make sure they work fine with your project.
Other than that, everything should work well.
ESLint peer dep was updated to ^7.32.0. Here are migration guides from ESLint:
Also we've changed the config itself. Below you can find full list of the changed rules.
- Disabled react/no-multi-comp
- Enabled prefer-object-spread
- Enabled no-async-promise-executor
- Enabled no-misleading-character-class
- Enabled max-classes-per-file
- Enabled no-useless-catch
- Enabled
props
option in no-self-assign - Added
forms
option to react/jsx-no-target-blank - Added
caseSensitiveStrict
option to import/no-unresolved - Added
commonjs
option to import/no-useless-path-segments - Used valid
maxDepth
option in import/no-cycle - Restricted empty lines at beginning of file in no-multiple-empty-lines
- Allowed for redux dev tools in the main config in no-underscore-dangle
- jsx-a11y/autocomplete-valid disabled by default
- jsx-a11y/control-has-associated-label enabled by default as an error with the following options:
{ labelAttributes: [ 'label', ], controlComponents: [], ignoreElements: [ 'audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video', ], ignoreRoles: [ 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'row', 'tablist', 'toolbar', 'tree', 'treegrid', ], depth: 5, }
- default-case-last enabled manually as an error
- default-param-last enabled manually as an error
- function-call-argument-newline enabled manually as an error with the option
consistent
- grouped-accessor-pairs enabled manually as an error with the option
getBeforeSet
- id-denylist disabled by default
- no-constructor-return enabled manually as an error
- no-dupe-else-if enabled manually as an error
- no-import-assign enabled manually as an error
- no-loss-of-precision enabled manually as an error
- no-promise-executor-return enabled as an error
- no-restricted-exports disabled by default
- no-setter-return enabled manually as an error
- no-unreachable-loop enabled manually as an error
- no-useless-backreference enabled manually as an error
- prefer-exponentiation-operator enabled manually as an error
- prefer-regex-literals enabled manually as an error
- react/function-component-definition disabled by default
- react/jsx-curly-newline enabled by default as an error with options
{ multiline: 'consistent', singleline: 'consistent' }
- react/jsx-fragments enabled by default as an error with the option
syntax
- react/jsx-no-script-url enabled manually as an error with options
{ name: 'Link', props: ['href', 'to'] }
- react/jsx-no-useless-fragment enabled manually as an error (btw, v6.0.1 enabled this rule with
allowExpressions
option) - react/jsx-props-no-spreading disabled manually
- react/no-adjacent-inline-elements disabled by default
- react/prefer-read-only-props disabled by default
- react/state-in-constructor enabled manually as an error with the option
never
- react/static-property-placement enabled by default as an error with the option
property assignment