This repository has been archived by the owner on Jul 10, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 324
/
.eslintrc
76 lines (76 loc) · 1.89 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"plugins": [
"eslint-plugin-prettier",
"unused-imports",
"react",
"@typescript-eslint",
"react-hooks"
],
"extends": [
"eslint:recommended",
"google",
"eslint-config-prettier",
"plugin:vitest-globals/recommended"
],
"globals": {
"__MEDUSA_BACKEND_URL__": true
},
"rules": {
"prettier/prettier": "error",
"curly": [2, "all"],
"new-cap": "off",
"require-jsdoc": "off",
"semi": "off",
"valid-jsdoc": "off",
"no-unused-expressions": "off",
"camelcase": "off",
"no-invalid-this": "off",
"spaced-comment": ["error", "always", { "markers": ["/"] }],
"react/prop-types": "off", // Disable prop-types as we use TypeScript for type checking
"react-hooks/rules-of-hooks": 1, // Checks rules of Hooks
"react-hooks/exhaustive-deps": 1, // Checks effect dependencies
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-implicit-any": 0,
"@typescript-eslint/no-unused-vars": 0,
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
},
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"node": true,
"es6": true,
"vitest-globals/env": true
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-var-requires": 0,
"react/jsx-uses-react": 1,
"react/react-in-jsx-scope": 1
}
}
]
}