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
| // module.exports = {
| // root: true,
| // env: {
| // node: true
| // },
| // 'extends': [
| // // 'plugin:vue/essential',
| // // 'eslint:recommended'
| // 'standard', //使用standard做代码规范
| // "prettier",
| // ],
| // parserOptions: {
| // parser: 'babel-eslint'
| // },
| // rules: {
| // 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
| // 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
| // //强制使用单引号
| // "prettier/prettier": "error",
| // quotes: ['error', 'single'],
| // //强制不使用分号结尾
| // semi: ['error', 'never']
| // }
| // }
| module.exports = {
| root: true,
| parserOptions: {
| parser: 'babel-eslint'
| },
| env: {
| browser: true,
| es6: true
| },
| extends: [
| // https://github.com/standard/standard/blob/master/docs/RULES-en.md
| 'standard',
| // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
| // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
| 'plugin:vue/essential',
| 'plugin:prettier/recommended'
| ],
| // required to lint *.vue files
| plugins: ['vue'],
| // add your custom rules here
| rules: {
| 'prettier/prettier': 'error',
| // allow async-await
| 'generator-star-spacing': 'off',
| // allow debugger during development
| 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
| 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
| quotes: ['error', 'single'],
| // 强制不使用分号结尾
| semi: ['error', 'never']
| } /*,
| settings: {
| "import/resolver": {
| "webpack": {
| //此处config对应webpack.config.js的路径,我这个路径是vue-cli3默认的路径
| "config": "node_modules/@vue/cli-service/webpack.config.js"
| }
| }
| } */
| }
|
|