Skip to content

Commit

Permalink
[eslint config] [*] [breaking] add eslint v6, drop eslint v4
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb authored and eugene2candy committed Apr 10, 2021
1 parent 29c8485 commit 4ecb5fb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
32 changes: 14 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ node_js:
- "10"
- "9"
- "8"
- "7"
- "6"
- "5"
- "4"
before_install:
- 'nvm install-latest-npm'
install:
Expand All @@ -20,37 +16,37 @@ script:
sudo: false
env:
matrix:
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb-base'
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base'
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb'
- 'TEST=true ESLINT=4 PACKAGE=eslint-config-airbnb-base'
- 'TEST=true ESLINT=4 PACKAGE=eslint-config-airbnb'
matrix:
fast_finish: true
include:
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb-base
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb-base
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
- node_js: "lts/*"
env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb
- node_js: "lts/*"
env: LINT=true
exclude:
- node_js: "5"
- node_js: "7"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
- node_js: "5"
- node_js: "7"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb
- node_js: "4"
- node_js: "6"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
- node_js: "4"
- node_js: "6"
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb
exclude:
allow_failures:
- node_js: "11"
- node_js: "9"
- node_js: "7"
- node_js: "5"
- 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
- env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb
- env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb-base
- env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb
6 changes: 3 additions & 3 deletions packages/eslint-config-airbnb-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@
"babel-preset-airbnb": "^2.6.0",
"babel-tape-runner": "^2.0.1",
"eclint": "^2.8.1",
"eslint": "^4.19.1 || ^5.3.0",
"eslint": "^5.16.0 || ^6.1.0",
"eslint-find-rules": "^3.4.0",
"eslint-plugin-import": "^2.18.2",
"in-publish": "^2.0.0",
"safe-publish-latest": "^1.1.2",
"tape": "^4.11.0"
},
"peerDependencies": {
"eslint": "^4.19.1 || ^5.3.0",
"eslint": "^5.16.0 || ^6.1.0",
"eslint-plugin-import": "^2.18.2"
},
"engines": {
"node": ">= 4"
"node": ">= 6"
},
"dependencies": {
"confusing-browser-globals": "^1.0.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-airbnb-base/whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const baseConfig = require('.');
function onlyErrorOnRules(rulesToError, config) {
const errorsOnly = assign({}, config);
const cli = new CLIEngine({ baseConfig: config, useEslintrc: false });
const baseRules = cli.getConfigForFile('./').rules;
const baseRules = cli.getConfigForFile(require.resolve('./')).rules;

entries(baseRules).forEach((rule) => {
const ruleName = rule[0];
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-airbnb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"babel-preset-airbnb": "^2.6.0",
"babel-tape-runner": "^2.0.1",
"eclint": "^2.8.1",
"eslint": "^4.19.1 || ^5.3.0",
"eslint": "^5.16.0 || ^6.1.0",
"eslint-find-rules": "^3.4.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
Expand All @@ -73,12 +73,12 @@
"tape": "^4.11.0"
},
"peerDependencies": {
"eslint": "^4.19.1 || ^5.3.0",
"eslint": "^5.16.0 || ^6.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.2"
},
"engines": {
"node": ">= 4"
"node": ">= 6"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-config-airbnb/whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const baseConfig = require('.');
function onlyErrorOnRules(rulesToError, config) {
const errorsOnly = assign({}, config);
const cli = new CLIEngine({ baseConfig: config, useEslintrc: false });
const baseRules = cli.getConfigForFile('./').rules;
const baseRules = cli.getConfigForFile(require.resolve('./')).rules;

entries(baseRules).forEach((rule) => {
const ruleName = rule[0];
Expand Down

0 comments on commit 4ecb5fb

Please sign in to comment.