-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
71 lines (68 loc) · 1.87 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
60
61
62
63
64
65
66
67
68
69
70
71
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
"ignorePatterns": ["node_modules", "__tests__"],
"plugins": ["@typescript-eslint", "import", "unused-imports"],
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"rules": {
// @typescript-eslint
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
],
"@typescript-eslint/typedef": "error",
// import
"import/extensions": ["error", { "extensions": [".ts", ".tsx"] }],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false
}
],
// unused-imports
"unused-imports/no-unused-imports": "error",
// eslint
"camelcase": "warn",
"dot-notation": "warn",
"eol-last": "warn",
"max-len": [
"warn",
{
"code": 120,
"tabWidth": 2,
"comments": 120,
"ignoreComments": false,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"no-var": "warn",
"no-await-in-loop": "error",
"no-return-await": "off",
"no-console": "warn",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"prefer-const": "warn",
"require-await": "warn",
"sort-imports": "off",
"sort-keys": "off",
"spaced-comment": "warn"
}
}