You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.0 KiB
JavaScript

/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
'./.eslintrc-auto-import.json' // auto-imports 使用
],
env: {
node: true,
'vue/setup-compiler-macros': true
},
rules: {
// 允许使用 any
'@typescript-eslint/no-explicit-any': 'off',
// 允许使用 @ts-ignore 注释
'@typescript-eslint/ban-ts-comment': 'off',
// 允许空方法
'@typescript-eslint/no-empty-function': 'off',
// 允许非空断言
'@typescript-eslint/no-non-null-assertion': 'off',
'vue/no-template-shadow': 'off',
"@typescript-eslint/no-this-alias": [
"error",
{
"allowDestructuring": false, // Disallow `const { props, state } = this`; true by default
"allowedNames": ["that"] // Allow `const self = this`; `[]` by default
}
]
}
}