49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
|
module.exports = {
|
||
|
env: {
|
||
|
browser: true,
|
||
|
es2021: true,
|
||
|
node: true,
|
||
|
},
|
||
|
extends: [
|
||
|
'eslint-config-prettier',
|
||
|
'eslint:recommended',
|
||
|
// 'plugin:@typescript-eslint/recommended',
|
||
|
'plugin:vue/vue3-recommended',
|
||
|
'plugin:vue/vue3-essential',
|
||
|
'plugin:prettier/recommended',
|
||
|
],
|
||
|
overrides: [
|
||
|
{
|
||
|
env: {
|
||
|
node: true,
|
||
|
},
|
||
|
files: ['.eslintrc.{js,cjs}'],
|
||
|
parserOptions: {
|
||
|
sourceType: 'script',
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
parserOptions: {
|
||
|
ecmaVersion: 'latest',
|
||
|
sourceType: 'module',
|
||
|
requireConfigFile: false,
|
||
|
parser: '@babel/eslint-parser',
|
||
|
// parser: '@typescript-eslint/parser',
|
||
|
},
|
||
|
plugins: ['vue', 'prettier'],
|
||
|
globals: {
|
||
|
defineProps: 'readonly',
|
||
|
defineEmits: 'readonly',
|
||
|
defineExpose: 'readonly',
|
||
|
withDefaults: 'readonly',
|
||
|
},
|
||
|
// 这里时配置规则的,自己看情况配置
|
||
|
rules: {
|
||
|
'prettier/prettier': 'error',
|
||
|
'no-debugger': 'off',
|
||
|
'no-unused-vars': 'off',
|
||
|
'vue/multi-word-component-names': 'off',
|
||
|
'vue/no-unused-vars': 'off',
|
||
|
},
|
||
|
};
|