-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
74 lines (74 loc) · 1.87 KB
/
.eslintrc.js
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
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["import", "@typescript-eslint", "react", "react-hooks", "jest", "graphql"],
extends: [
"eslint:recommended",
"plugin:node/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:react/recommended",
],
rules: {
quotes: ["error", "double"],
"import/no-default-export": 2,
"import/no-unresolved": 2,
"import/named": 2,
"no-unused-vars": 2,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/prop-types": "off",
"react/display-name": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/ban-types": "off",
"graphql/template-strings": [
"error",
{
env: "apollo",
},
],
"node/no-missing-import": "off",
"node/no-unsupported-features/es-syntax": "off",
"node/no-unpublished-import": "off",
"node/no-unsupported-features/node-builtins": "off",
"node/no-restricted-import": [
"error",
[
{
name: "@brizy/**",
message: "Do not use @brizy/ui components directly, make sure you import them from '~/components/brizyUi'.",
},
],
],
},
settings: {
react: {
version: "detect",
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
project: "./",
},
},
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
overrides: [
{
files: "types/global.d.ts",
rules: {
"@typescript-eslint/interface-name-prefix": "off",
},
},
],
};