forked from ONEARMY/community-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
49 lines (49 loc) · 1.9 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
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"prettier" // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-use-before-define": "off",
"no-useless-escape": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md
// NOTE - typings throughout the platform are fairly inconsistent, hence the wide range of rules
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "default",
"format": ["camelCase", "UPPER_CASE", "PascalCase", "snake_case"],
"leadingUnderscore": "allow"
},
{
"selector": "classMethod",
"format": ["camelCase"],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/no-deprecated": "warn",
"react/no-unescaped-entities": "off",
"react/jsx-no-target-blank": "warn",
"react/display-name": "warn",
// as of v17 no longer required
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-interface": "off",
"react/prop-types": "off",
"react/no-unknown-property": "warn",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-namespace": "off"
}
}