Skip to content

Commit 2f7b10d

Browse files
Ditch eslint-plugin-prettier and use eslint-config-prettier (#3910)
- We don't need `eslint-plugin-prettier` since we now use Prettier as a formatter. Moreover, it conflicts with the specified rules because it doesn't consider our Prettier configuration. - Use `eslint-config-prettier` to turn off all unnecessary rules that might conflict with Prettier.
1 parent 244dafe commit 2f7b10d

File tree

3 files changed

+5
-88
lines changed

3 files changed

+5
-88
lines changed

eslint.config.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import js from '@eslint/js';
33
import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
44
import tsEslintParser from '@typescript-eslint/parser';
55
import { defineConfig } from 'eslint/config';
6+
import eslintConfigPrettier from 'eslint-config-prettier/flat';
67
import eslintCommentsPlugin from 'eslint-plugin-eslint-comments';
78
import importPlugin from 'eslint-plugin-import';
89
import jsdocPlugin from 'eslint-plugin-jsdoc';
9-
import prettierPlugin from 'eslint-plugin-prettier';
1010
import regexpPlugin from 'eslint-plugin-regexp';
1111
import globals from 'globals';
1212

@@ -25,15 +25,12 @@ const config = [
2525
import: importPlugin,
2626
jsdoc: jsdocPlugin,
2727
regexp: regexpPlugin,
28-
prettier: prettierPlugin,
2928
},
3029
languageOptions: {
3130
ecmaVersion: 'latest',
3231
sourceType: 'module',
3332
},
3433
rules: {
35-
...prettierPlugin.configs.recommended.rules,
36-
3734
'no-use-before-define': ['warn', { 'functions': false, 'classes': false }],
3835
'eqeqeq': ['warn', 'always', { 'null': 'ignore' }],
3936

@@ -262,6 +259,7 @@ const config = [
262259
},
263260
},
264261
},
262+
eslintConfigPrettier,
265263
];
266264

267265
export default defineConfig(replaceErrorsWithWarnings(config));

package-lock.json

Lines changed: 3 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
"eslint-plugin-eslint-comments": "^3.2.0",
8787
"eslint-plugin-import": "^2.31.0",
8888
"eslint-plugin-jsdoc": "^50.6.9",
89-
"eslint-plugin-prettier": "^5.2.6",
9089
"eslint-plugin-regexp": "^2.7.0",
9190
"globals": "^16.0.0",
9291
"gzip-size": "^7.0.0",

0 commit comments

Comments
 (0)