1
- const prettier = {
2
- singleQuote : true ,
3
- jsxSingleQuote : true ,
4
- printWidth : 120 ,
5
- } ;
6
-
7
1
/** @type {import('eslint').Linter.Config } */
8
2
module . exports = {
9
3
parser : '@typescript-eslint/parser' ,
@@ -21,20 +15,15 @@ module.exports = {
21
15
version : 'detect' ,
22
16
} ,
23
17
linkComponents : [
24
- { name : 'Link' , linkAttribute : 'to' } ,
25
- { name : 'NavLink' , linkAttribute : 'to' } ,
18
+ { name : 'Link' , linkAttribute : 'to' } ,
19
+ { name : 'NavLink' , linkAttribute : 'to' } ,
26
20
] ,
27
21
} ,
28
22
env : {
29
23
browser : true ,
30
24
es6 : true ,
31
25
} ,
32
- plugins : [
33
- 'react' ,
34
- 'react-hooks' ,
35
- 'prettier' ,
36
- '@typescript-eslint' ,
37
- ] ,
26
+ plugins : [ 'react' , 'react-hooks' , 'prettier' , '@typescript-eslint' ] ,
38
27
extends : [
39
28
// 'standard',
40
29
'eslint:recommended' ,
@@ -44,7 +33,7 @@ module.exports = {
44
33
] ,
45
34
rules : {
46
35
eqeqeq : 'error' ,
47
- 'prettier/prettier' : [ 'error' , prettier ] ,
36
+ 'prettier/prettier' : [ 'error' , { } , { usePrettierrc : true } ] ,
48
37
// TypeScript can infer this significantly better than eslint ever can.
49
38
'react/prop-types' : 0 ,
50
39
'react/display-name' : 0 ,
@@ -56,7 +45,7 @@ module.exports = {
56
45
// @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
57
46
'no-use-before-define' : 0 ,
58
47
'@typescript-eslint/no-use-before-define' : 'warn' ,
59
- '@typescript-eslint/no-unused-vars' : [ 'warn' , { argsIgnorePattern : '^_' , varsIgnorePattern : '^_' } ] ,
60
- '@typescript-eslint/ban-ts-comment' : [ 'error' , { 'ts-expect-error' : 'allow-with-description' } ] ,
61
- }
48
+ '@typescript-eslint/no-unused-vars' : [ 'warn' , { argsIgnorePattern : '^_' , varsIgnorePattern : '^_' } ] ,
49
+ '@typescript-eslint/ban-ts-comment' : [ 'error' , { 'ts-expect-error' : 'allow-with-description' } ] ,
50
+ } ,
62
51
} ;
0 commit comments