@@ -52,57 +52,59 @@ module.exports = {
52
52
} ,
53
53
} ,
54
54
55
- overrides : {
56
- files : [ '**/*.ts' , '**/*.tsx' ] ,
57
- parser : '@typescript-eslint/parser' ,
58
- parserOptions : {
59
- ecmaVersion : 2018 ,
60
- sourceType : 'module' ,
61
- ecmaFeatures : {
62
- jsx : true ,
63
- } ,
55
+ overrides : [
56
+ {
57
+ files : [ '**/*.ts' , '**/*.tsx' ] ,
58
+ parser : '@typescript-eslint/parser' ,
59
+ parserOptions : {
60
+ ecmaVersion : 2018 ,
61
+ sourceType : 'module' ,
62
+ ecmaFeatures : {
63
+ jsx : true ,
64
+ } ,
64
65
65
- // typescript-eslint specific options
66
- warnOnUnsupportedTypeScriptVersion : true ,
67
- } ,
68
- plugins : [ '@typescript-eslint' ] ,
69
- // If adding a typescript-eslint version of an existing ESLint rule,
70
- // make sure to disable the ESLint rule here.
71
- rules : {
72
- // TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906)
73
- 'default-case' : 'off' ,
74
- // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291)
75
- 'no-dupe-class-members' : 'off' ,
76
- // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/477)
77
- 'no-undef' : 'off' ,
66
+ // typescript-eslint specific options
67
+ warnOnUnsupportedTypeScriptVersion : true ,
68
+ } ,
69
+ plugins : [ '@typescript-eslint' ] ,
70
+ // If adding a typescript-eslint version of an existing ESLint rule,
71
+ // make sure to disable the ESLint rule here.
72
+ rules : {
73
+ // TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906)
74
+ 'default-case' : 'off' ,
75
+ // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291)
76
+ 'no-dupe-class-members' : 'off' ,
77
+ // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/477)
78
+ 'no-undef' : 'off' ,
78
79
79
- // Add TypeScript specific rules (and turn off ESLint equivalents)
80
- '@typescript-eslint/no-angle-bracket-type-assertion' : 'warn' ,
81
- 'no-array-constructor' : 'off' ,
82
- '@typescript-eslint/no-array-constructor' : 'warn' ,
83
- '@typescript-eslint/no-namespace' : 'error' ,
84
- 'no-use-before-define' : 'off' ,
85
- '@typescript-eslint/no-use-before-define' : [
86
- 'warn' ,
87
- {
88
- functions : false ,
89
- classes : false ,
90
- variables : false ,
91
- typedefs : false ,
92
- } ,
93
- ] ,
94
- 'no-unused-vars' : 'off' ,
95
- '@typescript-eslint/no-unused-vars' : [
96
- 'warn' ,
97
- {
98
- args : 'none' ,
99
- ignoreRestSiblings : true ,
100
- } ,
101
- ] ,
102
- 'no-useless-constructor' : 'off' ,
103
- '@typescript-eslint/no-useless-constructor' : 'warn' ,
80
+ // Add TypeScript specific rules (and turn off ESLint equivalents)
81
+ '@typescript-eslint/no-angle-bracket-type-assertion' : 'warn' ,
82
+ 'no-array-constructor' : 'off' ,
83
+ '@typescript-eslint/no-array-constructor' : 'warn' ,
84
+ '@typescript-eslint/no-namespace' : 'error' ,
85
+ 'no-use-before-define' : 'off' ,
86
+ '@typescript-eslint/no-use-before-define' : [
87
+ 'warn' ,
88
+ {
89
+ functions : false ,
90
+ classes : false ,
91
+ variables : false ,
92
+ typedefs : false ,
93
+ } ,
94
+ ] ,
95
+ 'no-unused-vars' : 'off' ,
96
+ '@typescript-eslint/no-unused-vars' : [
97
+ 'warn' ,
98
+ {
99
+ args : 'none' ,
100
+ ignoreRestSiblings : true ,
101
+ } ,
102
+ ] ,
103
+ 'no-useless-constructor' : 'off' ,
104
+ '@typescript-eslint/no-useless-constructor' : 'warn' ,
105
+ } ,
104
106
} ,
105
- } ,
107
+ ] ,
106
108
107
109
// NOTE: When adding rules here, you need to make sure they are compatible with
108
110
// `typescript-eslint`, as some rules such as `no-array-constructor` aren't compatible.
0 commit comments