forked from neo4j/neo4j-browser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
109 lines (109 loc) · 3.26 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"parser": "babel-eslint",
"extends": ["plugin:react/recommended", "prettier"],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-case-declarations": "off",
"no-prototype-builtins": "off",
"prefer-const": "warn",
"no-async-promise-executor": "off",
"react/jsx-handler-names": "off",
"react/jsx-fragments": "off",
"react/prop-types": "off",
"react/jsx-no-target-blank": "off",
"react/jsx-indent": "off",
"react/no-deprecated": "warn",
"react/display-name": "warn",
"react/no-unescaped-entities": "off",
"import/no-webpack-loader-syntax": "off",
"no-restricted-imports": [
"error",
{
"patterns": [
"*/neo4j-arc/*",
"neo4j-arc/common/*",
"neo4j-arc/graph-visualization/*",
"neo4j-arc/cypher-language-support/*",
"^monaco-editor$"
]
}
],
"react/no-unknown-property": [
2,
{
"ignore": ["jsx"]
}
]
},
"globals": {
"it": true,
"describe": true,
"test": true,
"jest": true,
"expect": true,
"beforeAll": true,
"afterAll": true,
"beforeEach": true,
"afterEach": true,
"neo": true,
"FileReader": true,
"Blob": true,
"fetch": true
},
"settings": {
"react": {
"version": "detect"
}
},
"overrides": [
{
"parser": "@typescript-eslint/parser",
"files": ["*.ts", "**/*.ts", "**/*.tsx"],
"extends": [
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"prettier/react", // disables react-specific linting rules that conflict with prettier
"plugin:react-hooks/recommended" // https://reactjs.org/docs/hooks-rules.html
],
"plugins": [
"@typescript-eslint/eslint-plugin",
"@typescript-eslint",
"react"
],
"rules": {
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-this-alias": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-var-requires": "warn",
"no-var": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "warn",
"react/no-unescaped-entities": "warn",
"react/prop-types": "error"
}
},
{
"files": ["src/neo4j-arc/*"],
"rules": {
"no-restricted-imports": [
"error",
{
"paths": ["redux", "react-redux", "react-suber"],
"patterns": ["browser/*", "shared/*", "services/*"]
}
]
}
}
]
}