@commission-on-post/eslint-config-recommended 0.8.2 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,10 +32,10 @@ $ npm install @commission-on-post/eslint-config-recommended -D
32
32
  ### Peer Dependencies
33
33
  | Package | Version |
34
34
  |---------|---------|
35
- | @typescript-eslint/eslint-plugin | >=6.2.1 |
36
- | @typescript-eslint/parser | >=6.2.1 |
37
- | eslint | >=8.46.0 |
38
- | typescript | >=5.1.6 |
35
+ | @typescript-eslint/eslint-plugin | >=8.18.0 |
36
+ | @typescript-eslint/parser | >=8.18.0 |
37
+ | eslint | >=9.16.0 |
38
+ | typescript | >=5.7.2 |
39
39
  ---
40
40
  ### Workspace Setup
41
41
  #### Suggested VS Code Extensions
package/config.js ADDED
@@ -0,0 +1,148 @@
1
+ export default {
2
+ languageOptions: {
3
+ parserOptions: {
4
+ projectService: true,
5
+ tsconfigRootDir: import.meta.dirname,
6
+ },
7
+ },
8
+ ignores: ["*/*.mjs"],
9
+ rules: {
10
+ "@typescript-eslint/adjacent-overload-signatures": "error",
11
+ "@typescript-eslint/consistent-generic-constructors": ["error", "type-annotation"],
12
+ "@typescript-eslint/explicit-function-return-type": "error",
13
+ "@typescript-eslint/explicit-module-boundary-types": "error",
14
+
15
+ "@typescript-eslint/naming-convention": ["warn", {
16
+ selector: ["classProperty", "objectLiteralProperty", "parameter", "variable"],
17
+ format: ["camelCase", "snake_case"],
18
+ leadingUnderscore: "allow",
19
+ }, {
20
+ selector: ["classMethod", "function", "typeMethod"],
21
+ format: ["camelCase"],
22
+ leadingUnderscore: "allow",
23
+ }, {
24
+ selector: ["interface", "class"],
25
+ format: ["PascalCase"],
26
+ }, {
27
+ selector: ["class"],
28
+ format: ["PascalCase", "camelCase"],
29
+ }],
30
+
31
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
32
+ "@typescript-eslint/no-confusing-void-expression": "error",
33
+ "@typescript-eslint/no-dynamic-delete": "error",
34
+ "no-empty-function": "off",
35
+ "@typescript-eslint/no-empty-function": "warn",
36
+ "@typescript-eslint/no-empty-interface": "error",
37
+ "@typescript-eslint/no-inferrable-types": "error",
38
+ "no-invalid-this": "off",
39
+ "@typescript-eslint/no-invalid-this": "error",
40
+ "@typescript-eslint/no-invalid-void-type": "error",
41
+
42
+ "@typescript-eslint/no-misused-promises": ["error", {
43
+ checksVoidReturn: false,
44
+ }],
45
+
46
+ "@typescript-eslint/no-mixed-enums": "error",
47
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
48
+ "@typescript-eslint/no-require-imports": "error",
49
+ "no-shadow": "off",
50
+ "@typescript-eslint/no-shadow": "error",
51
+ "@typescript-eslint/no-unnecessary-condition": "error",
52
+ "@typescript-eslint/no-unsafe-argument": "off",
53
+ "@typescript-eslint/no-unsafe-assignment": "off",
54
+ "@typescript-eslint/no-unsafe-call": "off",
55
+ "@typescript-eslint/no-unsafe-member-access": "off",
56
+ "no-unused-expressions": "off",
57
+ "@typescript-eslint/no-unused-expressions": "error",
58
+ "no-unused-vars": "warn",
59
+ "@typescript-eslint/no-unused-vars": "warn",
60
+ "no-use-before-define": "off",
61
+ "@typescript-eslint/no-use-before-define": "warn",
62
+ "@typescript-eslint/no-useless-constructor": "error",
63
+ "@typescript-eslint/no-useless-empty-export": "error",
64
+ "@typescript-eslint/non-nullable-type-assertion-style": "error",
65
+ "@typescript-eslint/parameter-properties": "error",
66
+ "@typescript-eslint/prefer-for-of": "warn",
67
+ "@typescript-eslint/prefer-function-type": "error",
68
+ "@typescript-eslint/prefer-includes": "error",
69
+ "@typescript-eslint/prefer-optional-chain": "error",
70
+ "@typescript-eslint/prefer-readonly": "error",
71
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
72
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
73
+ "@typescript-eslint/promise-function-async": "error",
74
+ "@typescript-eslint/require-array-sort-compare": "warn",
75
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
76
+ "@typescript-eslint/unified-signatures": "error",
77
+ "array-callback-return": "warn",
78
+ "no-const-assign": "warn",
79
+ "no-constant-binary-expression": "error",
80
+ "no-debugger": "warn",
81
+ "no-fallthrough": "warn",
82
+
83
+ "no-irregular-whitespace": ["error", {
84
+ skipStrings: true,
85
+ skipTemplates: true,
86
+ skipJSXText: true,
87
+ }],
88
+
89
+ "no-new-native-nonconstructor": "error",
90
+ "no-promise-executor-return": "warn",
91
+ "no-self-compare": "warn",
92
+ "no-sparse-arrays": "warn",
93
+ "no-template-curly-in-string": "off",
94
+ "no-unreachable-loop": "error",
95
+ "no-unsafe-negation": "warn",
96
+ "no-unused-private-class-members": "warn",
97
+ "require-atomic-updates": "warn",
98
+ "block-scoped-var": "warn",
99
+ "capitalized-comments": "error",
100
+ "class-methods-use-this": "warn",
101
+ complexity: "warn",
102
+ "default-case": "error",
103
+ "default-case-last": "warn",
104
+ eqeqeq: "error",
105
+
106
+ "max-depth": ["warn", {
107
+ max: 5,
108
+ }],
109
+
110
+ "max-params": ["warn", {
111
+ max: 4,
112
+ }],
113
+
114
+ "no-alert": "warn",
115
+ "no-caller": "error",
116
+ "no-case-declarations": "warn",
117
+ "no-console": "warn",
118
+ "no-div-regex": "warn",
119
+ "no-else-return": "error",
120
+ "no-empty": "warn",
121
+ "no-empty-static-block": "warn",
122
+ "no-extra-label": "error",
123
+ "no-global-assign": "error",
124
+ "no-implied-eval": "error",
125
+ "no-label-var": "error",
126
+ "no-lone-blocks": "warn",
127
+ "no-lonely-if": "error",
128
+ "no-multi-str": "warn",
129
+ "no-return-assign": "error",
130
+ "no-sequences": "error",
131
+ "no-undef-init": "error",
132
+ "no-undefined": "warn",
133
+ "no-unneeded-ternary": "error",
134
+ "no-useless-call": "warn",
135
+ "no-useless-computed-key": "error",
136
+ "no-useless-rename": "error",
137
+ "no-useless-return": "error",
138
+ "no-var": "error",
139
+ "object-shorthand": "error",
140
+ "prefer-arrow-callback": "error",
141
+ "prefer-const": "warn",
142
+ "prefer-exponentiation-operator": "error",
143
+ "prefer-numeric-literals": "error",
144
+ "prefer-object-has-own": "error",
145
+ "prefer-object-spread": "error",
146
+ "require-unicode-regexp": "warn",
147
+ }
148
+ }
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "@commission-on-post/eslint-config-recommended",
3
- "version": "0.8.2",
3
+ "version": "1.0.1",
4
4
  "description": "ESLint config using recommended state practices for the Commission on POST",
