Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: airbnb/javascript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eslint-config-airbnb-v18.1.0
Choose a base ref
...
head repository: airbnb/javascript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: eslint-config-airbnb-v18.2.0
Choose a head ref

Commits on Feb 20, 2020

  1. [eslint config] [minor] Fix typo in no-multiple-empty-lines rule

     ## Why is the change being made?
    
    This change is made because the Airbnb documentation states to "avoid a
    newline at the beginning of files", yet the code does not follow this.
    
     ## What has changed to address the problem?
    
    This change fixes the `no-multiple-empty-lines` rule by setting max
    beginning of file (`maxBOF`) to from 1 to 0.
    
     ## How was this change tested?
    
    This change was tested with `npm test`.
    
     ## Related docs
    
    https://github.com/airbnb/javascript#whitespace--no-multiple-empty-lines
    Luis729 authored and ljharb committed Feb 20, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    06b3ab1 View commit details

Commits on Mar 11, 2020

  1. [react] Update Chinese (Simplified) Translation

    The translation for Chinese (Simplified) is outdated. Changed to an up-to-date translation that synced with current English version, enhanced expressions for better readability, and also added notes of technical terms for Chinese readers.
    jiahao-c authored and ljharb committed Mar 11, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    e4f3dd4 View commit details

Commits on Mar 14, 2020

  1. [eslint config] readme: fix typo

    davidjbradshaw authored and ljharb committed Mar 14, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    d529cca View commit details
  2. [eslint config] [patch] relax eslint-plugin-react-hooks down to v2.…

    …3, due to a controversial change in v2.5
    
    Fixes #2195.
    ljharb committed Mar 14, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    f075a0d View commit details

Commits on Mar 16, 2020

  1. [eslint config] [base] [patch] Disable prefer-object-spread for `ai…

    …rbnb-base/legacy`
    bl00mber authored and ljharb committed Mar 16, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    d3628e2 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    0375265 View commit details

Commits on Mar 31, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    c0ee2c4 View commit details

Commits on Apr 9, 2020

  1. [eslint config] [minor] Allow using eslint-plugin-react-hooks v3 an…

    …d v4
    
    Co-authored-by: Kristóf Poduszló <kripod@protonmail.com>
    Co-authored-by: Jordan Harband <ljharb@gmail.com>
    kripod and ljharb committed Apr 9, 2020

    Partially verified

    This commit is signed with the committer’s verified signature.
    ljharb’s contribution has been verified via GPG key.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    22adc06 View commit details

Commits on May 20, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    8aee3e1 View commit details

Commits on Jun 5, 2020

  1. [eslint config] [patch] set explicitSpread to ignore for `react/jsx…

    …-props-no-spreading`
    seve authored and ljharb committed Jun 5, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    c48a060 View commit details

Commits on Jun 6, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    cad3db3 View commit details

Commits on Jun 8, 2020

  1. [Deps] update object.entries

    ljharb committed Jun 8, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    d34f807 View commit details
  2. [eslint config] [*] [deps] update eslint-plugin-import, `eslint-plu…

    …gin-react`, `babel-preset-airbnb`, `eslint-find-rules`, `in-publish`, `tape`
    ljharb committed Jun 8, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    7aa0fa1 View commit details

Commits on Jun 10, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    b587006 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    fe2e451 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    5b462a0 View commit details

Commits on Jun 11, 2020

  1. [eslint config] [base] v14.2.0

    ljharb committed Jun 11, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    78457af View commit details

Commits on Jun 18, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    562e351 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    f550ded View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    197b50c View commit details
  4. [eslint config] v18.2.0

    ljharb committed Jun 18, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ljharb Jordan Harband
    Copy the full SHA
    5495541 View commit details
