Skip to content

Commit

Permalink
Fix #839 Migrate deprecated core rules
Browse files Browse the repository at this point in the history
Migrate to https://github.com/eslint-stylistic/eslint-stylistic

- lines-between-class-members
- lines-around-comment and @typescript-eslint/lines-around-comment
- max-len
- no-tabs
- padding-line-between-statements
- quotes and @typescript-eslint/quotes
- spaced-comment

Fix #839
  • Loading branch information
EvgenyOrekhov committed Jun 9, 2024
1 parent 8b1eb10 commit 9df5a4a
Show file tree
Hide file tree
Showing 5 changed files with 435 additions and 36 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Base framework-agnostic config.

| Plugin | Enabled rules |
| --------------------------------------------------------------------------------------------------------- | ------------: |
| [ESLint core rules](https://eslint.org/docs/rules/) | 180 |
| [ESLint core rules](https://eslint.org/docs/rules/) | 173 |
| [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) | 102 |
| [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp) | 80 |
| [eslint-plugin-putout](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout) | 73 |
Expand All @@ -215,6 +215,7 @@ Base framework-agnostic config.
| [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) | 13 |
| [eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security) | 12 |
| [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist) | 7 |
| [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) | 7 |
| [eslint-plugin-eslint-comments](https://github.com/mysticatea/eslint-plugin-eslint-comments) | 6 |
| [eslint-plugin-sdl](https://github.com/microsoft/eslint-plugin-sdl) | 5 |
| [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func) | 3 |
Expand Down
66 changes: 36 additions & 30 deletions base.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"sonar",
"simple-import-sort",
"perfectionist",
"compat"
"compat",
"@stylistic"
],

"parserOptions": {
Expand Down Expand Up @@ -170,7 +171,6 @@
"no-buffer-constructor": "error",
"getter-return": "error",
"strict": "error",
"lines-between-class-members": "error",
"max-classes-per-file": "error",
"no-misleading-character-class": "error",
"require-atomic-updates": "error",
Expand Down Expand Up @@ -267,7 +267,6 @@
{ "allowImplicit": false, "checkForEach": true }
],
"no-extra-boolean-cast": ["error", { "enforceForLogicalOperands": true }],
"spaced-comment": ["error", "always", { "block": { "balanced": true } }],
"multiline-comment-style": ["error", "separate-lines"],
"no-unsafe-optional-chaining": [
"error",
Expand Down Expand Up @@ -349,32 +348,6 @@
"top"
],

"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "*" },
{ "blankLine": "any", "prev": "expression", "next": "expression" },
{ "blankLine": "always", "prev": "iife", "next": "iife" },
{ "blankLine": "any", "prev": "*", "next": ["case"] },
{ "blankLine": "any", "prev": "directive", "next": "directive" },
{ "blankLine": "any", "prev": "const", "next": "const" },
{ "blankLine": "any", "prev": "let", "next": "let" },
{ "blankLine": "any", "prev": "var", "next": "var" },
{ "blankLine": "any", "prev": "import", "next": "import" },
{ "blankLine": "any", "prev": "export", "next": "export" },
{
"blankLine": "always",
"prev": "*",
"next": ["cjs-import", "cjs-export"]
},
{
"blankLine": "always",
"prev": ["cjs-import", "cjs-export"],
"next": "*"
},
{ "blankLine": "any", "prev": "cjs-import", "next": "cjs-import" },
{ "blankLine": "any", "prev": "cjs-export", "next": "cjs-export" }
],

"promise/param-names": "error",
"promise/always-return": "error",
"promise/no-return-wrap": "error",
Expand Down Expand Up @@ -889,6 +862,38 @@

"compat/compat": "error",

"@stylistic/lines-between-class-members": "error",
"@stylistic/spaced-comment": [
"error",
"always",
{ "block": { "balanced": true } }
],
"@stylistic/padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "*" },
{ "blankLine": "any", "prev": "expression", "next": "expression" },
{ "blankLine": "always", "prev": "iife", "next": "iife" },
{ "blankLine": "any", "prev": "*", "next": "case" },
{ "blankLine": "any", "prev": "directive", "next": "directive" },
{ "blankLine": "any", "prev": "const", "next": "const" },
{ "blankLine": "any", "prev": "let", "next": "let" },
{ "blankLine": "any", "prev": "var", "next": "var" },
{ "blankLine": "any", "prev": "import", "next": "import" },
{ "blankLine": "any", "prev": "export", "next": "export" },
{
"blankLine": "always",
"prev": "*",
"next": ["cjs-import", "cjs-export"]
},
{
"blankLine": "always",
"prev": ["cjs-import", "cjs-export"],
"next": "*"
},
{ "blankLine": "any", "prev": "cjs-import", "next": "cjs-import" },
{ "blankLine": "any", "prev": "cjs-export", "next": "cjs-export" }
],

"putout/putout": [
"error",
{
Expand Down Expand Up @@ -1023,7 +1028,7 @@

"@html-eslint/sort-attrs": ["error", { "priority": [] }],

"spaced-comment": "off",
"@stylistic/spaced-comment": "off",
"no-inline-comments": "off",
"import/unambiguous": "off",
"putout/putout": "off"
Expand Down Expand Up @@ -1061,6 +1066,7 @@
"toml/array-element-newline": "off",
"toml/array-bracket-spacing": "off",

"@stylistic/spaced-comment": "off",
"import/unambiguous": "off",
"putout/putout": "off"
}
Expand Down
Loading

0 comments on commit 9df5a4a

Please sign in to comment.