mirror of
https://github.com/LiuYuYang01/ThriveX-Admin.git
synced 2026-05-06 21:50:31 +08:00
- 新增 .dockerignore, .env, .gitignore, .prettierrc 等基础配置文件,确保项目环境一致性。 - 添加初始的 Dockerfile 和 Vite 配置,支持项目的容器化和构建。 - 引入 ESLint 和 Prettier 配置,提升代码质量和一致性。 - 创建基本的页面和组件结构,便于后续开发和扩展。
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
import js from '@eslint/js';
|
||
import globals from 'globals';
|
||
import tseslint from 'typescript-eslint';
|
||
import pluginReact from 'eslint-plugin-react';
|
||
import { defineConfig } from 'eslint/config';
|
||
import reactHooks from 'eslint-plugin-react-hooks';
|
||
import reactRefresh from 'eslint-plugin-react-refresh';
|
||
|
||
export default defineConfig([
|
||
{ ignores: ['dist'] },
|
||
{
|
||
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||
plugins: { js },
|
||
extends: ['js/recommended'],
|
||
},
|
||
{
|
||
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||
languageOptions: { globals: globals.browser },
|
||
},
|
||
{
|
||
plugins: {
|
||
'react-hooks': reactHooks,
|
||
'react-refresh': reactRefresh,
|
||
},
|
||
},
|
||
tseslint.configs.recommended,
|
||
pluginReact.configs.flat.recommended,
|
||
{
|
||
rules: {
|
||
'no-unused-vars': 'off', // 关闭未使用变量的检查
|
||
'react-refresh/only-export-components': 'off',
|
||
'react/display-name': 'off',
|
||
// 约束js使用单引号,允许jsx双引号
|
||
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
|
||
'jsx-quotes': ['error', 'prefer-double'],
|
||
'react-hooks/exhaustive-deps': 'off',
|
||
'react/react-in-jsx-scope': 'off',
|
||
// 禁止使用 any 类型
|
||
'@typescript-eslint/no-explicit-any': 'error',
|
||
},
|
||
},
|
||
]);
|