build(clinical-web): 添加 ESLint 和 Prettier 配置

This commit is contained in:
yelan
2026-08-27 10:51:40 +08:00
parent 3f27d4dd3a
commit 01827bf304
18 changed files with 2784 additions and 34 deletions

View File

@@ -0,0 +1,52 @@
import eslint from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import eslintPluginVue from 'eslint-plugin-vue'
import globals from 'globals'
import tseslint from 'typescript-eslint'
export default tseslint.config(
{
ignores: ['**/dist/**', '**/node_modules/**', '**/coverage/**', '**/*.d.ts'],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
{
files: ['**/*.{ts,tsx,vue}'],
languageOptions: {
globals: globals.browser,
parserOptions: {
parser: tseslint.parser,
},
},
},
{
files: ['**/*.{js,mjs,cjs}'],
languageOptions: {
globals: globals.node,
},
},
{
files: ['vite.config.ts', '*.config.{js,mjs,cjs,ts}'],
languageOptions: {
globals: globals.node,
},
},
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
rules: {
'vue/multi-word-component-names': 'off',
},
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
},
},
eslintConfigPrettier,
)