-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.eslintrc.json
More file actions
142 lines (142 loc) · 3.89 KB
/
.eslintrc.json
File metadata and controls
142 lines (142 loc) · 3.89 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
"root": true,
"env": { "browser": true, "es2020": true, "es6": true },
"parser": "@typescript-eslint/parser",
"plugins": [
"prettier",
"import",
"@typescript-eslint",
"github",
"functional",
"@stylistic"
],
"extends": [
"prettier",
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:github/recommended"
],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest",
"ecmaFeatures": {
"jsx": true
},
"project": ["./tsconfig.json"]
},
"rules": {
"prettier/prettier": [
"error",
{
"arrowParens": "avoid",
"bracketSpacing": true,
"bracketSameLine": false,
"printWidth": 120,
"proseWrap": "preserve",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"quoteProps": "preserve",
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"overrides": [
{
"files": "*.json",
"options": {
"printWidth": 200
}
}
]
},
{
"usePrettierrc": false
}
],
// ESLINT
"quote-props": ["error", "consistent"],
"filenames/match-regex": "off",
"eslint-comments/no-use": "off",
"eslint-comments/no-restricted-disable": "off",
"no-restricted-imports": "off",
"no-shadow": "off",
"camelcase": "off",
"no-restricted-globals": [
"error",
{
"name": "log",
"message": "Usage of global `log` is forbidden"
}
],
"i18n-text/no-en": "off",
"prefer-const": ["error"],
"no-undef": "off",
"no-unused-vars": "off",
"no-redeclare": "off",
"no-param-reassign": ["error"],
"no-warning-comments": ["warn", { "terms": ["todo", "fixme"] }],
"no-return-await": "off",
"no-invalid-this": "off",
"no-console": "off",
// TYPESCRIPT
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/return-await": ["error", "in-try-catch"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-readonly": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/method-signature-style": ["warn", "property"],
"@typescript-eslint/no-invalid-this": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-shadow": "warn",
// IMPORT
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"pathGroups": [
{ "pattern": "./**", "group": "parent" },
{ "pattern": "~/**", "group": "parent" }
],
"newlines-between": "always",
"alphabetize": {
"order": "desc",
"orderImportKind": "desc",
"caseInsensitive": false
}
}
],
"import/extensions": "off",
"import/no-cycle": ["error"],
"import/no-unresolved": "off",
"import/default": "off",
"import/named": "off",
"import/no-deprecated": "warn",
"import/no-namespace": "off",
"import/no-named-as-default-member": "off"
},
"settings": {
"import/extensions": [".js", ".jsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
}
}
}