5
- "main": "index.js",
5
+ "main": "./config.js",
6
6
  "author": "Ryan W. Bell",
7
7
  "license": "UNLICENSED",
8
+ "type": "module",
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "git+https://github.com/Commission-on-POST/eslint_recommended_style.git"
11
12
  },
12
13
  "homepage": "https://github.com/Commission-on-POST/eslint_recommended_style#readme",
13
14
  "scripts": {
15
+ "repack": "(del *.tgz 2> NUL || exit 0) && npm pack",
16
+ "build": "tsc --pretty && echo REMEMBER TO COPY ./eslint.config.mjs TO DIST FOLDER",
14
17
  "start": "node ."
15
18
  },
16
19
  "keywords": [
@@ -20,17 +23,16 @@
20
23
  "tslint",
21
24
  "recommended"
22
25
  ],
23
- "peerDependencies": {
24
- "@typescript-eslint/eslint-plugin": ">=6.2.1",
25
- "@typescript-eslint/parser": ">=6.2.1",
26
- "eslint": ">=8.46.0",
27
- "typescript": ">=5.1.6"
28
- },
29
26
  "devDependencies": {
30
- "@typescript-eslint/eslint-plugin": "^6.2.1",
31
- "@typescript-eslint/parser": "^6.2.1",
32
- "eslint": "^8.46.0",
33
- "eslint-plugin-import": "^2.28.0",
34
- "typescript": "^5.1.6"
27
+ "@eslint/js": "^9.16.0",
28
+ "eslint": "^9.16.0",
29
+ "typescript": "^5.7.2",
30
+ "typescript-eslint": "^8.18.0"
31
+ },
32
+ "peerDependencies": {
33
+ "@eslint/js": ">=9.16.0",
34
+ "eslint": ">=9.16.0",
35
+ "typescript": ">=5.7.2",
36
+ "typescript-eslint": ">=8.18.0"
35
37
  }
36
38
  }
