-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
46 lines (45 loc) · 1014 Bytes
/
.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
const path = require('path');
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
'willin',
'plugin:vue/recommended'
],
rules: {
'vue/max-attributes-per-line': 0,
'vue/component-name-in-template-casing': 0
},
settings: {
'import/core-modules': ['debug', 'vue', 'vuex', 'axios', 'swiper', 'mockjs'],
'import/resolver': {
webpack: {
config: {
resolve: {
modules: [
'node_modules',
path.resolve(__dirname)
],
extensions: [
'.js',
'.vue'
],
alias: {
// 主要是配置目录别名,以防 ESLint 报错
'~': path.resolve(__dirname),
'~~': path.resolve(__dirname),
'@': path.resolve(__dirname),
'@@': path.resolve(__dirname),
}
}
}
}
}
}
}