chore: eslint

This commit is contained in:
xingyu 2023-06-21 11:07:33 +08:00
parent 3d39b42e96
commit 37c41aeecc

View File

@ -1,6 +1,4 @@
// @ts-check
const { defineConfig } = require('eslint-define-config')
module.exports = defineConfig({
module.exports = {
root: true,
env: {
browser: true,
@ -21,7 +19,6 @@ module.exports = defineConfig({
extends: ['plugin:vue/vue3-recommended', 'prettier', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
rules: {
'vue/script-setup-uses-vars': 'error',
'vue/no-reserved-component-names': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
@ -34,8 +31,20 @@ module.exports = defineConfig({
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-unused-vars': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}
],
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}
],
'space-before-function-paren': 'off',
'vue/attributes-order': 'off',
@ -61,4 +70,4 @@ module.exports = defineConfig({
],
'vue/multi-word-component-names': 'off'
}
})
}