This repository has been archived by the owner on Oct 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.eslintrc.js
61 lines (59 loc) · 1.51 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
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
},
env: {
browser: true,
jest: true,
},
globals: {
grecaptcha: 'readonly',
VERSION: 'readonly',
BASE_URL: 'readonly',
SCHEDULE_URL: 'readonly',
SCHEDULER_PATH: 'readonly',
RESCHEDULE_URL: 'readonly',
},
extends: [
'plugin:vue/essential',
'airbnb-base',
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// allow unresolved module and extensions,
// because webpack will handle this part
'import/no-unresolved': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
// allow param reassign or the param's properties
'no-param-reassign': ['error', { props: false }],
'max-len': ['error', { code: 80 }],
'operator-linebreak': 'off',
'no-underscore-dangle': [
'error',
{
allow: ['_options'],
allowAfterThis: true,
},
],
// Since it's common to have more than 4 destructuring assignments for
// Vuex's action arguments. Increase minProperties to avoid un-necessary
// multiline.
'object-curly-newline': [
'error',
{
ObjectPattern: {
multiline: true,
minProperties: 5,
},
},
],
},
};