forked from Akryum/vue-cli-plugin-apollo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
51 lines (49 loc) · 1.22 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
module.exports = {
// Use only this configuration
root: true,
// File parser
parser: 'vue-eslint-parser',
parserOptions: {
// Use babel-eslint for JavaScript
parser: 'babel-eslint',
ecmaVersion: 2017,
// With import/export syntax
sourceType: 'module',
},
// Environment global objects
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
'standard',
// https://github.com/vuejs/eslint-plugin-vue#priority-c-recommended-minimizing-arbitrary-choices-and-cognitive-overhead
'plugin:vue/recommended',
],
rules: {
'comma-dangle': ['error', 'always-multiline'],
// Vue
// Error
'vue/html-closing-bracket-newline': ['error', {
singleline: 'never',
multiline: 'always',
}],
'vue/html-closing-bracket-spacing': ['error', {
startTag: 'never',
endTag: 'never',
selfClosingTag: 'never',
}],
'vue/max-attributes-per-line': ['error', {
singleline: 2,
multiline: {
max: 1,
allowFirstLine: false,
},
}],
// Warn
'vue/require-default-prop': 'warn',
'vue/require-prop-types': 'warn',
},
}