11module . exports = {
2+ "extends" : [
3+ "eslint:recommended" ,
4+ "plugin:@typescript-eslint/eslint-recommended"
5+ //"plugin:@typescript-eslint/strict", // I want to enable this. Lots of little changes will happen.
6+ ] ,
27 "env" : {
38 "browser" : true ,
49 "es6" : true ,
@@ -7,16 +12,29 @@ module.exports = {
712 "parser" : "@typescript-eslint/parser" ,
813 "parserOptions" : {
914 "project" : "tsconfig.json" ,
10- "sourceType" : "module"
15+ "ecmaVersion" : 2022 ,
16+ "sourceType" : "module" ,
17+ "warnOnUnsupportedTypeScriptVersion" : false ,
1118 } ,
1219 "plugins" : [
1320 "@typescript-eslint" ,
14- "@typescript-eslint/tslint" ,
1521 "eslint-plugin-jsdoc" ,
16- "@typescript-eslint/eslint-plugin-tslint " ,
22+ "@typescript-eslint/eslint-plugin" ,
1723 "eslint-plugin-import" ,
24+ "eslint-plugin-header"
1825 ] ,
1926 "rules" : {
27+ "indent" : [
28+ "warn" ,
29+ 4 ,
30+ {
31+ "SwitchCase" : 1 ,
32+ "ObjectExpression" : "first"
33+ }
34+ ] ,
35+ "@typescript-eslint/indent" : [
36+ "error" , 4
37+ ] ,
2038 "@typescript-eslint/adjacent-overload-signatures" : "error" ,
2139 "@typescript-eslint/array-type" : "error" ,
2240 "@typescript-eslint/await-thenable" : "error" ,
@@ -41,6 +59,11 @@ module.exports = {
4159 }
4260 }
4361 ] ,
62+ "no-case-declarations" : "off" ,
63+ "no-useless-escape" : "off" ,
64+ "no-floating-decimal" : "error" ,
65+ "keyword-spacing" : [ "error" , { "before" : true , "overrides" : { "this" : { "before" : false } } } ] ,
66+ "arrow-spacing" : [ "error" , { "before" : true , "after" : true } ] ,
4467 "@typescript-eslint/no-for-in-array" : "error" ,
4568 "@typescript-eslint/no-misused-new" : "error" ,
4669 "@typescript-eslint/no-misused-promises" : "error" ,
@@ -57,8 +80,15 @@ module.exports = {
5780 "@typescript-eslint/triple-slash-reference" : "error" ,
5881 "@typescript-eslint/type-annotation-spacing" : "error" ,
5982 "@typescript-eslint/unified-signatures" : "error" ,
83+ "@typescript-eslint/no-floating-promises" : "error" ,
84+ "@typescript-eslint/method-signature-style" : [ "error" , "method" ] ,
85+ "no-unused-vars" : "off" ,
86+ "@typescript-eslint/no-unused-vars" : [ "error" , { "argsIgnorePattern" : "^_" } ] ,
87+ "@typescript-eslint/no-unnecessary-boolean-literal-compare" : "error" ,
6088 "arrow-body-style" : "error" ,
6189 "comma-dangle" : "error" ,
90+ "comma-spacing" : "off" ,
91+ "@typescript-eslint/comma-spacing" : "error" ,
6292 "constructor-super" : "error" ,
6393 "curly" : "error" ,
6494 "eol-last" : "error" ,
@@ -82,7 +112,6 @@ module.exports = {
82112 "no-irregular-whitespace" : "error" ,
83113 "no-multiple-empty-lines" : [ "error" , { "max" : 1 , "maxEOF" : 1 , "maxBOF" : 0 } ] ,
84114 "no-new-wrappers" : "error" ,
85- "no-redeclare" : "error" ,
86115 "no-return-await" : "error" ,
87116 "no-sequences" : "error" ,
88117 "no-sparse-arrays" : "error" ,
@@ -103,54 +132,25 @@ module.exports = {
103132 "never"
104133 ] ,
105134 "spaced-comment" : [
106- "error" ,
107- "always"
135+ "off" ,
136+ "always" ,
137+ { "line" : { "exceptions" : [ "/" ] } } // triple slash directives
108138 ] ,
109139 "use-isnan" : "error" ,
110140 "valid-typeof" : "error" ,
111141 "yoda" : "error" ,
112- "@typescript-eslint/tslint/config" : [
113- "error" ,
114- {
115- "rules" : {
116- "encoding" : true ,
117- "file-header" : [
118- true ,
119- ".*"
120- ] ,
121- "import-spacing" : true ,
122- "match-default-export-name" : true ,
123- "no-boolean-literal-compare" : true ,
124- "no-mergeable-namespace" : true ,
125- "no-reference-import" : true ,
126- "no-unnecessary-callback-wrapper" : true ,
127- "number-literal-format" : true ,
128- "one-line" : [
129- true ,
130- "check-catch" ,
131- "check-finally" ,
132- "check-else" ,
133- "check-open-brace" ,
134- "check-whitespace"
135- ] ,
136- "prefer-method-signature" : true ,
137- "prefer-while" : true ,
138- "typedef" : [
139- true ,
140- "variable-declaration" ,
141- "call-signature" ,
142- "variable-declaration-ignore-function"
143- ] ,
144- "whitespace" : [
145- true ,
146- "check-branch" ,
147- "check-operator" ,
148- "check-separator" ,
149- "check-preblock" ,
150- "check-type"
151- ]
152- }
153- }
154- ]
142+ "space-infix-ops" : "error" ,
143+ "header/header" : [
144+ "warn" ,
145+ "block" ,
146+ [
147+ " --------------------------------------------------------------------------------------------" ,
148+ " * Copyright (c) Microsoft Corporation. All Rights Reserved." ,
149+ " * See 'LICENSE' in the project root for license information." ,
150+ " * ------------------------------------------------------------------------------------------ "
151+
152+ ] ,
153+ ] ,
154+
155155 }
156156} ;
0 commit comments