-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
146 lines (146 loc) · 3.38 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
"overrides": [
{
"extends": ["plugin:@typescript-eslint/recommended-requiring-type-checking"],
"files": ["*.ts", "*.tsx"],
"parserOptions": {
"project": true
},
"rules": {
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off"
}
},
{
"files": ["**/*.spec.ts", "**/*.d.ts"],
"rules": {
"import/no-unused-modules": "off"
}
},
{
"files": ["**/index.tsx?"],
"rules": {
"import/no-unused-modules": "off"
}
},
{
"files": ["**/*.js"],
"parserOptions": { "project": null },
"rules": {
"@typescript-eslint/require-await": "off",
"@typescript-eslint/return-await": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"babelOptions": {
"presets": ["next/babel"]
}
},
"plugins": ["codegen", "@typescript-eslint", "turbo", "node", "import", "i18next", "storybook"],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:storybook/recommended",
"plugin:import/typescript",
"prettier"
],
"rules": {
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "^_",
"args": "none",
"ignoreRestSiblings": true
}
],
"i18next/no-literal-string": 1,
"no-duplicate-imports": "off",
"react/no-unescaped-entities": ["off"],
"turbo/no-undeclared-env-vars": "warn",
"codegen/codegen": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-absolute-path": "error",
"import/no-duplicates": "error",
"import/no-empty-named-blocks": "error",
"import/no-unused-modules": [
"warn",
{
"missingExports": true
}
],
"import/no-useless-path-segments": "error",
"sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true
}
],
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
"import/order": [
"warn",
{
"groups": ["external", "builtin", "internal", ["index", "sibling", "parent"], "object", "type"],
"distinctGroup": false,
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"orderImportKind": "asc",
"caseInsensitive": true
}
}
],
"import/no-self-import": "error",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "react-i18next",
"importNames": ["useTranslation", "Trans", "Translation"],
"message": "Please import from 'next-i18next'"
},
{
"name": "next-i18next/serverSideTranslations",
"importNames": ["serverSideTranslations"],
"message": "Please import 'getServerSideTranslations' from '~/server/i18n'"
}
]
}
],
"require-await": "off",
"@typescript-eslint/require-await": "off",
"no-return-await": "off",
"@typescript-eslint/return-await": "off",
"@typescript-eslint/no-unsafe-assignment": "off"
},
"ignorePatterns": ["!.*", "**/node_modules/**", "dist/", ".next/"],
"settings": {
"import/extensions": [".js", ".jsx", ".cjs", ".mjs", ".ts", ".mts", ".tsx"],
"import/resolver": {
"node": true,
"typescript": {
"alwaysTryTypes": true
}
},
"import/cache": {
"lifetime": 10
}
},
"env": {
"node": true,
"browser": true
}
}