-
Notifications
You must be signed in to change notification settings - Fork 18
/
.eslintrc
77 lines (76 loc) · 2.54 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
77
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": "./",
"project": ["./tsconfig.json"]
},
"extends": [
"airbnb",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"prettier" // prettier *has* to be the last one, to avoid conflicting rules
],
"ignorePatterns": ["pnpm-lock.yaml", "dist", "coverage"],
"plugins": ["simple-import-sort", "@typescript-eslint"],
"rules": {
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"quotes": ["error", "double"],
"react/react-in-jsx-scope": "off", // next does not require react imports
"import/extensions": "off", // file extension not required when importing
"react/jsx-filename-extension": "off",
"no-restricted-syntax": [
"error",
{
"selector": "ForInStatement",
"message": "for ... in disallowed, use for ... of instead"
}
],
"no-underscore-dangle": "off",
"no-await-in-loop": "off",
"react/jsx-props-no-spreading": "off",
"react/require-default-props": "off",
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"import/first": "warn",
"import/newline-after-import": "warn",
"import/no-duplicates": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/ban-types": "off",
"no-console": [
"error",
{
"allow": ["warn", "error", "debug"]
}
],
"no-continue": "off",
"operator-linebreak": "off",
"max-len": "off",
"array-callback-return": "off",
"implicit-arrow-linebreak": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-restricted-imports": "off",
"no-restricted-exports": "off",
"@typescript-eslint/ban-ts-comment": "off",
// TO FIX:
"import/no-cycle": "off", // pathpidia issue
"import/prefer-default-export": "off",
"@typescript-eslint/no-misused-promises": ["error"],
"@typescript-eslint/no-floating-promises": ["error"],
"class-methods-use-this": "off",
"no-new": "off",
"@typescript-eslint/no-redeclare": "off",
"@typescript-eslint/naming-convention": "off"
},
"settings": {
"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`
}
}
}
}