You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1010 B
39 lines
1010 B
module.exports = {
|
|
root: true,
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
},
|
|
parser: 'vue-eslint-parser',
|
|
parserOptions: {
|
|
parser: '@typescript-eslint/parser',
|
|
ecmaVersion: 2020,
|
|
sourceType: 'module',
|
|
ecmaFeatures: {
|
|
jsx: false,
|
|
},
|
|
project: './tsconfig.json',
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:vue/vue3-recommended',
|
|
'plugin:prettier/recommended',
|
|
],
|
|
rules: {
|
|
// Vue 推荐规则
|
|
'vue/multi-word-component-names': 0,
|
|
'vue/require-default-prop': 0,
|
|
|
|
// TypeScript 常用规则
|
|
'@typescript-eslint/no-explicit-any': ['warn'],
|
|
'@typescript-eslint/no-unused-vars': ['error'],
|
|
|
|
// 缩进设置(可选)
|
|
indent: ['error', 2],
|
|
quotes: ['error', 'single'],
|
|
semi: ['error', 'never'],
|
|
},
|
|
}
|