feat: 更新 VSCode 配置,添加 oxc 插件,调整 eslint 配置,优化构建和类型检查命令
This commit is contained in:
37
eslint.config.mjs.bak
Normal file
37
eslint.config.mjs.bak
Normal file
@ -0,0 +1,37 @@
|
||||
import { includeIgnoreFile } from '@eslint/compat';
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
||||
import vueTsEslintConfig from '@vue/eslint-config-typescript';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const gitignorePath = path.resolve(__dirname, '.gitignore');
|
||||
|
||||
/**
|
||||
* @type import('eslint').Linter.Config[]
|
||||
*/
|
||||
export default [
|
||||
// --ignore-path .gitignore
|
||||
includeIgnoreFile(gitignorePath),
|
||||
{
|
||||
name: 'app/files-to-lint',
|
||||
files: ['**/*.{ts,mts,tsx,vue}'],
|
||||
},
|
||||
|
||||
{
|
||||
name: 'app/files-to-ignore',
|
||||
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
|
||||
},
|
||||
|
||||
...pluginVue.configs['flat/essential'],
|
||||
...vueTsEslintConfig({
|
||||
supportedScriptLangs: {
|
||||
ts: true,
|
||||
tsx: true,
|
||||
},
|
||||
}),
|
||||
|
||||
skipFormatting,
|
||||
];
|
Reference in New Issue
Block a user