-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
66 lines (66 loc) · 1.98 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
module.exports = {
root: true,
env: {
browser: true
},
extends: [
"standard",
"prettier",
"prettier/standard",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 7,
sourceType: "module",
allowImportExportEverywhere: true,
project: "./tsconfig.json"
},
plugins: ["@typescript-eslint"],
rules: {
// Only allow debugger in development
"no-debugger": process.env.PRE_COMMIT ? "error" : "off",
// Only allow `console.log` in development
//"no-console": process.env.PRE_COMMIT ? ["error", { allow: ["warn", "error"] }] : "off",
"no-console": "off",
"brace-style": "stroustrup",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"object-curly-spacing": ["error", "always"],
"linebreak-style": ["error", "windows"],
"no-trailing-spaces": ["error"],
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
"semi": ["error", "always"],
"standard/no-callback-literal": "off",
"key-spacing": ["error", { "afterColon": true }],
"comma-spacing": ["error", { "after": true, "before": false }],
"comma-dangle": ["error", "never"],
"keyword-spacing": ["error", { "before": true, "after": true }],
"no-multiple-empty-lines": "error",
"padded-blocks": "error",
"space-before-blocks": "error",
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"no-multi-spaces": "error",
"no-unused-vars": "off",
"no-dupe-class-members": "off",
"no-useless-constructor": "off",
"no-new-func": "off",
"no-control-regex": "off",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/no-use-before-define": ["warn", { "classes": false, "functions": false }],
"@typescript-eslint/no-unused-vars": "error",
"new-cap": "off"
},
overrides: [
{
files: ['**/*.unit.[jt]s'],
env: { jest: true },
globals: {
mount: false,
shallowMount: false,
shallowMountView: false,
createComponentMocks: false,
createModuleStore: false,
}
}
]
};