-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
46 lines (46 loc) · 1.58 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
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"plugins": ["react", "react-hooks", "@typescript-eslint", "prettier"],
"rules": {
"prettier/prettier": [
"error",
{
"@typescript-eslint/no-explicit-any": "false",
"singleQuote": true, // Enforce single quotes
"endOfLine": "lf", // Enforce LF line endings
"insertPragma": false,
"requirePragma": false,
"trailingComma": "none",
"arrowParens": "avoid",
"printWidth": 80,
"tabWidth": 4,
"semi": false
}
],
"react/react-in-jsx-scope": "off",
"quotes": ["error", "single"], // Enforce single quotes
"eol-last": ["error", "always"], // Enforce newline at the end of the file
"newline-after-var": ["error", "always"], // Enforce newline after variable declarations
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "directive", "next": "*" } // Enforce newline after directives like 'use client'
]
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2023, // Updated to 2023 to reflect ES version 13
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect" // Automatically detect the React version
}
}
}