-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.json
49 lines (49 loc) · 1.47 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
{
"parser": "@typescript-eslint/parser",
"extends": [
"next",
"next/core-web-vitals",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier", // Disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier.
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always used last.
],
"plugins": ["prettier", "import", "simple-import-sort", "@typescript-eslint"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"react/react-in-jsx-scope": "off", // Next.js includes it by default
"prettier/prettier": "warn",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-named-as-default": "error",
"import/no-unresolved": "warn",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "warn"
},
"overrides": [
// Turn off prop type errors for Next.js pages, due to complexity with TS
{
"files": ["pages/**/*.tsx"],
"rules": {
"react/prop-types": "off"
}
}
],
"settings": {
"react": {
"version": "detect"
}
}
}