Skip to content

Commit 136b575

Browse files
committedApr 13, 2023
Upgrade TypeScript and ESLint
Existing eslint config was not compatible with ESLint v8. Pulled in various good plugins and recommended configs, instead.
1 parent ced66db commit 136b575

12 files changed

+4159
-906
lines changed
 

‎.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
coverage
12
dist
23
lib

‎.eslintrc.yml

+68-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,75 @@
1-
# ESLint config
2-
# http://eslint.org/docs/user-guide/configuring
3-
# https://jstools.dev/eslint-config/
4-
51
root: true
62

73
extends:
8-
- "@jsdevtools"
4+
- "eslint:recommended"
5+
- "plugin:@typescript-eslint/recommended"
6+
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
7+
- "plugin:@typescript-eslint/strict"
8+
- "plugin:import/recommended"
9+
- "plugin:import/typescript"
10+
- "plugin:jsdoc/recommended-typescript"
11+
- "plugin:n/recommended"
12+
- "plugin:promise/recommended"
13+
- "plugin:sonarjs/recommended"
14+
- "plugin:unicorn/recommended"
915
- "prettier"
1016

17+
parserOptions:
18+
project:
19+
- "tsconfig.eslint.json"
20+
21+
settings:
22+
import/resolver:
23+
typescript: true
24+
node: true
25+
1126
env:
27+
es2021: true
1228
node: true
29+
30+
overrides:
31+
- files: ["**/*.js"]
32+
rules:
33+
"@typescript-eslint/no-var-requires": "off"
34+
"unicorn/prefer-module": "off"
35+
36+
- files: ["test/**/*"]
37+
env:
38+
mocha: true
39+
rules:
40+
sonarjs/no-duplicate-string: "off"
41+
42+
rules:
43+
n/no-unpublished-import: ["error", { "allowModules": ["@actions/core"] }]
44+
45+
# temporary rule overrides
46+
# TODO(mc, 2023-04-12): fix problems, remove overrides, and remove --quiet
47+
prefer-const: "warn"
48+
no-regex-spaces: "warn"
49+
"@typescript-eslint/no-floating-promises": "warn"
50+
"@typescript-eslint/no-unsafe-argument": "warn"
51+
"@typescript-eslint/no-unsafe-assignment": "warn"
52+
"@typescript-eslint/no-unsafe-call": "warn"
53+
"@typescript-eslint/no-unsafe-member-access": "warn"
54+
"@typescript-eslint/no-unsafe-return": "warn"
55+
"@typescript-eslint/require-await": "warn"
56+
"@typescript-eslint/restrict-plus-operands": "warn"
57+
"@typescript-eslint/restrict-template-expressions": "warn"
58+
"@typescript-eslint/unbound-method": "warn"
59+
n/no-missing-import: "warn"
60+
n/no-missing-require: "warn"
61+
n/no-process-exit: "warn"
62+
unicorn/better-regex: "warn"
63+
unicorn/catch-error-name: "warn"
64+
unicorn/import-style: "warn"
65+
unicorn/no-array-push-push: "warn"
66+
unicorn/no-process-exit: "warn"
67+
unicorn/no-useless-undefined: "warn"
68+
unicorn/prefer-export-from: "warn"
69+
unicorn/prefer-module: "warn"
70+
unicorn/prefer-node-protocol: "warn"
71+
unicorn/prefer-optional-catch-binding: "warn"
72+
unicorn/prefer-spread: "warn"
73+
unicorn/prefer-top-level-await: "warn"
74+
unicorn/prevent-abbreviations: "warn"
75+
unicorn/text-encoding-identifier-case: "warn"

‎.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
coverage
12
dist
23
lib
34
package-lock.json

0 commit comments

Comments
 (0)
Failed to load comments.