-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
42 lines (38 loc) · 1.97 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
{
"extends": [
"next/core-web-vitals",
"next/typescript",
"prettier",
"plugin:jsx-a11y/recommended"
],
"rules": {
// Possible Errors
"no-console": "warn", // Warn on console usage (can change to 'error' to disallow)
"no-debugger": "error", // Disallow debugger statements
"no-extra-semi": "error", // Disallow unnecessary semicolons
"no-irregular-whitespace": "error", // Disallow irregular whitespace
// Best Practices
"curly": "error", // Require curly braces for all control statements
"eqeqeq": ["error", "always"], // Enforce strict equality (=== and !==)
"no-eval": "error", // Disallow eval()
"no-implied-eval": "error", // Disallow implied eval() via setTimeout, setInterval, etc.
"no-throw-literal": "error", // Disallow throwing literals (e.g. throw "error")
"no-unused-expressions": "error", // Disallow unused expressions
// Variables
"no-undef": "error", // Disallow the use of undeclared variables
"no-unused-vars": ["warn", { "vars": "all", "args": "none" }], // Disallow unused variables
// Stylistic Issues
"camelcase": ["error", { "properties": "never" }], // Enforce camelCase naming convention
"comma-dangle": ["error", "always-multiline"], // Require trailing commas in multiline object literals
"quotes": ["error", "single", { "avoidEscape": true }], // Enforce single quotes
"semi": ["error", "always"], // Require semicolons
"indent": ["error", 2], // Enforce 2-space indentation
"eol-last": ["error", "always"], // Require newline at the end of files
"no-trailing-spaces": "error", // Disallow trailing spaces
// ES6
"arrow-spacing": ["error", { "before": true, "after": true }], // Enforce spacing around arrows
"prefer-const": "error", // Prefer const for variables that are never reassigned
"no-var": "error", // Disallow var (use let or const instead)
"template-curly-spacing": ["error", "never"] // Disallow spaces inside template literals
}
}