-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
53 lines (53 loc) · 1.37 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
module.exports = {
root: true,
env: {
// this section will be used to determine which APIs are available to us
// (i.e are we running in a browser environment or a node.js env)
'node': true,
'browser': true,
'jest/globals': true,
},
plugins: ['jest'],
extends: [
// use the recommended rule set for both plain javascript and vue
'eslint:recommended',
'plugin:vue/recommended',
'plugin:jest/recommended',
'prettier',
'prettier/vue',
],
rules: {
// global rules
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// TODO: Remove this rule
'no-unused-vars': 'off',
"camelcase": [2, {"properties": "never"}],
'max-len': [
2,
{
code: 100,
tabWidth: 2,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
// jest rules
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
'jest/expect-expect': [
'error',
{
assertFunctionNames: ['expect*'],
},
],
// vue
'vue/no-mutating-props': 'off',
'vue/no-v-html': 'off',
'vue/max-attributes-per-line': 'off',
},
};