-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
68 lines (68 loc) · 1.94 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* eslint-env node */
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"prettier"
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
tsconfigRootDir: __dirname
},
plugins: ["@typescript-eslint", "import", "prettier", "check-file"],
overrides: [
{
files: ["*.{js,ejs}"],
extends: ["plugin:@typescript-eslint/disable-type-checked"]
}
],
ignorePatterns: [".*.js", "package*.json", "*.config.js", "dist/**", "*.ejs"],
root: true,
rules: {
semi: ["error", "always"],
quotes: ["error", "double"],
"prettier/prettier": ["error", { endOfLine: "lf" }],
"check-file/filename-naming-convention": [
"error",
{ "*.{js,ts,ejs}": "CAMEL_CASE" }
],
camelcase: [
"error",
{
ignoreGlobals: true,
ignoreImports: true,
ignoreDestructuring: true
}
],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-misused-promises": ["off"],
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
vars: "all",
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
ignoreRestSiblings: true
}
],
"no-console": "warn",
"object-shorthand": ["error", "always"],
"no-extra-boolean-cast": "error",
"no-duplicate-imports": "error",
"arrow-body-style": ["error", "as-needed"],
"no-nested-ternary": "error",
"default-param-last": "error",
"max-depth": ["error", 5],
"max-nested-callbacks": ["error", 5],
complexity: ["error", 10],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": ["error", { "prefer-inline": true }],
"no-multiple-empty-lines": "error",
"prefer-const": "error"
}
};