Skip to content

Commit e1cef35

Browse files
Merge branch 'master' into shar--always-use-parens-for-arrow-functions
2 parents cf57435 + 030e23b commit e1cef35

File tree

17 files changed

+262
-57
lines changed

17 files changed

+262
-57
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- "11"
34
- "10"
45
- "9"
56
- "8"

README.md

Lines changed: 80 additions & 24 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
},
4040
"homepage": "https://github.com/airbnb/javascript",
4141
"devDependencies": {
42-
"markdownlint-cli": "^0.10.0"
42+
"markdownlint-cli": "^0.13.0"
4343
}
4444
}

packages/eslint-config-airbnb-base/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
13.2.0 / 2019-07-01
2+
==================
3+
- [minor] Enforce dangling underscores in method names (#1907)
4+
- [fix] disable `no-var` in legacy entry point
5+
- [patch] Ignore property modifications of `staticContext` params (#2029)
6+
- [patch] `no-extraneous-dependencies`: Add jest.setup.js to devDeps (#1998)
7+
- [meta] add disabled `prefer-named-capture-group` rule
8+
- [meta] add disabled `no-useless-catch` config
9+
- [deps] Switch to confusing-browser-globals (#1961)
10+
- [deps] update `object.entries`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`, `tape`
11+
- [docs] correct JavaScript capitalization (#2046)
12+
- [readme] Improve eslint config setup instructions for yarn (#2001)
13+
- [docs] fix docs for whitespace config (#1914, #1871)
14+
115
13.1.0 / 2018-08-13
216
==================
317
- [new] add eslint v5 support (#1834)

packages/eslint-config-airbnb-base/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ We export two ESLint configurations for your usage.
1212

1313
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires `eslint` and `eslint-plugin-import`.
1414

15-
If you use yarn, run `npm info "eslint-config-airbnb-base@latest" peerDependencies` to list the peer dependencies and versions, then run `yarn add --dev <dependency>@<version>` for each listed peer dependency. See below for npm instructions.
16-
1715
1. Install the correct versions of each package, which are listed by the command:
1816

1917
```sh
@@ -26,6 +24,10 @@ If you use yarn, run `npm info "eslint-config-airbnb-base@latest" peerDependenci
2624
npx install-peerdeps --dev eslint-config-airbnb-base
2725
```
2826

27+
If using **yarn**, you can also use the shortcut described above if you have npm 5+ installed on your machine, as the command will detect that you are using yarn and will act accordingly.
28+
Otherwise, run `npm info "eslint-config-airbnb-base@latest" peerDependencies` to list the peer dependencies and versions, then run `yarn add --dev <dependency>@<version>` for each listed peer dependency.
29+
30+
2931
If using **npm < 5**, Linux/OSX users can run
3032

3133
```sh
@@ -82,7 +84,7 @@ Lints ES5 and below. Requires `eslint` and `eslint-plugin-import`.
8284

8385
2. Add `"extends": "airbnb-base/legacy"` to your .eslintrc
8486

85-
See [Airbnb's overarching ESLint config](https://npmjs.com/eslint-config-airbnb), [Airbnb's Javascript styleguide](https://github.com/airbnb/javascript), and the [ESlint config docs](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information.
87+
See [Airbnb's overarching ESLint config](https://npmjs.com/eslint-config-airbnb), [Airbnb's JavaScript styleguide](https://github.com/airbnb/javascript), and the [ESlint config docs](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information.
8688

8789
### eslint-config-airbnb-base/whitespace
8890

packages/eslint-config-airbnb-base/legacy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ module.exports = {
2727
property: '__defineSetter__',
2828
message: 'Please use Object.defineProperty instead.',
2929
}],
30+
'no-var': 'off'
3031
}
3132
};

packages/eslint-config-airbnb-base/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-airbnb-base",
3-
"version": "13.1.0",
3+
"version": "13.2.0",
44
"description": "Airbnb's base JS ESLint config, following our styleguide",
55
"main": "index.js",
66
"scripts": {
@@ -53,26 +53,26 @@
5353
},
5454
"homepage": "https://github.com/airbnb/javascript",
5555
"devDependencies": {
56-
"babel-preset-airbnb": "^2.5.3",
56+
"babel-preset-airbnb": "^2.6.0",
5757
"babel-tape-runner": "^2.0.1",
5858
"editorconfig-tools": "^0.1.1",
5959
"eslint": "^4.19.1 || ^5.3.0",
6060
"eslint-find-rules": "^3.3.1",
61-
"eslint-plugin-import": "^2.14.0",
61+
"eslint-plugin-import": "^2.18.0",
6262
"in-publish": "^2.0.0",
6363
"safe-publish-latest": "^1.1.2",
64-
"tape": "^4.9.1"
64+
"tape": "^4.11.0"
6565
},
6666
"peerDependencies": {
6767
"eslint": "^4.19.1 || ^5.3.0",
68-
"eslint-plugin-import": "^2.14.0"
68+
"eslint-plugin-import": "^2.18.0"
6969
},
7070
"engines": {
7171
"node": ">= 4"
7272
},
7373
"dependencies": {
74-
"confusing-browser-globals": "^1.0.5",
74+
"confusing-browser-globals": "^1.0.7",
7575
"object.assign": "^4.1.0",
76-
"object.entries": "^1.0.4"
76+
"object.entries": "^1.1.0"
7777
}
7878
}

packages/eslint-config-airbnb-base/rules/best-practices.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ module.exports = {
186186
'res', // for Express responses
187187
'response', // for Express responses
188188
'$scope', // for Angular 1 scopes
189+
'staticContext', // for ReactRouter context
189190
]
190191
}],
191192

@@ -280,6 +281,11 @@ module.exports = {
280281
// disallow unnecessary .call() and .apply()
281282
'no-useless-call': 'off',
282283

284+
// Disallow unnecessary catch clauses
285+
// https://eslint.org/docs/rules/no-useless-catch
286+
// TODO: enable, semver-major
287+
'no-useless-catch': 'off',
288+
283289
// disallow useless string concatenation
284290
// https://eslint.org/docs/rules/no-useless-concat
285291
'no-useless-concat': 'error',
@@ -306,6 +312,10 @@ module.exports = {
306312
// https://eslint.org/docs/rules/prefer-promise-reject-errors
307313
'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],
308314

315+
// Suggest using named capture group in regular expression
316+
// https://eslint.org/docs/rules/prefer-named-capture-group
317+
'prefer-named-capture-group': 'off',
318+
309319
// require use of the second argument for parseInt()
310320
radix: 'error',
311321

packages/eslint-config-airbnb-base/rules/es6.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ module.exports = {
156156
// https://eslint.org/docs/rules/sort-imports
157157
'sort-imports': ['off', {
158158
ignoreCase: false,
159+
ignoreDeclarationSort: false,
159160
ignoreMemberSort: false,
160161
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
161162
}],

packages/eslint-config-airbnb-base/rules/imports.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ module.exports = {
7979
'test-*.{js,jsx}', // repos with multiple top-level test files
8080
'**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test
8181
'**/jest.config.js', // jest config
82+
'**/jest.setup.js', // jest setup
8283
'**/vue.config.js', // vue-cli config
8384
'**/webpack.config.js', // webpack config
8485
'**/webpack.config.*.js', // webpack config
@@ -221,6 +222,10 @@ module.exports = {
221222
// https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md
222223
'import/no-default-export': 'off',
223224

225+
// Prohibit named exports. this is a terrible rule, do not use it.
226+
// https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md
227+
'import/no-named-export': 'off',
228+
224229
// Forbid a module from importing itself
225230
// https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md
226231
'import/no-self-import': 'error',
@@ -243,5 +248,14 @@ module.exports = {
243248
// Use this rule to prevent imports to folders in relative parent paths.
244249
// https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md
245250
'import/no-relative-parent-imports': 'off',
251+
252+
// Reports modules without any exports, or with unused exports
253+
// https://github.com/benmosher/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md
254+
// TODO: enable, semver-major
255+
'import/no-unused-modules': ['off', {
256+
ignoreExports: [],
257+
missingExports: true,
258+
unusedExports: true,
259+
}],
246260
},
247261
};

packages/eslint-config-airbnb-base/rules/style.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,13 @@ module.exports = {
422422
'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }],
423423

424424
// disallow padding within blocks
425-
'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never' }],
425+
// TODO, semver-major: uncomment option
426+
'padded-blocks': ['error', {
427+
blocks: 'never',
428+
classes: 'never',
429+
switches: 'never',
430+
// allowSingleLineBlocks: true,
431+
}],
426432

427433
// Require or disallow padding lines between statements
428434
// https://eslint.org/docs/rules/padding-line-between-statements

packages/eslint-config-airbnb/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
17.1.1 / 2019-07-01
2+
==================
3+
- [patch] Turn off `react/no-multi-comp` (#2006)
4+
- [patch] extend `no-underscore-dangle` to allow for redux dev tools in the main config instead (#1996)
5+
- [meta] add disabled `jsx-fragments` rule
6+
- [deps] update `eslint-config-airbnb-base`, `object.entries`, `eslint-plugin-import`, `eslint-plugin-react`, `eslint-plugin-jsx-a11y`, `babel-preset-airbnb`, `tape` (#2005, etc)
7+
- [docs] correct JavaScript capitalization (#2046)
8+
- [docs] fix docs for whitespace config (#1914, #1871)
9+
- [readme] Improve eslint config setup instructions for yarn (#2001)
10+
111
17.1.0 / 2018-08-13
212
==================
313
- [new] add eslint v5 support

packages/eslint-config-airbnb/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ We export three ESLint configurations for your usage.
1212

1313
Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires `eslint`, `eslint-plugin-import`, `eslint-plugin-react`, and `eslint-plugin-jsx-a11y`. If you don't need React, see [eslint-config-airbnb-base](https://npmjs.com/eslint-config-airbnb-base).
1414

15-
If you use yarn, run `npm info "eslint-config-airbnb@latest" peerDependencies` to list the peer dependencies and versions, then run `yarn add --dev <dependency>@<version>` for each listed peer dependency. See below for npm instructions.
16-
1715
1. Install the correct versions of each package, which are listed by the command:
1816

1917
```sh
@@ -26,6 +24,9 @@ If you use yarn, run `npm info "eslint-config-airbnb@latest" peerDependencies` t
2624
npx install-peerdeps --dev eslint-config-airbnb
2725
```
2826

27+
If using **yarn**, you can also use the shortcut described above if you have npm 5+ installed on your machine, as the command will detect that you are using yarn and will act accordingly.
28+
Otherwise, run `npm info "eslint-config-airbnb@latest" peerDependencies` to list the peer dependencies and versions, then run `yarn add --dev <dependency>@<version>` for each listed peer dependency.
29+
2930
If using **npm < 5**, Linux/OSX users can run
3031

3132
```sh
@@ -67,7 +68,7 @@ This entry point is deprecated. See [eslint-config-airbnb-base](https://npmjs.co
6768

6869
This entry point is deprecated. See [eslint-config-airbnb-base](https://npmjs.com/eslint-config-airbnb-base).
6970

70-
See [Airbnb's Javascript styleguide](https://github.com/airbnb/javascript) and
71+
See [Airbnb's JavaScript styleguide](https://github.com/airbnb/javascript) and
7172
the [ESlint config docs](https://eslint.org/docs/user-guide/configuring#extending-configuration-files)
7273
for more information.
7374

packages/eslint-config-airbnb/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-airbnb",
3-
"version": "17.1.0",
3+
"version": "17.1.1",
44
"description": "Airbnb's ESLint config, following our styleguide",
55
"main": "index.js",
66
"scripts": {
@@ -11,7 +11,7 @@
1111
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
1212
"pretest": "npm run --silent lint",
1313
"test": "npm run --silent tests-only",
14-
"link:eslint": "cd node_modules/eslint && npm link && cd -",
14+
"link:eslint": "cd node_modules/eslint && npm link --production && cd -",
1515
"pretravis": "npm run link:eslint && cd ../eslint-config-airbnb-base && npm link eslint && npm install && npm link && cd - && npm link --no-save eslint-config-airbnb-base",
1616
"travis": "npm run --silent test",
1717
"posttravis": "npm unlink --no-save eslint-config-airbnb-base eslint >/dev/null &"
@@ -54,29 +54,29 @@
5454
},
5555
"homepage": "https://github.com/airbnb/javascript",
5656
"dependencies": {
57-
"eslint-config-airbnb-base": "^13.1.0",
57+
"eslint-config-airbnb-base": "^13.2.0",
5858
"object.assign": "^4.1.0",
59-
"object.entries": "^1.0.4"
59+
"object.entries": "^1.1.0"
6060
},
6161
"devDependencies": {
62-
"babel-preset-airbnb": "^2.5.3",
62+
"babel-preset-airbnb": "^2.6.0",
6363
"babel-tape-runner": "^2.0.1",
6464
"editorconfig-tools": "^0.1.1",
6565
"eslint": "^4.19.1 || ^5.3.0",
6666
"eslint-find-rules": "^3.3.1",
67-
"eslint-plugin-import": "^2.14.0",
68-
"eslint-plugin-jsx-a11y": "^6.1.1",
69-
"eslint-plugin-react": "^7.11.0",
67+
"eslint-plugin-import": "^2.18.0",
68+
"eslint-plugin-jsx-a11y": "^6.2.3",
69+
"eslint-plugin-react": "^7.14.2",
7070
"in-publish": "^2.0.0",
7171
"react": ">= 0.13.0",
7272
"safe-publish-latest": "^1.1.2",
73-
"tape": "^4.9.1"
73+
"tape": "^4.11.0"
7474
},
7575
"peerDependencies": {
7676
"eslint": "^4.19.1 || ^5.3.0",
77-
"eslint-plugin-import": "^2.14.0",
78-
"eslint-plugin-jsx-a11y": "^6.1.1",
79-
"eslint-plugin-react": "^7.11.0"
77+
"eslint-plugin-import": "^2.18.0",
78+
"eslint-plugin-jsx-a11y": "^6.2.3",
79+
"eslint-plugin-react": "^7.14.2"
8080
},
8181
"engines": {
8282
"node": ">= 4"

packages/eslint-config-airbnb/rules/react-a11y.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,36 @@ module.exports = {
6666
depth: 25
6767
}],
6868

69+
// Enforce that a control (an interactive element) has a text label.
70+
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md
71+
// TODO, semver-major: enable
72+
'jsx-a11y/control-has-associated-label': ['off', {
73+
labelAttributes: ['label'],
74+
controlComponents: [],
75+
ignoreElements: [
76+
'audio',
77+
'canvas',
78+
'embed',
79+
'input',
80+
'textarea',
81+
'tr',
82+
'video',
83+
],
84+
ignoreRoles: [
85+
'grid',
86+
'listbox',
87+
'menu',
88+
'menubar',
89+
'radiogroup',
90+
'row',
91+
'tablist',
92+
'toolbar',
93+
'tree',
94+
'treegrid',
95+
],
96+
depth: 5,
97+
}],
98+
6999
// require that mouseover/out come with focus/blur, for keyboard-only users
70100
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md
71101
'jsx-a11y/mouse-events-have-key-events': 'error',

0 commit comments

Comments
 (0)