Skip to content

Commit

Permalink
feat: support ESLint 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Dec 18, 2021
1 parent f99c40f commit 23f1e2c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm install --save-dev eslint @mysticatea/eslint-plugin
### Requirements

- Node.js `^12.22.0 || ^14.17.0 || >=16.0.0` or newer versions.
- ESLint `^6.6.0` or newer versions.
- ESLint `^6.6.0 || ^7.0.0` or newer versions.

## 📖 Usage

Expand Down
10 changes: 10 additions & 0 deletions lib/configs/_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
camelcase: "error",
"consistent-return": "error",
curly: "error",
"default-case-last": "error",
"default-case": "error",
"default-param-last": "error",
"dot-notation": "error",
Expand Down Expand Up @@ -92,6 +93,7 @@ module.exports = {
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-mixed-operators": [
"error",
Expand All @@ -106,12 +108,14 @@ module.exports = {
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-param-reassign": ["error", { props: false }],
"no-process-env": "error",
"no-process-exit": "error",
"no-promise-executor-return": "error",
"no-prototype-builtins": "error",
"no-redeclare": ["error", { builtinGlobals: true }],
"no-regex-spaces": "error",
Expand Down Expand Up @@ -141,9 +145,11 @@ module.exports = {
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unreachable-loop": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": ["error", { enforceForOrderingRelations: true }],
"no-unsafe-optional-chaining": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-vars": [
Expand All @@ -157,6 +163,7 @@ module.exports = {
},
],
"no-use-before-define": ["error", "nofunc"],
"no-useless-backreference": "error",
"no-useless-call": "error",
"no-useless-catch": "error",
"no-useless-concat": "error",
Expand Down Expand Up @@ -299,6 +306,7 @@ module.exports = {
"guard-for-in": "off",
"handle-callback-err": "off",
"id-blacklist": "off",
"id-denylist": "off",
"id-length": "off",
"id-match": "off",
"line-comment-position": "off",
Expand Down Expand Up @@ -332,6 +340,7 @@ module.exports = {
"no-path-concat": "off",
"no-plusplus": "off",
"no-proto": "off",
"no-restricted-exports": "off",
"no-restricted-globals": "off",
"no-restricted-imports": "off",
"no-restricted-modules": "off",
Expand Down Expand Up @@ -392,6 +401,7 @@ module.exports = {
],
},
],
// "@mysticatea/eslint-comments/require-description": "error",
"@mysticatea/eslint-comments/require-description": "off",

// prettier
Expand Down
2 changes: 0 additions & 2 deletions lib/configs/_override-special.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = {
extends: [require.resolve("./+node.js")],
rules: {
"no-console": "off",
"no-process-env": "off",
},
},
{
Expand All @@ -33,7 +32,6 @@ module.exports = {
],
rules: {
"no-console": "off",
"no-process-env": "off",
},
},
],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"lib"
],
"peerDependencies": {
"eslint": ">=6.6.0"
"eslint": "^6.6.0 || ^7.0.0"
},
"dependencies": {
"@eslint/eslintrc": "^0.4.3",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint-plugin-eslint-comments": "^3.2.0",
Expand All @@ -26,7 +27,7 @@
"devDependencies": {
"@mysticatea/eslint-plugin": "file:.",
"codecov": "^3.8.3",
"eslint": "^6.8.0",
"eslint": "^7.32.0",
"globals": "^13.12.0",
"mocha": "^9.1.3",
"npm-run-all": "^4.1.5",
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/configs/_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const { Linter } = require("eslint")
const {
ConfigArrayFactory,
} = require("eslint/lib/cli-engine/config-array-factory")
} = require("@eslint/eslintrc/lib/config-array-factory")
const Validator = require("eslint/lib/shared/config-validator")
const { rules: removedRules } = require("eslint/conf/replacements.json")
const { rules: PluginRulesIndex } = require("@mysticatea/eslint-plugin")
Expand Down

0 comments on commit 23f1e2c

Please sign in to comment.