-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
85 lines (83 loc) · 2.11 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = {
parserOptions: {
// move it into parserOptions, for eslint-plugin-vue
// https://github.com/vuejs/eslint-plugin-vue#couple-faq
parser: 'babel-eslint',
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: [
// https://github.com/babel/eslint-plugin-babel
'babel',
// https://github.com/prettier/eslint-plugin-prettier
'prettier'
],
extends: [
// https://github.com/vuejs/eslint-plugin-vue#bulb-rules
'plugin:vue/strongly-recommended',
// https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'airbnb-base',
// https://github.com/prettier/eslint-plugin-prettier
'prettier',
'prettier/react',
'prettier/standard',
'prettier/vue'
],
env: {
browser: true,
es6: true
},
rules: {
eqeqeq: 'warn',
'prettier/prettier': 'warn',
'no-unused-vars': ['warn', { args: 'none' }],
'no-console': 'off',
'no-script-url': 'warn',
'no-shadow': 'warn',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'no-underscore-dangle': 'off',
'prefer-const': 'off',
'prefer-destructuring': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'import/no-dynamic-require': 'off',
'global-require': 'off',
'consistent-return': 'off',
'max-classes-per-file': 'off',
'arrow-body-style': 'off',
'class-methods-use-this': 'off',
'prefer-arrow-callback': 'off',
'vue/html-quotes': 'error',
'vue/this-in-template': 'error',
'vue/max-attributes-per-line': [
'warn',
{
singleline: 20,
multiline: {
max: 1,
allowFirstLine: false
}
}
]
},
overrides: [
{
files: ['build/**/*'],
parserOptions: {
// move it into parserOptions, for eslint-plugin-vue
// https://github.com/vuejs/eslint-plugin-vue#couple-faq
parser: 'espree',
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
env: {
browser: false,
node: true
}
}
]
};