forked from MahyarGdz/configs-hell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (51 loc) · 1.6 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
module.exports = {
parser: "@typescript-eslint/parser",
extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended", "prettier", "eslint:recommended"],
plugins: ["@typescript-eslint", "prettier"],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
tsconfigRootDir: __dirname,
project: "./tsconfig.json",
},
env: {
es6: true,
node: true,
jest: true,
},
rules: {
"no-var": "error",
semi: "error",
"no-multi-spaces": "error",
"space-in-parens": "error",
"no-multiple-empty-lines": "error",
"prefer-const": "error",
"no-async-promise-executor": "warn",
"no-control-regex": "warn",
"no-empty": "warn",
"no-extra-semi": "warn",
"no-prototype-builtins": "warn",
"no-regex-spaces": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-loss-of-precision": "warn",
"@typescript-eslint/no-misused-new": "warn",
"@typescript-eslint/no-namespace": "warn",
"@typescript-eslint/no-this-alias": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/triple-slash-reference": "warn",
},
};