-
Notifications
You must be signed in to change notification settings - Fork 24
/
.eslintrc.js
74 lines (67 loc) · 2.08 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
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
/* eslint-disable */
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "import"],
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"prettier"
],
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
rules: {
"@typescript-eslint/camelcase": ["off", { properties: "never" }],
"@typescript-eslint/quotes": "off",
camelcase: "off",
"comma-dangle": "off",
"no-extra-semi": "error",
"no-irregular-whitespace": "error",
"no-lonely-if": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": "error",
"no-trailing-spaces": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
"object-curly-spacing": ["error", "always"],
semi: ["warn", "never"],
"import/no-anonymous-default-export": ["off"],
"react-hooks/rules-of-hooks": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
"react/display-name": ["off"]
},
settings: {
react: {
version: "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
typescript: {
alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
// Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
// use <root>/path/to/folder/tsconfig.json
project: "path/to/folder",
// Multiple tsconfigs (Useful for monorepos)
// use a glob pattern
project: "packages/*/tsconfig.json",
// use an array
project: [
"packages/module-a/tsconfig.json",
"packages/module-b/tsconfig.json"
],
// use an array of glob patterns
project: ["packages/*/tsconfig.json", "other-packages/*/tsconfig.json"]
}
}
}
}