forked from CodePilotai/codepilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
60 lines (60 loc) · 1.35 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
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true
},
extends: [
'standard',
'plugin:vue/recommended',
'prettier',
'prettier/standard'
],
globals: {
__static: true
},
// Rules lists:
// - https://eslint.org/docs/rules/
// - https://github.com/vuejs/eslint-plugin-vue#bulb-rules
rules: {
// requires that only const and let are allowed
'no-var': 'error',
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// HACK: Turning this off until false positives are fixed
'vue/valid-v-on': 'off'
},
overrides: [
{
files: ['src/**/*'],
rules: {
'no-console':
process.env.NODE_ENV === 'production'
? ['error', { allow: ['warn', 'error'] }]
: 'off'
}
},
{
files: ['**/*.unit.js'],
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: { jest: true },
globals: {
mount: false,
shallowMount: false,
createComponentMocks: false,
createModuleStore: false,
createSearchRunner: false,
testConstants: false
}
}
]
}