-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
108 lines (108 loc) · 3.13 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
"root": true,
"env": { "browser": true, "es2020": true },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
"next/core-web-vitals"
],
"parser": "@typescript-eslint/parser",
"parserOptions": { "ecmaVersion": "latest", "sourceType": "module" },
"plugins": ["react", "@typescript-eslint", "import"],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/consistent-type-imports": "error",
"arrow-body-style": ["error", "as-needed"],
"import/extensions": [
"error",
"ignorePackages",
{ "ts": "never", "tsx": "never" }
],
"import/no-default-export": 2,
"import/no-unresolved": "off",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
["parent", "sibling"],
"index",
"object"
],
"pathGroups": [
{ "pattern": "@/**", "group": "internal" },
{ "pattern": "@/../**", "group": "internal" }
],
"pathGroupsExcludedImportTypes": ["builtin"],
"newlines-between": "always",
"alphabetize": { "order": "asc" }
}
],
"import/prefer-default-export": 0,
"import/newline-after-import": ["error", { "count": 1 }],
"import/no-duplicates": ["error", { "considerQueryString": true }],
"no-empty-function": ["error", { "allow": ["arrowFunctions"] }],
"no-unused-vars": "off",
"react/display-name": 0,
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-filename-extension": [0],
"react/jsx-props-no-spreading": [0],
"react/jsx-curly-brace-presence": ["error", "never"],
"react/prop-types": [0],
"react/react-in-jsx-scope": 2,
"react/require-default-props": [0],
"react/self-closing-comp": ["error", { "component": true, "html": true }],
"sort-imports": ["error", { "ignoreDeclarationSort": true }]
},
"overrides": [
{
"files": ["src/pages/**/*.tsx"],
"rules": {
"import/prefer-default-export": "error",
"import/no-default-export": 0,
"import/no-anonymous-default-export": 0,
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "function-expression"
}
]
}
}
],
"settings": {
"import/resolver": {
"typescript": {
"@/editor/": "./src/apps/editor",
"@/landing/": "./src/apps/landing",
"@/roadmap/": "./src/apps/roadmap",
"@/aero": "./src/libs/aero/index.ts",
"@/pulse": "./src/libs/pulse/index.ts",
"@/chain": "./src/libs/chain/index.ts"
},
"node": {
"extensions": [".ts", ".tsx"],
"moduleDirectory": ["src", "node_modules"]
}
},
"react": { "version": "detect" }
}
}