| | |
| | | module.exports = { |
| | | env: { |
| | | browser: true, |
| | | node: true |
| | | es2021: true |
| | | }, |
| | | extends: [ |
| | | 'plugin:vue/recommended', // 此项是用来配置vue.js风格 |
| | | 'eslint:recommended' //继承Eslint中推荐的(打钩的)规则项 |
| | | extends: ['standard', 'plugin:vue/recommended'], |
| | | overrides: [ |
| | | { |
| | | env: { |
| | | node: true |
| | | }, |
| | | files: ['.eslintrc.{js,cjs}'], |
| | | parserOptions: { |
| | | sourceType: 'script' |
| | | } |
| | | } |
| | | ], |
| | | parserOptions: { |
| | | ecmaVersion: 13, |
| | | sourceType: 'module' |
| | | ecmaVersion: 2021, |
| | | sourceType: 'module', |
| | | parser: 'babel-eslint', |
| | | ecmaFeatures: { |
| | | // 非 react 项目关闭 jsx 语法校验,默认为 true |
| | | jsx: false |
| | | } |
| | | }, |
| | | globals: { |
| | | AMap: true, |
| | | AMapUI: true |
| | | }, |
| | | plugins: ['vue'], |
| | | rules: {} |
| | | rules: { |
| | | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| | | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| | | camelcase: 'off', |
| | | 'comma-dangle': 'off', |
| | | '@typescript-eslint/no-explicit-any': 'off', |
| | | '@typescript-eslint/camelcase': 'off', |
| | | '@typescript-eslint/no-empty-function': 'off', |
| | | 'lines-between-class-members': 'off', |
| | | '@typescript-eslint/no-this-alias': 'off' |
| | | } |
| | | } |