-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
63 lines (63 loc) · 2.24 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
module.exports = {
root: true,
ignorePatterns: ["node_modules/*", ".next/*", "out/*", "!.prettierrc"],
extends: ["next/core-web-vitals", "plugin:prettier/recommended"],
rules: {
"react/display-name": "off",
"react/no-unescaped-entities": 0,
"no-unused-vars": ["warn", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
eqeqeq: ["warn", "smart"],
"prettier/prettier": ["warn", {}, { usePrettierrc: true }],
"react-hooks/exhaustive-deps": [
"warn",
{
additionalHooks: "useIsomorphicLayoutEffect",
},
],
},
overrides: [
{
files: ["**/*.ts?(x)"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
extends: [
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-empty-function": ["warn"],
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
"@typescript-eslint/no-floating-promises": ["warn", { ignoreVoid: true, ignoreIIFE: true }],
"@typescript-eslint/no-unused-vars": [
"warn",
{ varsIgnorePattern: "^_", argsIgnorePattern: "^_" },
],
"@typescript-eslint/consistent-type-imports": [
"error",
{ fixStyle: "inline-type-imports" },
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
"ts-expect-error": "allow-with-description",
minimumDescriptionLength: 10,
},
],
},
},
],
};