59 changes: 50 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
language: node_js
node_js:
- "14"
- "12"
- "11"
- "10"
- "9"
- "8"
before_install:
- 'nvm install-latest-npm'
install:
@@ -17,25 +15,53 @@ script:
sudo: false
env:
matrix:
- 'TEST=true ESLINT=7 PACKAGE=eslint-config-airbnb-base'
- 'TEST=true ESLINT=7 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=7 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=7 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=7 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb-base'
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=6 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=6 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=6 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base'
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=5 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=5 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb'
matrix:
fast_finish: true
include:
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=7 PACKAGE=eslint-config-airbnb-base
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=7 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=7 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=7 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=7 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb-base
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=6 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=6 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=6 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=5 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=5 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
@@ -44,23 +70,38 @@ matrix:
env: LINT=true PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: LINT=true PACKAGE=eslint-config-airbnb-base
- node_js: "7"
- node_js: "8"
env: TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb-base
- node_js: "8"
env: TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb
- node_js: "8"
env: TEST=true ESLINT=6 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
- node_js: "8"
env: TEST=true ESLINT=6 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
- node_js: "8"
env: TEST=true ESLINT=6 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
- node_js: "8"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
- node_js: "7"
- node_js: "8"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb
- node_js: "7"
- node_js: "8"
env: TEST=true ESLINT=5 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
- node_js: "8"
env: TEST=true ESLINT=5 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
- node_js: "8"
env: TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
- node_js: "6"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
- node_js: "6"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb
- node_js: "6"
env: TEST=true ESLINT=5 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
- node_js: "6"
env: TEST=true ESLINT=5 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
- node_js: "6"
env: TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
exclude:
allow_failures:
- node_js: "11"
- node_js: "9"
- node_js: "7"
- env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb-base
- env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb
- env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -2914,11 +2914,11 @@ Other Style Guides
```javascript
// bad
var obj = { "foo" : 42 };
var obj2 = { "foo":42 };
var obj = { foo : 42 };
var obj2 = { foo:42 };

// good
var obj = { "foo": 42 };
var obj = { foo: 42 };
```
<a name="whitespace--no-trailing-spaces"></a>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
},
"homepage": "https://github.com/airbnb/javascript",
"devDependencies": {
"markdownlint": "^0.19.0",
"markdownlint-cli": "^0.21.0"
"markdownlint": "^0.20.3",
"markdownlint-cli": "^0.23.1"
}
}
10 changes: 10 additions & 0 deletions packages/eslint-config-airbnb-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
14.2.0 / 2020-06-10
==================
- [new] add `eslint` `v7`
- [minor] Disallow multiple empty lines (#2238)
- [minor] Fix typo in no-multiple-empty-lines rule (#2168)
- [patch] Include 'context' exception for `no-param-reassign` (#2230)
- [patch] Allow triple-slash (///) comments (#2197)
- [patch] Disable `prefer-object-spread` for `airbnb-base/legacy` (#2198)
- [deps] update `eslint-plugin-import`, `eslint-plugin-react`, `babel-preset-airbnb`, `eslint-find-rules`, `in-publish`, `tape`, `object.entries`

14.1.0 / 2020-03-12
==================
- [minor] add new disabled rules, update eslint
1 change: 1 addition & 0 deletions packages/eslint-config-airbnb-base/legacy.js
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ module.exports = {
message: 'Please use Object.defineProperty instead.',
}],
'no-var': 'off',
'prefer-object-spread': 'off',
strict: ['error', 'safe'],
}
};
20 changes: 10 additions & 10 deletions packages/eslint-config-airbnb-base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-airbnb-base",
"version": "14.1.0",
"version": "14.2.0",
"description": "Airbnb's base JS ESLint config, following our styleguide",
"main": "index.js",
"scripts": {
@@ -54,26 +54,26 @@
"homepage": "https://github.com/airbnb/javascript",
"devDependencies": {
"@babel/runtime": "^7.8.7",
"babel-preset-airbnb": "^4.4.0",
"babel-preset-airbnb": "^4.5.0",
"babel-tape-runner": "^3.0.0",
"eclint": "^2.8.1",
"eslint": "^5.16.0 || ^6.8.0",
"eslint-find-rules": "^3.4.0",
"eslint-plugin-import": "^2.20.1",
"in-publish": "^2.0.0",
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
"eslint-find-rules": "^3.5.0",
"eslint-plugin-import": "^2.21.2",
"in-publish": "^2.0.1",
"safe-publish-latest": "^1.1.4",
"tape": "^5.0.0-next.4"
"tape": "^5.0.1"
},
"peerDependencies": {
"eslint": "^5.16.0 || ^6.8.0",
"eslint-plugin-import": "^2.20.1"
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
"eslint-plugin-import": "^2.21.2"
},
"engines": {
"node": ">= 6"
},
"dependencies": {
"confusing-browser-globals": "^1.0.9",
"object.assign": "^4.1.0",
"object.entries": "^1.1.1"
"object.entries": "^1.1.2"
}
}
6 changes: 6 additions & 0 deletions packages/eslint-config-airbnb-base/rules/best-practices.js
Original file line number Diff line number Diff line change
@@ -28,6 +28,11 @@ module.exports = {
// require default case in switch statements
'default-case': ['error', { commentPattern: '^no default$' }],

// Enforce default clauses in switch statements to be last
// https://eslint.org/docs/rules/default-case-last
// TODO: enable, semver-minor, when eslint v7 is required (which is a major)
'default-case-last': 'off',

// https://eslint.org/docs/rules/default-param-last
// TODO: enable, semver-minor, when eslint v6.4 is required (which is a major)
'default-param-last': 'off',
@@ -194,6 +199,7 @@ module.exports = {
'accumulator', // for reduce accumulators
'e', // for e.returnvalue
'ctx', // for Koa routing
'context', // for Koa routing
'req', // for Express requests
'request', // for Express requests
'res', // for Express responses
13 changes: 12 additions & 1 deletion packages/eslint-config-airbnb-base/rules/errors.js
Original file line number Diff line number Diff line change
@@ -91,6 +91,11 @@ module.exports = {
// disallow irregular whitespace outside of strings and comments
'no-irregular-whitespace': 'error',

// Disallow Number Literals That Lose Precision
// https://eslint.org/docs/rules/no-loss-of-precision
// TODO: enable, semver-minor, once eslint v7.1 is required (which is major)
'no-loss-of-precision': 'off',

// Disallow characters which are made with multiple code points in character class syntax
// https://eslint.org/docs/rules/no-misleading-character-class
'no-misleading-character-class': 'error',
@@ -131,13 +136,19 @@ module.exports = {
// disallow negating the left operand of relational operators
// https://eslint.org/docs/rules/no-unsafe-negation
'no-unsafe-negation': 'error',

// Disallow useless backreferences in regular expressions
// https://eslint.org/docs/rules/no-useless-backreference
// TODO: enable, semver-minor, once eslint v7 is required (which is major)
'no-useless-backreference': 'off',

// disallow negation of the left operand of an in expression
// deprecated in favor of no-unsafe-negation
'no-negated-in-lhs': 'off',

// Disallow assignments that can lead to race conditions due to usage of await or yield
// https://eslint.org/docs/rules/require-atomic-updates
// TODO: enable, semver-major
// note: not enabled because it is very buggy
'require-atomic-updates': 'off',

// disallow comparisons with the value NaN
10 changes: 10 additions & 0 deletions packages/eslint-config-airbnb-base/rules/es6.js
Original file line number Diff line number Diff line change
@@ -60,6 +60,16 @@ module.exports = {
// https://eslint.org/docs/rules/no-new-symbol
'no-new-symbol': 'error',

// Disallow specified names in exports
// https://eslint.org/docs/rules/no-restricted-exports
// TODO enable, semver-minor, once eslint v7 is required (which is major)
'no-restricted-exports': ['off', {
restrictedNamedExports: [
'default', // use `export default` to provide a default export
'then', // this will cause tons of confusion when your module is dynamically `import()`ed
],
}],

// disallow specific imports
// https://eslint.org/docs/rules/no-restricted-imports
'no-restricted-imports': ['off', {
4 changes: 2 additions & 2 deletions packages/eslint-config-airbnb-base/rules/style.js
Original file line number Diff line number Diff line change
@@ -313,7 +313,7 @@ module.exports = {

// disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
// https://eslint.org/docs/rules/no-multiple-empty-lines
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 1, maxEOF: 0 }],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],

// disallow negated conditions
// https://eslint.org/docs/rules/no-negated-condition
@@ -501,7 +501,7 @@ module.exports = {
'spaced-comment': ['error', 'always', {
line: {
exceptions: ['-', '+'],
markers: ['=', '!'], // space here to support sprockets directives
markers: ['=', '!', '/'], // space here to support sprockets directives, slash for TS /// comments
},
block: {
exceptions: ['-', '+'],
11 changes: 11 additions & 0 deletions packages/eslint-config-airbnb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
18.2.0 / 2020-06-18
==================
- [new] add `eslint` `v7` (#2240)
- [minor] Allow using `eslint-plugin-react-hooks` v3 and v4 (#2235, #2207)
- [minor] Fix typo in no-multiple-empty-lines rule (#2168)
- [patch] set `explicitSpread` to ignore for `react/jsx-props-no-spreading` (#2237)
- [patch] relax `eslint-plugin-react-hooks` down to v2.3, due to a controversial change in v2.5
- [readme] fix typo (#2194)
- [deps] update `eslint-config-airbnb-base`, `eslint-plugin-jsx-a11y`, `eslint-plugin-import`, `eslint-plugin-react`, `babel-preset-airbnb`, `eslint-find-rules`, `in-publish`, `tape`, `object.entries`
- [tests] fix for eslint 7

18.1.0 / 2020-03-12
==================
- [minor] Support eslint-plugin-react-hooks@2 (#2090)
2 changes: 1 addition & 1 deletion packages/eslint-config-airbnb/README.md
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ Our default export contains all of our ESLint rules, including ECMAScript 6+ and

2. Add `"extends": "airbnb"` to your `.eslintrc`

### eslint-config/airbnb/hooks
### eslint-config-airbnb/hooks

This entry point enables the linting rules for React hooks (requires v16.8+). To use, add `"extends": ["airbnb", "airbnb/hooks"]` to your `.eslintrc`

34 changes: 17 additions & 17 deletions packages/eslint-config-airbnb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-airbnb",
"version": "18.1.0",
"version": "18.2.0",
"description": "Airbnb's ESLint config, following our styleguide",
"main": "index.js",
"scripts": {
@@ -54,32 +54,32 @@
},
"homepage": "https://github.com/airbnb/javascript",
"dependencies": {
"eslint-config-airbnb-base": "^14.1.0",
"eslint-config-airbnb-base": "^14.2.0",
"object.assign": "^4.1.0",
"object.entries": "^1.1.1"
"object.entries": "^1.1.2"
},
"devDependencies": {
"@babel/runtime": "^7.8.7",
"babel-preset-airbnb": "^4.4.0",
"babel-preset-airbnb": "^4.5.0",
"babel-tape-runner": "^3.0.0",
"eclint": "^2.8.1",
"eslint": "^5.16.0 || ^6.8.0",
"eslint-find-rules": "^3.4.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.0 || ^1.7.0",
"in-publish": "^2.0.0",
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
"eslint-find-rules": "^3.5.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4 || ^3 || ^2.3.0 || ^1.7.0",
"in-publish": "^2.0.1",
"react": ">= 0.13.0",
"safe-publish-latest": "^1.1.4",
"tape": "^5.0.0-next.4"
"tape": "^5.0.1"
},
"peerDependencies": {
"eslint": "^5.16.0 || ^6.8.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.0 || ^1.7.0"
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4 || ^3 || ^2.3.0 || ^1.7.0"
},
"engines": {
"node": ">= 6"
6 changes: 6 additions & 0 deletions packages/eslint-config-airbnb/rules/react-a11y.js
Original file line number Diff line number Diff line change
@@ -236,5 +236,11 @@ module.exports = {
specialLink: ['to'],
aspects: ['noHref', 'invalidHref', 'preferButton'],
}],

// Ensure the autocomplete attribute is correct and suitable for the form field it is used with
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/29c68596b15c4ff0a40daae6d4a2670e36e37d35/docs/rules/autocomplete-valid.md
'jsx-a11y/autocomplete-valid': ['off', {
inputComponents: [],
}],
},
};
1 change: 1 addition & 0 deletions packages/eslint-config-airbnb/rules/react.js
Original file line number Diff line number Diff line change
@@ -494,6 +494,7 @@ module.exports = {
'react/jsx-props-no-spreading': ['error', {
html: 'enforce',
custom: 'enforce',
explicitSpread: 'ignore',
exceptions: [],
}],

Loading