11module . exports = {
2- env : {
3- browser : true
4- } ,
2+ extends : [ 'plugin:prettier/recommended' ] ,
3+ plugins : [ 'prettier' , '@typescript-eslint' ] ,
54 parser : '@typescript-eslint/parser' ,
65 parserOptions : {
7- createDefaultProgram : true ,
8- project : 'tsconfig.json' ,
9- sourceType : 'module'
6+ ecmaVersion : 2018 ,
7+ sourceType : 'module' ,
8+ parser : '@typescript-eslint/parser' ,
9+ project : 'tsconfig.eslint.json' ,
10+ warnOnUnsupportedTypeScriptVersion : false ,
11+ tsconfigRootDir : __dirname ,
1012 } ,
11- plugins : [ '@typescript-eslint' ] ,
1213 rules : {
14+ 'prettier/prettier' : 'warn' ,
1315 '@typescript-eslint/adjacent-overload-signatures' : 'error' ,
1416 '@typescript-eslint/array-type' : 'error' ,
1517 '@typescript-eslint/await-thenable' : 'error' ,
@@ -20,21 +22,21 @@ module.exports = {
2022 '@typescript-eslint/explicit-member-accessibility' : [
2123 'off' ,
2224 {
23- accessibility : 'explicit'
24- }
25+ accessibility : 'explicit' ,
26+ } ,
2527 ] ,
2628 '@typescript-eslint/indent' : [
2729 'error' ,
2830 4 ,
2931 {
3032 FunctionDeclaration : {
31- parameters : 'first'
33+ parameters : 'first' ,
3234 } ,
3335 FunctionExpression : {
34- parameters : 'first'
36+ parameters : 'first' ,
3537 } ,
36- SwitchCase :1
37- }
38+ SwitchCase : 1 ,
39+ } ,
3840 ] ,
3941 '@typescript-eslint/interface-name-prefix' : 'off' ,
4042 '@typescript-eslint/member-delimiter-style' : 'error' ,
@@ -59,8 +61,8 @@ module.exports = {
5961 'error' ,
6062 'single' ,
6163 {
62- avoidEscape : true
63- }
64+ avoidEscape : true ,
65+ } ,
6466 ] ,
6567 '@typescript-eslint/semi' : [ 'error' ] ,
6668 '@typescript-eslint/space-within-parens' : [ 'off' , 'never' ] ,
@@ -86,17 +88,17 @@ module.exports = {
8688 ignoreCase : false ,
8789 ignoreDeclarationSort : true ,
8890 ignoreMemberSort : false ,
89- memberSyntaxSortOrder : [ 'none' , 'all' , 'multiple' , 'single' ]
90- }
91+ memberSyntaxSortOrder : [ 'none' , 'all' , 'multiple' , 'single' ] ,
92+ } ,
9193 ] ,
9294 'linebreak-style' : 'off' ,
9395 'max-classes-per-file' : 'off' ,
9496 'max-len' : [
9597 'off' ,
9698 {
9799 ignorePattern : '^import |^export {(.*?)}' ,
98- code : 200
99- }
100+ code : 200 ,
101+ } ,
100102 ] ,
101103 'new-parens' : 'off' ,
102104 'newline-per-chained-call' : 'off' ,
@@ -126,9 +128,9 @@ module.exports = {
126128 'profile' ,
127129 'profileEnd' ,
128130 'timeStamp' ,
129- 'context'
130- ]
131- }
131+ 'context' ,
132+ ] ,
133+ } ,
132134 ] ,
133135 'no-constant-condition' : 'error' ,
134136 'no-control-regex' : 'off' ,
@@ -143,14 +145,14 @@ module.exports = {
143145 'no-irregular-whitespace' : 'off' ,
144146 'no-multiple-empty-lines' : 'off' ,
145147 'no-new-wrappers' : 'error' ,
146- 'no-redeclare' : 'error' ,
148+ 'no-redeclare' : [ 'error' , { builtinGlobals : false } ] ,
147149 'no-regex-spaces' : 'error' ,
148150 'no-return-await' : 'error' ,
149151 'no-shadow' : [
150152 'off' ,
151153 {
152- hoist : 'all'
153- }
154+ hoist : 'all' ,
155+ } ,
154156 ] ,
155157 'no-throw-literal' : 'error' ,
156158 'no-trailing-spaces' : 'error' ,
@@ -161,8 +163,8 @@ module.exports = {
161163 'error' ,
162164 {
163165 allowTaggedTemplates : true ,
164- allowShortCircuit : true
165- }
166+ allowShortCircuit : true ,
167+ } ,
166168 ] ,
167169 'no-unused-labels' : 'error' ,
168170 'no-var' : 'error' ,
@@ -174,6 +176,6 @@ module.exports = {
174176 radix : 'error' ,
175177 'space-before-function-paren' : 'off' ,
176178 'use-isnan' : 'error' ,
177- 'valid-typeof' : 'off'
178- }
179+ 'valid-typeof' : 'off' ,
180+ } ,
179181} ;
0 commit comments