Skip to content

Commit 84d3257

Browse files
committed
feat: support ESLint 8.x
1 parent bf3f302 commit 84d3257

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dist: focal
33
arch: arm64-graviton2
44
language: node_js
55
node_js:
6-
- 10
6+
- 12
77
script:
88
- npm run test
99
after_success:

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ This is how Canonical ruleset compares to other popular configurations.
174174
|[`ava/use-t-well`](https://github.com/avajs/eslint-plugin-ava/blob/master/docs/rules/use-t-well.md)|error 🚨|N/A 👻|N/A 👻|N/A 👻|
175175
|[`ava/use-test`](https://github.com/avajs/eslint-plugin-ava/blob/master/docs/rules/use-test.md)|error 🚨|N/A 👻|N/A 👻|N/A 👻|
176176
|[`ava/use-true-false`](https://github.com/avajs/eslint-plugin-ava/blob/master/docs/rules/use-true-false.md)|error 🚨|N/A 👻|N/A 👻|N/A 👻|
177-
|`babel/new-cap`|off|N/A 👻|N/A 👻|N/A 👻|
178-
|`babel/no-invalid-this`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
179-
|`babel/object-curly-spacing`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
180-
|`babel/valid-typeof`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
177+
|`@babel/new-cap`|off|N/A 👻|N/A 👻|N/A 👻|
178+
|`@babel/no-invalid-this`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
179+
|`@babel/object-curly-spacing`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
180+
|`@babel/valid-typeof`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
181181
|[`block-scoped-var`](https://eslint.org/docs/rules/block-scoped-var)|error 🚨|error 🚨|N/A 👻|N/A 👻|
182182
|[`block-spacing`](https://eslint.org/docs/rules/block-spacing)|error 🚨|error 🚨|error 🚨|error 🚨|
183183
|[`brace-style`](https://eslint.org/docs/rules/brace-style)|error 🚨|error 🚨|error 🚨|error 🚨|

configurations/eslintrc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"sort-keys-fix",
2121
"fp",
2222
"no-use-extend-native",
23-
"babel",
23+
"@babel",
2424
"import",
2525
"jsdoc",
2626
"promise",
@@ -55,13 +55,13 @@
5555
"before": true
5656
}
5757
],
58-
"babel/new-cap": 0,
59-
"babel/no-invalid-this": 2,
60-
"babel/object-curly-spacing": [
58+
"@babel/new-cap": 0,
59+
"@babel/no-invalid-this": 2,
60+
"@babel/object-curly-spacing": [
6161
2,
6262
"never"
6363
],
64-
"babel/valid-typeof": 2,
64+
"@babel/valid-typeof": 2,
6565
"block-scoped-var": 2,
6666
"block-spacing": [
6767
2,

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@
1818
]
1919
},
2020
"dependencies": {
21-
"@babel/eslint-parser": "^7.13.14",
22-
"@typescript-eslint/eslint-plugin": "^4.22.0",
23-
"@typescript-eslint/parser": "^4.22.0",
21+
"@babel/eslint-parser": "^7.15.8",
22+
"@babel/eslint-plugin": "^7.14.5",
23+
"@typescript-eslint/eslint-plugin": "^5.0.0-0",
24+
"@typescript-eslint/parser": "^5.0.0-0",
2425
"eslint-plugin-ava": "^12.0.0",
25-
"eslint-plugin-babel": "^5.3.1",
26-
"eslint-plugin-cypress": "^2.11.2",
26+
"eslint-plugin-cypress": "^2.12.1",
2727
"eslint-plugin-eslint-comments": "^3.2.0",
2828
"eslint-plugin-filenames": "^1.3.2",
29-
"eslint-plugin-flowtype": "^5.7.1",
29+
"eslint-plugin-flowtype": "^5.10.0",
3030
"eslint-plugin-fp": "^2.3.0",
31-
"eslint-plugin-import": "^2.22.1",
32-
"eslint-plugin-jest": "^24.3.5",
33-
"eslint-plugin-jsdoc": "^32.3.0",
34-
"eslint-plugin-lodash": "^7.2.0",
35-
"eslint-plugin-mocha": "^8.1.0",
31+
"eslint-plugin-import": "^2.24.2",
32+
"eslint-plugin-jest": "^24.7.0",
33+
"eslint-plugin-jsdoc": "^32.3.4",
34+
"eslint-plugin-lodash": "^7.3.0",
35+
"eslint-plugin-mocha": "^8.2.0",
3636
"eslint-plugin-modules-newline": "0.0.6",
3737
"eslint-plugin-no-use-extend-native": "^0.5.0",
3838
"eslint-plugin-node": "^11.1.0",
3939
"eslint-plugin-promise": "^5.1.0",
40-
"eslint-plugin-react": "^7.23.2",
40+
"eslint-plugin-react": "^7.26.1",
4141
"eslint-plugin-react-hooks": "^4.2.0",
42-
"eslint-plugin-sort-keys-fix": "^1.1.1",
42+
"eslint-plugin-sort-keys-fix": "^1.1.2",
4343
"eslint-plugin-typescript-sort-keys": "^1.8.0",
4444
"eslint-plugin-unicorn": "^30.0.0"
4545
},
4646
"description": "Canonical ESLint Shareable Config",
4747
"devDependencies": {
4848
"@ava/babel": "^1.0.1",
49-
"@babel/core": "^7.13.16",
50-
"@babel/register": "^7.13.16",
49+
"@babel/core": "^7.15.8",
50+
"@babel/register": "^7.15.3",
5151
"ava": "^3.15.0",
52-
"eslint": "^7.24.0",
52+
"eslint": "^8.0.0",
5353
"husky": "^4.3.8",
5454
"jsonlint": "^1.6.3",
5555
"semantic-release": "^17.4.2"
@@ -71,7 +71,7 @@
7171
"main": "./eslintrc.js",
7272
"name": "eslint-config-canonical",
7373
"peerDependencies": {
74-
"eslint": "^6.0.0 || ^7.0.0"
74+
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
7575
},
7676
"repository": {
7777
"type": "git",

test/eslint-config-canonical/canonical.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const test = require('ava');
2-
const CLIEngine = require('eslint').CLIEngine;
2+
const {ESLint} = require('eslint');
33

44
const configurations = [
55
'ava',
@@ -16,8 +16,8 @@ for (const configuration of configurations) {
1616
// eslint-disable-next-line import/no-dynamic-require -- Safe as for testing
1717
const config = require('../../' + configuration);
1818

19-
const rulesDefinition = new CLIEngine({
20-
configFile: './' + configuration + '.js',
19+
const rulesDefinition = new ESLint({
20+
overrideConfigFile: './' + configuration + '.js',
2121
useEslintrc: false,
2222
})
2323
.getRules();

0 commit comments

Comments
 (0)