-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
44 lines (44 loc) · 1.28 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "eslint-comments", "node", "import", "jest"],
parserOptions: {
ecmaVersion: 2020,
},
extends: [
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:node/recommended",
"plugin:jest/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
],
settings: {
node: {
resolvePaths: [__dirname, "node_modules/@types"],
tryExtensions: [".js", ".json", ".node", ".ts"],
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
},
},
rules: {
"node/no-unsupported-features/es-syntax": [
"error",
{ ignores: ["modules"] }, // Will be transpiled by TS anyway
],
"node/no-missing-import": "off", // Handled by eslint-plugin-import
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"import/no-named-as-default-member": "off",
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0 }],
"no-trailing-spaces": "error",
"eol-last": ["error", "always"],
},
};