-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy patheslint.config.js
More file actions
80 lines (73 loc) · 1.79 KB
/
eslint.config.js
File metadata and controls
80 lines (73 loc) · 1.79 KB
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
import js from "@eslint/js";
import prettierConfig from "eslint-config-prettier";
import prettier from "eslint-plugin-prettier";
import globals from "globals";
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
import nextTypescript from "eslint-config-next/typescript";
/** @type {import('eslint').Linter.Config[]} */
const config = [
{
ignores: [
"node_modules/**",
"build/**",
"vendor/**",
"public/**",
"bootstrap/ssr/**",
".next/**",
"out/**",
"next-env.d.ts",
"tailwind.config.js",
"coverage/**",
"*.min.js",
],
},
js.configs.recommended,
...nextCoreWebVitals,
...nextTypescript,
{
languageOptions: {
globals: {
...globals.browser,
},
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
"no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
"no-console": ["warn", { allow: ["warn", "error"] }],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
},
{
plugins: {
prettier,
},
rules: {
"prettier/prettier": "error",
},
},
{
rules: {
indent: ["error", 2, { SwitchCase: 1 }],
"no-trailing-spaces": "error",
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0 }],
"no-tabs": "error",
"no-mixed-spaces-and-tabs": "error",
"padded-blocks": ["error", "never"],
"spaced-comment": ["error", "always", { exceptions: ["-", "+"] }],
},
},
prettierConfig,
];
export default config;