-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.eslintrc.js
65 lines (63 loc) · 1.73 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
// http://eslint.org/docs/user-guide/configuring
const path = require('path');
function resolve(dir) {
return path.join(__dirname, dir);
}
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
},
env: {
browser: true,
},
extends: [
'airbnb-base',
'plugin:vue/recommended',
// "plugin:vue-a11y/base", // currently errors out on form labels
],
plugins: [
'vue'
],
// check if imports actually resolve
settings: {
'import/resolver': {
// matches aliases from build/rollup-plugins.js
alias: {
map: [
['srcdir', resolve('src')],
['cssdir', resolve('src/css')],
['assetsdir', resolve('src/assets')],
['componentsdir', resolve('src/components')],
['compositionsdir', resolve('src/compositions')],
['mixinsdir', resolve('src/mixins')],
],
extensions: ['.vue', '.json', '.js', '.jsx']
},
},
},
// add custom rules or overrides here
rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
jsx: 'never',
vue: 'never'
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
'optionalDependencies': ['test/unit/index.js']
}],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'vue/require-default-prop': 0,
'vue/attributes-order': 0,
'max-len': ['error', {
'code': 100,
'ignoreComments': true,
'ignoreTrailingComments': true
}],
'vue/multiline-html-element-content-newline': 0
}
}