Skip to content

Commit

Permalink
feat: support ESLint 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Oct 10, 2021
1 parent bf3f302 commit d8719ae
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dist: focal
arch: arm64-graviton2
language: node_js
node_js:
- 10
- 12
script:
- npm run test
after_success:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ This is how Canonical ruleset compares to other popular configurations.
|[`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 👻|
|[`ava/use-test`](https://github.com/avajs/eslint-plugin-ava/blob/master/docs/rules/use-test.md)|error 🚨|N/A 👻|N/A 👻|N/A 👻|
|[`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 👻|
|`babel/new-cap`|off|N/A 👻|N/A 👻|N/A 👻|
|`babel/no-invalid-this`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
|`babel/object-curly-spacing`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
|`babel/valid-typeof`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
|`@babel/new-cap`|off|N/A 👻|N/A 👻|N/A 👻|
|`@babel/no-invalid-this`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
|`@babel/object-curly-spacing`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
|`@babel/valid-typeof`|error 🚨|N/A 👻|N/A 👻|N/A 👻|
|[`block-scoped-var`](https://eslint.org/docs/rules/block-scoped-var)|error 🚨|error 🚨|N/A 👻|N/A 👻|
|[`block-spacing`](https://eslint.org/docs/rules/block-spacing)|error 🚨|error 🚨|error 🚨|error 🚨|
|[`brace-style`](https://eslint.org/docs/rules/brace-style)|error 🚨|error 🚨|error 🚨|error 🚨|
Expand Down
10 changes: 5 additions & 5 deletions configurations/eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"sort-keys-fix",
"fp",
"no-use-extend-native",
"babel",
"@babel",
"import",
"jsdoc",
"promise",
Expand Down Expand Up @@ -55,13 +55,13 @@
"before": true
}
],
"babel/new-cap": 0,
"babel/no-invalid-this": 2,
"babel/object-curly-spacing": [
"@babel/new-cap": 0,
"@babel/no-invalid-this": 2,
"@babel/object-curly-spacing": [
2,
"never"
],
"babel/valid-typeof": 2,
"@babel/valid-typeof": 2,
"block-scoped-var": 2,
"block-spacing": [
2,
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@
]
},
"dependencies": {
"@babel/eslint-parser": "^7.13.14",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint-plugin-ava": "^12.0.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-cypress": "^2.11.2",
"@babel/eslint-parser": "^7.15.8",
"@babel/eslint-plugin": "^7.14.5",
"@typescript-eslint/eslint-plugin": "^5.0.0-0",
"@typescript-eslint/parser": "^5.0.0-0",
"eslint-plugin-ava": "^13.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-flowtype": "^5.7.1",
"eslint-plugin-flowtype": "^6.1.0",
"eslint-plugin-fp": "^2.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.5",
"eslint-plugin-jsdoc": "^32.3.0",
"eslint-plugin-lodash": "^7.2.0",
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^25.0.1",
"eslint-plugin-jsdoc": "^36.1.1",
"eslint-plugin-lodash": "^7.3.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-modules-newline": "0.0.6",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-sort-keys-fix": "^1.1.1",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-typescript-sort-keys": "^1.8.0",
"eslint-plugin-unicorn": "^30.0.0"
"eslint-plugin-unicorn": "^36.0.0"
},
"description": "Canonical ESLint Shareable Config",
"devDependencies": {
"@ava/babel": "^1.0.1",
"@babel/core": "^7.13.16",
"@babel/register": "^7.13.16",
"@babel/core": "^7.15.8",
"@babel/register": "^7.15.3",
"ava": "^3.15.0",
"eslint": "^7.24.0",
"eslint": "^8.0.0",
"husky": "^4.3.8",
"jsonlint": "^1.6.3",
"semantic-release": "^17.4.2"
Expand All @@ -71,7 +71,7 @@
"main": "./eslintrc.js",
"name": "eslint-config-canonical",
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0"
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
},
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions test/eslint-config-canonical/canonical.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const test = require('ava');
const CLIEngine = require('eslint').CLIEngine;
const {ESLint} = require('eslint');

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

const rulesDefinition = new CLIEngine({
configFile: './' + configuration + '.js',
const rulesDefinition = new ESLint({
overrideConfigFile: './' + configuration + '.js',
useEslintrc: false,
})
.getRules();
Expand Down

0 comments on commit d8719ae

Please sign in to comment.