-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (66 loc) · 1.59 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
69
module.exports = {
root: true,
env: {
node: true
},
parserOptions: {
parser: "babel-eslint",
sourceType: "module"
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#bulb-rules
"plugin:vue/recommended",
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
"standard"
],
plugins: [
// https://github.com/dangreenisrael/eslint-plugin-jest-formatting
"jest-formatting"
],
overrides: [
{
files: ['**/*.unit.js', '**/tests/unit/**/*'],
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: { jest: true }
},
{
files: ['**/__mocks__/*'],
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: { jest: true }
}
],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
semi: ["error", "never"],
"indent": [2, 2, {"SwitchCase": 1}],
// general
"import/newline-after-import": ["error", { "count": 1 }],
"standard/no-callback-literal": "off",
// jest
"jest-formatting/padding-around-test-blocks": 2,
"jest-formatting/padding-around-describe-blocks": 2,
// vue
"vue/max-attributes-per-line": "off",
"vue/component-name-in-template-casing": [
"error",
"PascalCase",
{
ignores: [
"component",
"template",
"transition",
"transition-group",
"keep-alive",
"slot"
]
}
]
}
};