-
Notifications
You must be signed in to change notification settings - Fork 109
/
.eslintrc
76 lines (76 loc) · 2.36 KB
/
.eslintrc
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./packages/*/tsconfig.json"
},
"plugins": ["@typescript-eslint", "eslint-plugin-tsdoc", "deprecation", "import"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"eqeqeq": ["error", "always", { "null": "ignore" }],
"no-duplicate-imports": "error",
"object-shorthand": ["error", "always"],
"deprecation/deprecation": "warn",
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/explicit-module-boundary-types": 2,
"@typescript-eslint/no-unused-vars": [
1,
{
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"import/no-unresolved": ["error", { "ignore": ["^__temporal_"] }],
// TypeScript compilation already ensures that named imports exist in the referenced module
"import/named": "off",
"import/default": "error",
"import/namespace": "error",
"import/no-absolute-path": "error",
"import/no-self-import": "error",
"import/no-cycle": "error",
"import/no-useless-path-segments": "error",
"import/no-relative-packages": "error",
"import/export": "error",
"import/no-named-as-default": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/unambiguous": "error",
"import/first": "error",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"]
}
],
"import/newline-after-import": "error",
"import/no-unassigned-import": "error",
"import/no-named-default": "error",
"no-restricted-imports": [
"error",
{
"patterns": ["@temporalio/*/src/*"]
}
]
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {
// always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like
// `@types/unist`
"alwaysTryTypes": true,
"project": ["packages/*/tsconfig.json"]
}
},
"import/internal-regex": "^@temporalio/"
}
}