Commit | Line | Data |
---|---|---|
7dde0b73 | 1 | { |
6af9012e JB |
2 | "root": true, |
3 | "parser": "@typescript-eslint/parser", | |
4 | "parserOptions": { | |
5 | "project": "./tsconfig.json" | |
6 | }, | |
7dde0b73 JB |
7 | "extends": [ |
8 | "eslint:recommended", | |
6af9012e | 9 | "plugin:@typescript-eslint/recommended", |
3340259a | 10 | "plugin:@typescript-eslint/recommended-requiring-type-checking", |
31eab523 JB |
11 | "plugin:import/errors", |
12 | "plugin:import/warnings", | |
13 | "plugin:import/typescript", | |
3340259a | 14 | "plugin:jsdoc/recommended" |
7dde0b73 JB |
15 | ], |
16 | "plugins": [ | |
31eab523 JB |
17 | "import", |
18 | "jsdoc", | |
19 | "@typescript-eslint" | |
7dde0b73 | 20 | ], |
4592b693 JB |
21 | "settings": { |
22 | "jsdoc": { | |
23 | "mode": "typescript" | |
24 | } | |
25 | }, | |
7dde0b73 | 26 | "rules": { |
6af9012e JB |
27 | "indent": "off", |
28 | "@typescript-eslint/indent": [ | |
29 | "error", | |
7dde0b73 JB |
30 | 2, |
31 | { | |
04cb0ea4 | 32 | "SwitchCase": 1, |
394ddcc6 JB |
33 | "CallExpression": { |
34 | "arguments": 1 | |
35 | }, | |
04cb0ea4 | 36 | "FunctionDeclaration": { |
394ddcc6 JB |
37 | "parameters": 2, |
38 | "body": 1 | |
04cb0ea4 JB |
39 | }, |
40 | "FunctionExpression": { | |
394ddcc6 JB |
41 | "parameters": 2, |
42 | "body": 1 | |
04cb0ea4 | 43 | } |
7dde0b73 JB |
44 | } |
45 | ], | |
6af9012e JB |
46 | "@typescript-eslint/array-type": "off", |
47 | "semi": "off", | |
48 | "@typescript-eslint/semi": [ | |
49 | "error", | |
50 | "always" | |
51 | ], | |
52 | "space-before-blocks": [ | |
53 | "error", | |
54 | "always" | |
55 | ], | |
56 | "@typescript-eslint/no-empty-function": [ | |
57 | "warn", | |
58 | { | |
59 | "allow": [ | |
60 | "arrowFunctions", | |
61 | "methods" | |
62 | ] | |
63 | } | |
64 | ], | |
65 | "@typescript-eslint/member-ordering": "error", | |
66 | "@typescript-eslint/await-thenable": "error", | |
67 | "@typescript-eslint/no-floating-promises": "error", | |
68 | "@typescript-eslint/promise-function-async": "error", | |
69 | "@typescript-eslint/no-misused-promises": "error", | |
70 | "curly": "error", | |
71 | "brace-style": "error", | |
72 | "eqeqeq": [ | |
73 | "error", | |
74 | "always" | |
75 | ], | |
76 | "no-else-return": "error", | |
77 | "no-eq-null": "error", | |
78 | "no-undefined": "error", | |
79 | "no-extra-bind": "error", | |
80 | "no-lone-blocks": "error", | |
81 | "no-multi-spaces": "error", | |
82 | "no-empty": "error", | |
83 | "no-return-assign": [ | |
84 | "error", | |
85 | "always" | |
86 | ], | |
87 | "no-useless-catch": "error", | |
88 | "no-useless-return": "error", | |
3f08a2b1 JB |
89 | "no-shadow": "off", // This one is generating false positive no-shadow errors on exported/const enums |
90 | "@typescript-eslint/no-shadow": "error", | |
6af9012e JB |
91 | "no-multiple-empty-lines": [ |
92 | "error", | |
93 | { | |
94 | "max": 2, | |
95 | "maxEOF": 1 | |
96 | } | |
97 | ], | |
98 | "block-spacing": "error", | |
56a74dae JB |
99 | // "capitalized-comments": [ |
100 | // "error", | |
101 | // "always", | |
102 | // { | |
103 | // "ignoreConsecutiveComments": true, | |
104 | // "ignorePattern": "pragma|ignored" | |
105 | // } | |
106 | // ], | |
6af9012e JB |
107 | "eol-last": [ |
108 | "error", | |
109 | "always" | |
110 | ], | |
111 | "consistent-this": [ | |
112 | "error", | |
113 | "self" | |
114 | ], | |
115 | "func-call-spacing": [ | |
116 | "error", | |
117 | "never" | |
118 | ], | |
119 | "keyword-spacing": [ | |
120 | "error" | |
121 | ], | |
89f8216b JB |
122 | "id-blacklist": [ |
123 | "error", | |
124 | "any", | |
125 | "Number", | |
126 | "number", | |
127 | "String", | |
128 | "string", | |
129 | "Boolean", | |
130 | "boolean", | |
131 | "Undefined", | |
132 | "undefined", | |
133 | "Symbol", | |
134 | "symbol" | |
135 | ], | |
6af9012e JB |
136 | "linebreak-style": [ |
137 | "error", | |
138 | "unix" | |
139 | ], | |
84393381 JB |
140 | "max-len": [ |
141 | "warn", | |
142 | { | |
143 | "code": 180, | |
144 | "ignoreComments": true, | |
145 | "ignoreUrls": true, | |
146 | "ignoreStrings": true, | |
147 | "ignoreTemplateLiterals": true, | |
148 | "ignoreRegExpLiterals": true, | |
149 | "ignorePattern": "(^(import|export)|(public|private))\\s.+;" | |
150 | } | |
6af9012e JB |
151 | ], |
152 | "no-lonely-if": "error", | |
153 | "no-trailing-spaces": "error", | |
154 | "no-whitespace-before-property": "error", | |
155 | "space-before-function-paren": [ | |
156 | "error", | |
157 | { | |
158 | "anonymous": "never", | |
159 | "named": "never", | |
160 | "asyncArrow": "always" | |
161 | } | |
162 | ], | |
163 | "space-in-parens": [ | |
164 | "error", | |
165 | "never" | |
166 | ], | |
167 | "space-infix-ops": "error", | |
168 | "space-unary-ops": "error", | |
169 | "spaced-comment": [ | |
170 | "error", | |
171 | "always" | |
172 | ], | |
173 | "switch-colon-spacing": "error", | |
174 | "arrow-body-style": [ | |
175 | "error", | |
176 | "as-needed" | |
177 | ], | |
178 | "arrow-parens": [ | |
179 | "error", | |
180 | "always" | |
181 | ], | |
182 | "arrow-spacing": "error", | |
183 | "no-duplicate-imports": "error", | |
184 | "no-var": "error", | |
185 | "prefer-const": "error", | |
186 | "sort-imports": [ | |
187 | "warn", | |
188 | { | |
189 | "ignoreCase": false, | |
190 | "ignoreDeclarationSort": false, | |
191 | "ignoreMemberSort": false, | |
192 | "memberSyntaxSortOrder": [ | |
193 | "none", | |
194 | "all", | |
195 | "multiple", | |
196 | "single" | |
197 | ] | |
198 | } | |
199 | ], | |
200 | "object-curly-spacing": [ | |
201 | "error", | |
202 | "always" | |
203 | ], | |
204 | "lines-between-class-members": [ | |
205 | "error", | |
206 | "always", | |
207 | { | |
208 | "exceptAfterSingleLine": true | |
209 | } | |
210 | ], | |
211 | "quotes": [ | |
212 | "error", | |
213 | "single" | |
84393381 | 214 | ] |
d1c056a1 JB |
215 | }, |
216 | "overrides": [ | |
217 | { | |
218 | "files": [ | |
219 | "*.js" | |
220 | ], | |
221 | "extends": "plugin:node/recommended", | |
222 | "rules": { | |
394ddcc6 | 223 | "node/shebang": "off", |
d1c056a1 JB |
224 | "@typescript-eslint/no-unused-vars": "off", |
225 | "@typescript-eslint/no-var-requires": "off" | |
226 | } | |
227 | } | |
228 | ] | |
7dde0b73 | 229 | } |