-
Notifications
You must be signed in to change notification settings - Fork 369
/
.eslintrc.js
46 lines (46 loc) · 1.46 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
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
ignorePatterns: ["/*", "!/src", "/src/utils/getTheme.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.json"],
tsconfigRootDir: __dirname,
},
plugins: ["@typescript-eslint", "simple-import-sort", "import"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"next/core-web-vitals",
"prettier",
],
rules: {
"@typescript-eslint/array-type": ["error", { default: "generic" }],
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/unbound-method": "off",
curly: ["error", "multi-line"],
"object-shorthand": ["error", "always"],
"react/self-closing-comp": ["error", { component: true, html: true }],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-default-export": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
},
overrides: [
{
files: [
"./src/app/**/?(layout|page|loading|not-found|error|global-error|template|default).tsx",
],
rules: {
"import/no-default-export": "off",
},
},
],
};