-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
73 lines (73 loc) · 2.14 KB
/
.eslintrc.cjs
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
module.exports = {
"extends": ["eslint:recommended", "plugin:svelte/recommended"],
"ignorePatterns": ["build/", "node_modules/", "src/routes/api/**/*.js"],
"env": {
"browser": true,
"es2017": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020,
"extraFileExtensions": [".svelte"]
},
"plugins": ["@typescript-eslint"],
"overrides": [
{
"files": ["*.svelte"],
"parser": "svelte-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser"
}
}
],
"rules": {
"brace-style": ["warn", "allman"],
"block-spacing": ["warn", "always"],
"comma-dangle": ["warn", {
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"functions": "never"
}],
"comma-style": ["warn", "last"],
"dot-notation": "warn",
"eqeqeq": ["error", "always"],
"func-call-spacing": ["warn", "never"],
"indent": ["error", "tab", { "SwitchCase": 1 }],
"lines-between-class-members": ["warn", "always", { "exceptAfterSingleLine": true }],
"no-cond-assign": ["error", "always"],
"no-console": "off",
"no-multi-spaces": "warn",
"no-prototype-builtins": "off",
"no-shadow": "off",
"no-trailing-spaces": "warn",
"no-unused-vars": "off",
"no-var": "error",
"object-curly-spacing": ["warn", "always"],
"padded-blocks": ["warn", "never"],
"prefer-const": "warn",
"prefer-rest-params": "warn",
"quotes": ["warn", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
"semi": ["warn", "never"],
"space-infix-ops": "error",
"spaced-comment": ["warn", "always", {
"line": {
"markers": ["/"]
},
"block": {
"balanced": true
}
}],
"yoda": ["warn", "never"],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
"@typescript-eslint/no-var-requires": "off",
}
}