package/.eslintrc.js DELETED
@@ -1,1081 +0,0 @@
1
- module.exports = {
2
- parser: "@typescript-eslint/parser",
3
- parserOptions: {
4
- "project": "./tsconfig.json"
5
- },
6
- extends: [
7
- "eslint:recommended",
8
- "plugin:import/recommended",
9
- "plugin:@typescript-eslint/recommended",
10
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
11
- ],
12
- plugins: [
13
- "@typescript-eslint",
14
- "import"
15
- ],
16
- rules: {
17
- /*
18
- * ESLint provides rules, but it doesn't support TypeScript syntax; it may crash, ignores the syntax, or falsely report against the rule.
19
- * For these cases, typescript-eslint creates extension rules; rules within the plugin that has the same functionality, but also supports TypeScript.
20
- */
21
- "@typescript-eslint/brace-style": [
22
- "warn",
23
- "1tbs",
24
- {
25
- "allowSingleLine": false
26
- }
27
- ],
28
- "@typescript-eslint/comma-dangle": [
29
- "warn",
30
- "never"
31
- ],
32
- "@typescript-eslint/comma-spacing": [
33
- "warn",
34
- {
35
- "after": true,
36
- "before": false
37
- }
38
- ],
39
- "@typescript-eslint/default-param-last": [
40
- "error"
41
- ],
42
- "@typescript-eslint/dot-notation": [
43
- "off"
44
- // This was turned off because .catch was being transformed to ["catch"]
45
- // "warn",
46
- // {
47
- // "allowIndexSignaturePropertyAccess": true,
48
- // "allowKeywords": false,
49
- // "allowPrivateClassPropertyAccess": false,
50
- // "allowProtectedClassPropertyAccess": false
51
- // }
52
- ],
53
- "@typescript-eslint/func-call-spacing": [
54
- "warn",
55
- "never"
56
- ],
57
- "@typescript-eslint/indent": [
58
- "warn",
59
- 4
60
- ],
61
- "@typescript-eslint/init-declarations": [
62
- "error",
63
- "always"
64
- ],
65
- "@typescript-eslint/no-unsafe-argument": [
66
- "off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
67
- ],
68
- "@typescript-eslint/no-unsafe-call": [
69
- "off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
70
- ],
71
- "@typescript-eslint/no-unsafe-member-access": [
72
- "off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
73
- ],
74
- "@typescript-eslint/no-unsafe-assignment": [
75
- "off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
76
- ],
77
- "@typescript-eslint/keyword-spacing": [
78
- "warn",
79
- {
80
- "overrides": {
81
- "from": { "before": true, "after": true },
82
- "as": { "before": true, "after": true }
83
- // { keyword: {before: <boolean>, after: <boolean>}}
84
- // "abstract", "as", "async", "await", "boolean", "break", "byte", "case", "catch", "char",
85
- // "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum",
86
- // "export", "extends", "false", "final", "finally", "float", "for", "from", "function", "get",
87
- // "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long",
88
- // "native", "new", "null", "of", "package", "private", "protected", "public", "return", "set",
89
- // "short", "static", "super", "switch", "synchronized", "this", "throw", "throws", "transient",
90
- // "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"
91
- },
92
- "after": true,
93
- "before": false
94
- }
95
- ],
96
- "@typescript-eslint/lines-between-class-members": [
97
- "warn",
98
- "always",
99
- {
100
- "exceptAfterSingleLine": true
101
- }
102
- ],
103
- "@typescript-eslint/no-array-constructor": [
104
- "warn"
105
- ],
106
- "@typescript-eslint/no-dupe-class-members": [
107
- "error"
108
- ],
109
- "import/no-duplicates": [
110
- "warn",
111
- {
112
- "prefer-inline": true
113
- }
114
- ],
115
- "@typescript-eslint/no-empty-function": [
116
- "warn",
117
- {
118
- "allow": [
119
- "arrowFunctions",
120
- "generatorFunctions",
121
- "generatorMethods",
122
- "constructors",
123
- "asyncMethods"
124
- ]
125
- }
126
- ],
127
- "@typescript-eslint/no-extra-parens": [
128
- "off"
129
- ],
130
- "@typescript-eslint/no-extra-semi": [
131
- "warn"
132
- ],
133
- "@typescript-eslint/no-implied-eval": [
134
- "error"
135
- ],
136
- "@typescript-eslint/no-inferrable-types": [
137
- "off"
138
- ],
139
- "@typescript-eslint/no-invalid-this": [
140
- "error"
141
- ],
142
- "@typescript-eslint/no-loop-func": [
143
- "error"
144
- ],
145
- "@typescript-eslint/no-loss-of-precision": [
146
- "error"
147
- ],
148
- "@typescript-eslint/unbound-method":[
149
- "off"
150
- ],
151
- "@typescript-eslint/no-magic-numbers": [
152
- "warn",
153
- {
154
- "ignore": [
155
- -1,
156
- 0,
157
- 1,
158
- 2,
159
- 69,
160
- 420
161
- ]
162
- }
163
- ],
164
- "@typescript-eslint/no-redeclare": [
165
- "error",
166
- {
167
- "builtinGlobals": true,
168
- "ignoreDeclarationMerge": true
169
- }
170
- ],
171
- "@typescript-eslint/no-restricted-imports": [
172
- "off"
173
- ],
174
- "@typescript-eslint/no-shadow": [
175
- "warn" // This rule might cause some issues, feel free to disable
176
- ],
177
- "@typescript-eslint/no-throw-literal": [
178
- "warn"
179
- ],
180
- "@typescript-eslint/no-unused-expressions": [
181
- "warn"
182
- ],
183
- "@typescript-eslint/no-unused-vars": [
184
- "warn",
185
- {
186
- //"varsIgnorePattern": ,
187
- "args": "none", // With restful request chains this rule gets a bit verbose when set to anything else
188
- //"argsIgnorePattern": ,
189
- "caughtErrors": "none",
190
- //"caughtErrorsIgnorePattern":
191
- "vars": "all", //. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.
192
- "ignoreRestSiblings": false
193
- }
194
- ],
195
- "@typescript-eslint/no-use-before-define": [
196
- "error",
197
- {
198
- "classes": false,
199
- "enums": true,
200
- "functions": false,
201
- "ignoreTypeReferences": true,
202
- "typedefs": true,
203
- "variables": true
204
- }
205
- ],
206
- "@typescript-eslint/no-useless-constructor": [
207
- "off"
208
- ],
209
- "@typescript-eslint/object-curly-spacing": [
210
- "warn",
211
- "always"
212
- ],
213
- "@typescript-eslint/padding-line-between-statements": [
214
- "off" // If inconsistent spacing between functions, returns, or class members starts to become an issue consider revisiting.
215
- ],
216
- "@typescript-eslint/quotes": [
217
- "warn",
218
- "double"
219
- ],
220
- "@typescript-eslint/require-await": [
221
- "error"
222
- ],
223
- "@typescript-eslint/return-await": [
224
- "off"
225
- ],
226
- "@typescript-eslint/semi": [
227
- "warn",
228
- "always"
229
- ],
230
- "@typescript-eslint/space-before-function-paren": [
231
- "warn",
232
- {
233
- "anonymous": "never",
234
- "asyncArrow": "always",
235
- "named": "never"
236
- }
237
- ],
238
- "@typescript-eslint/space-infix-ops": [
239
- "warn",
240
- {
241
- "int32Hint": true
242
- }
243
- ],
244
- "array-bracket-newline": [
245
- "warn",
246
- "consistent"
247
- ],
248
- "array-bracket-spacing": [
249
- "warn",
250
- "always",
251
- {
252
- "arraysInArrays": false,
253
- "objectsInArrays": true,
254
- "singleValue": false
255
- }
256
- ],
257
- "arrow-body-style": [
258
- "warn",
259
- "as-needed"
260
- ],
261
- "arrow-parens": [
262
- "warn",
263
- "always"
264
- ],
265
- "arrow-spacing": [
266
- "warn",
267
- {
268
- "after": true,
269
- "before": true
270
- }
271
- ],
272
- "block-spacing": [
273
- "warn",
274
- "always"
275
- ],
276
- "camelcase": [
277
- "warn",
278
- {
279
- "properties": "always",
280
- "ignoreDestructuring": false, // You may need to change this if importing from a third part library and using the spread operator.
281
- "ignoreGlobals": true,
282
- "ignoreImports": false // You may need to disable this if convention dictates importing as non-camelcase
283
- }
284
- ],
285
- "comma-style": [
286
- "warn",
287
- "last"
288
- ],
289
- "complexity": [
290
- "error",
291
- 15
292
- ],
293
- "computed-property-spacing": [
294
- "warn",
295
- "always"
296
- ],
297
- "curly": [
298
- "warn",
299
- "all"
300
- ],
301
- "default-case": [
302
- "warn"
303
- ],
304
- "default-case-last": [
305
- "error"
306
- ],
307
- "dot-location": [
308
- "warn",
309
- "property"
310
- ],
311
- "eol-last": [
312
- "warn",
313
- "always"
314
- ],
315
- "eqeqeq": [
316
- "warn",
317
- "always"
318
- ],
319
- "func-style": [
320
- "error",
321
- "declaration",
322
- {
323
- "allowArrowFunctions": true
324
- }
325
- ],
326
- "function-call-argument-newline": [
327
- "warn",
328
- "consistent"
329
- ],
330
- "function-paren-newline": [
331
- "warn",
332
- "multiline"
333
- ],
334
- "generator-star-spacing": [
335
- "warn",
336
- {
337
- "after": true,
338
- "before": true
339
- }
340
- ],
341
- "implicit-arrow-linebreak": [
342
- "warn",
343
- "beside"
344
- ],
345
- "jsx-quotes": [
346
- "warn",
347
- "prefer-double"
348
- ],
349
- "key-spacing": [
350
- "warn",
351
- {
352
- "align": "colon", // This may become obnoxious consider other settings before removing
353
- "mode": "minimum",
354
- "afterColon": true,
355
- "beforeColon": false
356
- }
357
-
358
- ],
359
- "linebreak-style": [
360
- "warn",
361
- "windows"
362
- ],
363
- "max-classes-per-file": [
364
- "warn",
365
- 1
366
- ],
367
- "max-len": [
368
- "warn",
369
- {
370
- "code": 160,
371
- "tabWidth": 4,
372
- "ignoreComments": true,
373
- "ignoreRegExpLiterals": true,
374
- "ignoreStrings": true,
375
- "ignoreTemplateLiterals": true,
376
- "ignoreTrailingComments": true,
377
- "ignoreUrls": true
378
- }
379
- ],
380
- "max-nested-callbacks": [
381
- "warn",
382
- 8
383
- ],
384
- "max-statements-per-line": [
385
- "warn",
386
- {
387
- "max": 1
388
- }
389
- ],
390
- "multiline-ternary": [
391
- "error",
392
- "always-multiline"
393
- ],
394
- "new-parens": [
395
- "error",
396
- "always"
397
- ],
398
- "newline-per-chained-call": [
399
- "error",
400
- {
401
- "ignoreChainWithDepth": 3
402
- }
403
- ],
404
- "no-alert": [
405
- "warn"
406
- ],
407
- "no-caller": [
408
- "error"
409
- ],
410
- "no-confusing-arrow": [
411
- "error",
412
- {
413
- "allowParens": true
414
- }
415
- ],
416
- "no-console": [
417
- "warn"
418
- ],
419
- "no-continue": [
420
- "error"
421
- ],
422
- "no-else-return": [
423
- "warn",
424
- {
425
- "allowElseIf": true
426
- }
427
- ],
428
- "no-empty": [
429
- "warn",
430
- {
431
- "allowEmptyCatch": true
432
- }
433
- ],
434
- "no-eval": [
435
- "error"
436
- ],
437
- "no-extend-native": [
438
- "error"
439
- ],
440
- "no-extra-boolean-cast": [
441
- "warn"
442
- ],
443
- "no-floating-decimal": [
444
- "error"
445
- ],
446
- "no-iterator": [
447
- "error"
448
- ],
449
- "no-labels": [
450
- "error"
451
- ],
452
- "no-lone-blocks": [
453
- "error"
454
- ],
455
- "no-lonely-if": [
456
- "warn"
457
- ],
458
- "no-multi-assign": [
459
- "error"
460
- ],
461
- "no-multi-spaces": [
462
- "warn",
463
- {
464
- "exceptions": {
465
- "ImportDeclaration": true,
466
- "Property": true,
467
- "VariableDeclarator": true
468
- },
469
- "ignoreEOLComments": true
470
- }
471
- ],
472
- "no-multi-str": [
473
- "warn"
474
- ],
475
- "no-multiple-empty-lines": [
476
- "warn",
477
- {
478
- "max": 2,
479
- "maxBOF": 1,
480
- "maxEOF": 2
481
- }
482
- ],
483
- "no-new-func": [
484
- "error"
485
- ],
486
- "no-new-object": [
487
- "error"
488
- ],
489
- "no-new-wrappers": [
490
- "warn"
491
- ],
492
- "no-octal-escape": [
493
- "error"
494
- ],
495
- "no-proto": [
496
- "error"
497
- ],
498
- "no-return-assign": [
499
- "warn"
500
- ],
501
- "no-script-url": [
502
- "error"
503
- ],
504
- "no-sequences": [
505
- "error"
506
- ],
507
- "no-trailing-spaces": [
508
- "warn",
509
- {
510
- "ignoreComments": true,
511
- "skipBlankLines": true
512
- }
513
- ],
514
- "no-unneeded-ternary": [
515
- "warn"
516
- ],
517
- "no-useless-computed-key": [
518
- "warn" // This turns "var a = { [0]: 0 };" into var a = { 0: 0 }; May be annoying
519
- ],
520
- "no-useless-concat": [
521
- "warn"
522
- ],
523
- "no-useless-rename": [
524
- "error"
525
- ],
526
- "no-useless-return": [
527
- "warn"
528
- ],
529
- "no-var": [
530
- "error"
531
- ],
532
- "no-void": [
533
- "error"
534
- ],
535
- "no-warning-comments": [
536
- "warn",
537
- {
538
- "location": "anywhere",
539
- "terms": [
540
- "todo",
541
- "hack",
542
- "fixme",
543
- "yikes"
544
- ]
545
- }
546
- ],
547
- "no-whitespace-before-property": [
548
- "warn"
549
- ],
550
- "nonblock-statement-body-position": [
551
- "warn",
552
- "below"
553
- ],
554
- "object-curly-newline": [
555
- "warn",
556
- {
557
- "ExportDeclaration": "never",
558
- "ImportDeclaration": "never",
559
- "ObjectExpression": {
560
- "minProperties": 2 // Updated from 3
561
- },
562
- "ObjectPattern": {
563
- "multiline": true
564
- }
565
- }
566
- ],
567
- /*
568
- *"object-shorthand": [1
569
- * "warn",
570
- * "consistent-as-needed"
571
- *],
572
- */
573
- "one-var": [
574
- "error",
575
- {
576
- "const": "never",
577
- "let": "never",
578
- "var": "never",
579
- "separateRequires": true
580
- }
581
- ],
582
- "operator-assignment": [
583
- "warn",
584
- "always"
585
- ],
586
- "prefer-arrow-callback": [
587
- "warn"
588
- ],
589
- "prefer-const": [
590
- "warn"
591
- ],
592
- "prefer-exponentiation-operator": [
593
- "error"
594
- ],
595
- "prefer-numeric-literals": [
596
- "error"
597
- ],
598
- "prefer-object-spread": [
599
- "warn"
600
- ],
601
- "prefer-promise-reject-errors": [
602
- "error"
603
- ],
604
- "prefer-rest-params": [
605
- "error"
606
- ],
607
- "prefer-spread": [
608
- "warn"
609
- ],
610
- "prefer-template": [
611
- "warn"
612
- ],
613
- "quote-props": [
614
- "warn",
615
- "as-needed" // more options required?
616
- ],
617
- "radix": [
618
- "error",
619
- "as-needed"
620
- ],
621
- "require-unicode-regexp": [
622
- "off"
623
- ],
624
- "rest-spread-spacing": [
625
- "error",
626
- "never"
627
- ],
628
- "semi-spacing": [
629
- "warn",
630
- {
631
- "after": true,
632
- "before": false
633
- }
634
- ],
635
- "semi-style": [
636
- "warn",
637
- "last"
638
- ],
639
- "sort-imports": [
640
- "off"
641
- // This rule has proven overly obnoxious for not much gain in code readability
642
- // The auto-fixer for this rule cannot reorder imports just sub-modules
643
- // "warn",
644
- // {
645
- // "allowSeparatedGroups": true,
646
- // "ignoreCase": true
647
- // }
648
- ],
649
- "sort-keys": [
650
- "warn",
651
- "asc",
652
- {
653
- "minKeys": 8,
654
- "caseSensitive": false,
655
- "natural": false
656
- }
657
- ],
658
- "space-before-blocks": [
659
- "warn",
660
- {
661
- "classes": "never",
662
- "functions": "never",
663
- "keywords": "never"
664
- }
665
- ],
666
- "space-in-parens": [
667
- "warn",
668
- "never"
669
- ],
670
- "space-unary-ops": [
671
- "warn",
672
- {
673
- "nonwords": false,
674
- "words": true
675
- }
676
- ],
677
- "spaced-comment": [
678
- "warn",
679
- "always",
680
- {
681
- "exceptions": [
682
- "-",
683
- "+",
684
- "~"
685
- ]
686
- }
687
- ],
688
- "switch-colon-spacing": [
689
- "warn",
690
- {
691
- "after": true,
692
- "before": false
693
- }
694
- ],
695
- "symbol-description": [
696
- "warn"
697
- ],
698
- "template-curly-spacing": [
699
- "warn",
700
- "never"
701
- ],
702
- "template-tag-spacing": [
703
- "warn",
704
- "never"
705
- ],
706
- "unicode-bom": [
707
- "error",
708
- "never"
709
- ],
710
- "wrap-iife": [
711
- "error",
712
- "outside",
713
- {
714
- "functionPrototypeMethods": false
715
- }
716
- ],
717
- "wrap-regex": [
718
- "error"
719
- ],
720
- "yield-star-spacing": [
721
- "warn",
722
- "both"
723
- ],
724
- "yoda": [
725
- "warn",
726
- "never",
727
- {
728
- "onlyEquality": true
729
- }
730
- ],
731
- // ~~~~~ Rules exclusive to the typescript eslint extension (not inherited from recommended)
732
- "@typescript-eslint/array-type": [
733
- "warn",
734
- {
735
- "default": "array",
736
- "readonly": "array"
737
- }
738
- ],
739
- "@typescript-eslint/ban-tslint-comment": [
740
- "off"
741
- ],
742
- "@typescript-eslint/class-literal-property-style": [
743
- "warn",
744
- "fields"
745
- ],
746
- "@typescript-eslint/consistent-indexed-object-style": [
747
- "warn",
748
- "record"
749
- ],
750
- "@typescript-eslint/consistent-type-assertions": [
751
- "error",
752
- {
753
- "assertionStyle": "as",
754
- "objectLiteralTypeAssertions": "never"
755
- }
756
- ],
757
- "@typescript-eslint/consistent-type-definitions": [
758
- "warn",
759
- "interface"
760
- ],
761
- "@typescript-eslint/consistent-type-exports": [
762
- "off"
763
- ],
764
- "@typescript-eslint/consistent-type-imports": [
765
- "warn",
766
- {
767
- "prefer": "no-type-imports",
768
- "disallowTypeAnnotations": false
769
- }
770
- ],
771
- "@typescript-eslint/explicit-function-return-type": [
772
- "warn",
773
- {
774
- "allowExpressions": false,
775
- "allowTypedFunctionExpressions": true,
776
- "allowHigherOrderFunctions": false,
777
- "allowDirectConstAssertionInArrowFunctions": true,
778
- "allowConciseArrowFunctionExpressionsStartingWithVoid": true
779
- }
780
- ],
781
- "@typescript-eslint/explicit-member-accessibility": [
782
- "error",
783
- {
784
- "accessibility": "explicit",
785
- "overrides": {
786
- "constructors": "no-public" // Might want to add arrow functions here
787
- }
788
- }
789
- ],
790
- "@typescript-eslint/explicit-module-boundary-types": [
791
- "warn"
792
- ], // Not really sure how you are able to have non-strict with other rules but guess i'll turn this on
793
- "@typescript-eslint/member-delimiter-style": [
794
- "warn"
795
- ],
796
- "@typescript-eslint/method-signature-style": [
797
- "warn",
798
- "method"
799
- ],
800
- // "@typescript-eslint/naming-convention":[], // I think other rules cover camelCase so this just feel redundant
801
- "@typescript-eslint/no-base-to-string": [
802
- "warn"
803
- ],
804
- "@typescript-eslint/no-confusing-non-null-assertion": [
805
- "warn"
806
- ],
807
- "@typescript-eslint/no-confusing-void-expression": [
808
- "error",
809
- {
810
- "ignoreArrowShorthand": true,
811
- "ignoreVoidOperator": true
812
- }
813
- ],
814
- "@typescript-eslint/no-dynamic-delete": [
815
- "error"
816
- ], // If you are disabling this rule consider changing your data structure
817
- "@typescript-eslint/no-extraneous-class": [
818
- "off"
819
- ], // I don't think we have developers using namespaces as classes, but if they wanted to I don't think the linter should stop them
820
- "@typescript-eslint/no-invalid-void-type": [
821
- "warn",
822
- {
823
- "allowInGenericTypeArguments": true,
824
- "allowAsThisParameter": false
825
- }
826
- ],
827
- "@typescript-eslint/no-meaningless-void-operator": [
828
- "error"
829
- ],
830
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": [
831
- "warn"
832
- ], // Wrap your expression in parenthesis
833
- "@typescript-eslint/parameter-properties": [
834
- "warn",
835
- {
836
- "allow":[ "private readonly" ],
837
- "prefer": "parameter-property"
838
- }
839
- ], // I like parameter properties
840
- "@typescript-eslint/no-require-imports": [
841
- "error"
842
- ],
843
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": [
844
- "warn",
845
- {
846
- "allowComparingNullableBooleansToTrue": false,
847
- "allowComparingNullableBooleansToFalse": false
848
- }
849
- ], // I feel a bit torn about this one. I like the verbosity of an explicit comparison sometimes but it does add code bloat and points of failure with nully-operators
850
- /*"@typescript-eslint/no-unnecessary-condition":["warn", { "allowConstantLoopConditions": true, "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": true}]*/
851
- "@typescript-eslint/no-unnecessary-qualifier": [
852
- "warn"
853
- ],
854
- "@typescript-eslint/no-unnecessary-type-arguments": [
855
- "off"
856
- ],
857
- "@typescript-eslint/non-nullable-type-assertion-style": [
858
- "warn"
859
- ],
860
- "@typescript-eslint/prefer-enum-initializers": [
861
- "warn"
862
- ],
863
- "@typescript-eslint/prefer-for-of": [
864
- "warn"
865
- ],
866
- "@typescript-eslint/prefer-function-type": [
867
- "warn"
868
- ], // Feel free to turn this off (although you may consider an interface restructuring first)
869
- "@typescript-eslint/prefer-includes": [
870
- "warn"
871
- ],
872
- "@typescript-eslint/prefer-literal-enum-member": [
873
- "off"
874
- ], // values are locally scoped
875
- "@typescript-eslint/prefer-nullish-coalescing": [
876
- "off" // This rule was getting very annoying so it has been turned off going forward
877
- ],
878
- "@typescript-eslint/prefer-optional-chain": [
879
- "warn"
880
- ],
881
- "@typescript-eslint/prefer-readonly": [
882
- "warn",
883
- {
884
- "onlyInlineLambdas": false
885
- }
886
- ],
887
- "@typescript-eslint/prefer-readonly-parameter-types": [
888
- "off"
889
- ], // This level of verbosity for primitive types is excessive (assume anything you give to a function may be mutated)
890
- "@typescript-eslint/prefer-reduce-type-parameter": [
891
- "warn"
892
- ], // Use the built in template functionality
893
- "@typescript-eslint/prefer-regexp-exec": [
894
- "off"
895
- ],
896
- "@typescript-eslint/prefer-return-this-type": [
897
- "error"
898
- ],
899
- "@typescript-eslint/prefer-string-starts-ends-with": [
900
- "warn"
901
- ],
902
- "@typescript-eslint/prefer-ts-expect-error": [
903
- "warn"
904
- ],
905
- "@typescript-eslint/promise-function-async": [
906
- "warn",
907
- {
908
- "allowAny": true,
909
- "allowedPromiseNames": [
910
- "Thenable"
911
- ],
912
- "checkArrowFunctions": true,
913
- "checkFunctionDeclarations": true,
914
- "checkFunctionExpressions": true,
915
- "checkMethodDeclarations": true
916
- }
917
- ],
918
- "@typescript-eslint/require-array-sort-compare": [
919
- "warn",
920
- {
921
- "ignoreStringArrays": true
922
- }
923
- ],
924
- "@typescript-eslint/sort-type-constituents": [
925
- // This rule has been turned off because the settings are not granular enough to allow for `let x: string | string[] = undefined`
926
- // It does not allow you to allow for arrays after literals without changing every group order.
927
- // Developers will have to sort their own keys if they care about order.
928
- "off"
929
- ],
930
- "@typescript-eslint/strict-boolean-expressions": [
931
- "off"
932
- ],
933
- "@typescript-eslint/switch-exhaustiveness-check": [
934
- "warn"
935
- ],
936
- "@typescript-eslint/type-annotation-spacing": [
937
- "warn",
938
- {
939
- before: false,
940
- after: true
941
- }
942
- ],
943
- "@typescript-eslint/typedef": [
944
- "warn",
945
- {
946
- "arrayDestructuring": true,
947
- "arrowParameter": true,
948
- "memberVariableDeclaration": true,
949
- "objectDestructuring": true,
950
- "parameter": true,
951
- "propertyDeclaration": true,
952
- "variableDeclaration": true,
953
- "variableDeclarationIgnoreFunction": true
954
- }
955
- ],
956
- "@typescript-eslint/unified-signatures": [
957
- "warn"
958
- ],
959
- // This rule was added later and
960
- "@typescript-eslint/restrict-template-expressions": [
961
- "warn",
962
- {
963
- "allowNumber": true,
964
- "allowBoolean": true,
965
- "allowAny": true,
966
- "allowNullish": true,
967
- "allowRegExp": true,
968
- "allowNever": true
969
- }
970
- ],
971
- // ~~~~~ Rules set to "off" because the tslinter overrides their base behavior ~~~~~
972
- "comma-dangle": [
973
- "off"
974
- ],
975
- "brace-style": [
976
- "off"
977
- ],
978
- "comma-spacing": [
979
- "off"
980
- ],
981
- "default-param-last": [
982
- "off"
983
- ],
984
- "dot-notation": [
985
- "off"
986
- ],
987
- "func-call-spacing": [
988
- "off"
989
- ],
990
- "indent": [
991
- "off"
992
- ],
993
- "init-declarations": [
994
- "off"
995
- ],
996
- "keyword-spacing": [
997
- "off"
998
- ],
999
- "lines-between-class-members": [
1000
- "off"
1001
- ],
1002
- "no-array-constructor": [
1003
- "off"
1004
- ],
1005
- "no-dupe-class-members": [
1006
- "off"
1007
- ],
1008
- "no-duplicate-imports": [
1009
- "off"
1010
- ],
1011
- "no-empty-function": [
1012
- "off"
1013
- ],
1014
- "no-extra-parens": [
1015
- "off"
1016
- ],
1017
- "no-extra-semi": [
1018
- "off"
1019
- ],
1020
- "no-implied-eval": [
1021
- "off"
1022
- ],
1023
- "no-invalid-this": [
1024
- "off"
1025
- ],
1026
- "no-loop-func": [
1027
- "off"
1028
- ],
1029
- "no-loss-of-precision": [
1030
- "off"
1031
- ],
1032
- "no-magic-numbers": [
1033
- "off"
1034
- ],
1035
- "no-redeclare": [
1036
- "off"
1037
- ],
1038
- "no-restricted-imports": [
1039
- "off"
1040
- ],
1041
- "no-shadow": [
1042
- "off"
1043
- ],
1044
- "no-throw-literal": [
1045
- "off"
1046
- ],
1047
- "no-unused-expressions": [
1048
- "off"
1049
- ],
1050
- "no-unused-vars": [
1051
- "off"
1052
- ],
1053
- "no-use-before-define": [
1054
- "off"
1055
- ],
1056
- "no-useless-constructor": [
1057
- "off"
1058
- ],
1059
- "object-curly-spacing": [
1060
- "off"
1061
- ],
1062
- "padding-line-between-statements": [
1063
- "off"
1064
- ],
1065
- "quotes": [
1066
- "off"
1067
- ],
1068
- "require-await": [
1069
- "off"
1070
- ],
1071
- "semi": [
1072
- "off"
1073
- ],
1074
- "space-before-function-paren": [
1075
- "off"
1076
- ],
1077
- "space-infix-ops": [
1078
- "off"
1079
- ]
1080
- }
1081
- }
package/index.js DELETED
@@ -1,3 +0,0 @@
1
- const eslintrc = require('./.eslintrc.js');
2
-
3
- module.exports = eslintrc;