1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-28 20:10:22 +08:00

chore: eslint 替换为 @antfu/eslint-config,集成 lint-staged 和 simple-git-hooks

This commit is contained in:
zclzone
2024-06-06 17:26:55 +08:00
parent 004ef366f2
commit 98f9d5893a
8 changed files with 5261 additions and 2679 deletions

28
eslint.config.js Normal file
View File

@@ -0,0 +1,28 @@
import antfu from '@antfu/eslint-config'
export default antfu({
unocss: true,
formatters: true,
stylistic: true,
rules: {
'n/prefer-global/process': 'off',
'no-undef': 'error',
'no-fallthrough': 'off',
'vue/block-order': 'off',
},
languageOptions: {
globals: {
h: 'readonly',
provide: 'readonly',
inject: 'readonly',
markRaw: 'readonly',
defineAsyncComponent: 'readonly',
nextTick: 'readonly',
useRoute: 'readonly',
useRouter: 'readonly',
Message: 'readonly',
Modal: 'readonly',
NProgress: 'readonly',
},
},
})