-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
103 lines (103 loc) · 3.07 KB
/
Copy path.eslintrc.json
File metadata and controls
103 lines (103 loc) · 3.07 KB
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
{
"env": { "es6": true, "jest": true, "node": true },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:jest/all",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:typescript-sort-keys/recommended"
],
"ignorePatterns": ["**/dist/*"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"ecmaVersion": 2020,
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"import",
"jest",
"react",
"sort-exports",
"typescript-sort-keys"
],
"root": true,
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/naming-convention": [
"error",
{ "format": ["camelCase"], "selector": "default" },
{ "format": ["camelCase", "PascalCase"], "selector": "function" },
{
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"selector": "variable"
},
{
"format": ["camelCase"],
"leadingUnderscore": "allow",
"selector": "parameter"
},
{
"format": ["camelCase"],
"leadingUnderscore": "require",
"modifiers": ["private"],
"selector": "memberLike"
},
{ "format": ["PascalCase"], "selector": "typeLike" },
{
"format": ["PascalCase"],
"prefix": ["is", "should", "has", "can", "did", "will"],
"selector": "variable",
"types": ["boolean"]
}
],
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/no-use-before-define": "off",
"camelcase": "off",
"import/order": [
"error",
{
"alphabetize": { "caseInsensitive": true, "order": "asc" },
"groups": ["builtin", "external", "parent", "sibling", "index"],
"newlines-between": "always"
}
],
"jest/lowercase-name": "off",
"jest/prefer-expect-assertions": "off",
"no-else-return": "error",
"no-lonely-if": "error",
"no-negated-condition": "error",
"no-return-await": "error",
"no-shadow": "off",
"no-throw-literal": "error",
"no-unneeded-ternary": "error",
"object-shorthand": "error",
"prefer-const": "error",
"no-param-reassign": ["error", { "props": true }],
"prefer-template": "error",
"react/jsx-sort-props": "error",
"react/prop-types": "off",
"require-atomic-updates": "error",
"require-await": "error",
"sort-exports/sort-exports": ["error", { "sortDir": "asc" }],
"sort-keys": "warn",
"yoda": "error"
},
"settings": {
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"moduleDirectory": ["node_modules", "src/"]
},
"typescript": { "alwaysTryTypes": true, "project": "**/tsconfig.json" }
},
"jsdoc": { "mode": "typescript" },
"react": { "version": "detect" }
}
}