From 14fb60bab6225e7ad0551699f806884073742fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Fri, 8 May 2020 22:23:53 +0200 Subject: [PATCH] feat: Support ESLint 7.x BREAKING CHANGE: Requires Node@^10.12.x || 12.x BREAKING CHANGE: Requires ESLint@^7.x --- .travis.yml | 3 +-- best-practices.js | 1 + es6/best-practices.js | 1 + package.json | 6 +++--- possible-errors.js | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 55974e6..e0f8d34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,7 @@ cache: npm notifications: email: false node_js: - - 8.10 - - 10 + - 10.12 - 12 - 14 - node diff --git a/best-practices.js b/best-practices.js index 9b2a3e6..d5c8a9c 100644 --- a/best-practices.js +++ b/best-practices.js @@ -8,6 +8,7 @@ module.exports = { complexity: ['error', 14], 'consistent-return': 'error', 'default-case': 'error', + 'default-case-last': 'error', 'default-param-last': 'off', 'dot-notation': 'error', eqeqeq: 'off', diff --git a/es6/best-practices.js b/es6/best-practices.js index 1cbf485..ef304fc 100644 --- a/es6/best-practices.js +++ b/es6/best-practices.js @@ -3,6 +3,7 @@ module.exports = { rules: { 'no-class-assign': 'error', 'no-duplicate-imports': 'error', + 'no-restricted-exports': 'off', // not applicable for a config preset (should be configured only in projects) 'no-restricted-imports': 'off', // not applicable for a config preset (should be configured only in projects) 'no-useless-computed-key': 'error', 'no-useless-constructor': 'error', diff --git a/package.json b/package.json index e98cfa2..16e8648 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,10 @@ "webpack": "^4.43.0" }, "peerDependencies": { - "eslint": ">=6" + "eslint": "^7.0.0" }, "devDependencies": { - "eslint": "^6.8.0", + "eslint": "^7.0.0", "eslint-find-rules": "^3.4.0", "kcd-scripts": "^5.11.1", "npm-run-all": "^4.1.5", @@ -67,7 +67,7 @@ "dist" ], "engines": { - "node": ">=8.10", + "node": "^10.12.0 || >=12.0.0", "npm": ">=6", "yarn": ">=1" } diff --git a/possible-errors.js b/possible-errors.js index a290a14..5de1717 100644 --- a/possible-errors.js +++ b/possible-errors.js @@ -34,6 +34,7 @@ module.exports = { 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-unsafe-negation': 'error', + 'no-useless-backreference': 'error', 'require-atomic-updates': 'off', 'use-isnan': 'error', 'valid-typeof': 'error',