Skip to content

Commit

Permalink
fix: remove @eslint/compat usage after eslint-plugin-import v2.31.0 t…
Browse files Browse the repository at this point in the history
…hat supports ESLint v9
  • Loading branch information
alexey-koran committed Oct 4, 2024
1 parent 8e7de26 commit a112e19
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ pnpm i -D @alexey-koran/eslint-config
| | | |
| | `Other` | |
| globals | global identifiers from different JavaScript environments | [v15.10.\*](https://github.com/sindresorhus/globals) |
| @eslint/compat | ESLint compatibility utilities | [v1.1.\*](https://github.com/eslint/rewrite) |
| | | |

| Package name | Description | Version |
Expand Down
16 changes: 6 additions & 10 deletions configs/base.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { fixupPluginRules } from '@eslint/compat';
import stylisticJS from '@stylistic/eslint-plugin-js';
import pluginImport from 'eslint-plugin-import';
import pluginImportConfig from 'eslint-plugin-import/config/recommended.js';
import stylisticJSPlugin from '@stylistic/eslint-plugin-js';
import importPlugin from 'eslint-plugin-import';
import importPluginConfig from 'eslint-plugin-import/config/recommended.js';
import prettierPlugin from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-plugin-prettier/recommended';
import typescriptEslint from 'typescript-eslint';
Expand All @@ -24,16 +23,13 @@ export const baseConfig = {
reportUnusedDisableDirectives: 'error',
},
plugins: {
// TODO: Remove after eslint-plugin-import update
// fixupPluginRules wraps each rule in the given plugin using fixupRule()
// and returns a new object that represents the plugin with the fixed-up rules
import: fixupPluginRules(pluginImport),
import: importPlugin,
prettier: prettierPlugin,
'@stylistic/js': stylisticJS,
'@stylistic/js': stylisticJSPlugin,
},
rules: {
...prettierConfig.rules,
...pluginImportConfig.rules,
...importPluginConfig.rules,
...jsRules,
...importRules,
...stylisticRules.js,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
},
"homepage": "https://github.com/alexey-koran/eslint-config#readme",
"dependencies": {
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.11.1",
"@stylistic/eslint-plugin-js": "^2.8.0",
"@stylistic/eslint-plugin-jsx": "^2.8.0",
Expand Down
9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a112e19

Please sign in to comment.