spring
5 天以前 126316e94197a03012d37d5a9170c0f854367bfa
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
module.exports = {
  root: true,
  env: {
    browser: true,
    node: true,
    es6: true
  },
  // Vue SFC 需要使用 vue-eslint-parser 来解析 template/script/style
  parser: 'vue-eslint-parser',
  parserOptions: {
    // script 部分用 babel-eslint
    parser: 'babel-eslint',
    ecmaVersion: 2020,
    sourceType: 'module'
  },
  plugins: ['vue'],
  extends: [
    'eslint:recommended',
    'plugin:vue/recommended',
    // 让 prettier 规则接管格式问题,减少无谓报错
    'prettier'
  ],
  rules: {
    // 让现有项目尽快可编译(避免大量历史代码触发 eslint 阻塞)
    'no-console': 'off',
    'no-debugger': 'off',
    'no-unused-vars': 'off',
    'no-undef': 'off',
    'vue/multi-word-component-names': 'off',
    'vue/no-v-html': 'off'
  }
};