You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Split eslint and prettier
As recommended at https://prettier.io/docs/en/integrating-with-linters.html
* Fix vs config
* Fix linter issues
* Run prettier on everything
* Fix lint cmd
* Don't check git ignored files with prettier
Copy file name to clipboardExpand all lines: .eslintrc.cjs
+20-30Lines changed: 20 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ module.exports = {
6
6
},
7
7
extends: [
8
8
'@nuxtjs/eslint-config-typescript',
9
-
// Enable recommended rules for typescript
9
+
// Enable typescript-specific recommended rules
10
10
'plugin:@typescript-eslint/recommended',
11
-
'prettier',
12
-
'plugin:prettier/recommended',
13
11
'plugin:nuxt/recommended',
12
+
// Turns off all rules that are unnecessary or might conflict with Prettier (needs to be last)
13
+
'prettier',
14
14
],
15
15
plugins: ['unused-imports'],
16
16
rules: {
@@ -23,8 +23,8 @@ module.exports = {
23
23
'ts-ignore': 'allow-with-description',
24
24
},
25
25
],
26
-
// Report unused imports
27
-
'unused-imports/no-unused-imports': 'error',
26
+
// Don't report unused imports (this is handled by prettier)
27
+
'unused-imports/no-unused-imports': 'off',
28
28
// Report unused variables (except the ones prefixed with an underscore)
29
29
'unused-imports/no-unused-vars': [
30
30
'warn',
@@ -35,18 +35,12 @@ module.exports = {
35
35
argsIgnorePattern: '^_',
36
36
},
37
37
],
38
-
'prettier/prettier': [
39
-
'error',
40
-
{
41
-
endOfLine: 'lf',
42
-
},
43
-
],
44
38
// Ensure void operator is not used, except for variable assignment or function return (might be handy for promises)
45
39
'no-void': ['error',{allowAsStatement: true}],
46
40
// Demote this to warning as long as we are still using cjs modules
47
41
'import/named': 'warn',
48
-
// Import order is normally handled by prettier, but sometimes there are conflicts: https://github.com/simonhaenisch/prettier-plugin-organize-imports/issues/65
49
-
'import/order': 'warn',
42
+
// Import order is handled by prettier (which is incompatible with this rule: https://github.com/simonhaenisch/prettier-plugin-organize-imports/issues/65)
0 commit comments