-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
59 lines (59 loc) · 1.89 KB
/
.eslintrc.json
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
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"env": {
"browser": true,
"node": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:mithril/recommended",
"plugin:cypress/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"prettier",
"@typescript-eslint"
],
"rules": {
// Disable the rule for all files to allow for mixed js/ts.
// https://github.com/typescript-eslint/typescript-eslint/blob/v3.9.1/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
"@typescript-eslint/explicit-module-boundary-types": "off",
// Don't allow relative imports. VSCode will also use absolute imports by default.
"no-restricted-imports": [
"error",
{
"patterns": [
"./*",
"../*",
"!./*.css", // Allow relative imports for CSS.
"!../*.css", // Allow relative imports for CSS.
"!./*.scss", // Allow relative imports for SCSS.
"!../*.scss" // Allow relative imports for SCSS.
]
}
]
},
"overrides": [
{
// Enable the rule specifically for TypeScript files to allow for mixed js/ts.
"files": [
"*.ts",
"*.tsx"
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": [
"error"
]
}
}
]
}