diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb89c49..f6421b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,14 +42,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: 安装 GNU 工具链 - run: | - rustup toolchain install stable-x86_64-pc-windows-gnu - rustup override set stable-x86_64-pc-windows-gnu - - - name: 添加 MinGW 到 PATH - run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - name: Cargo Check run: cargo check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 931ff90..00cfd05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,14 +21,6 @@ jobs: - run: npm ci - - name: 安装 GNU 工具链 - run: | - rustup toolchain install stable-x86_64-pc-windows-gnu - rustup override set stable-x86_64-pc-windows-gnu - - - name: 添加 MinGW 到 PATH - run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - name: Tauri Build run: npx tauri build diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..8e37764 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,24 @@ +import js from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import reactHooks from 'eslint-plugin-react-hooks'; +import reactRefresh from 'eslint-plugin-react-refresh'; +import globals from 'globals'; + +export default tseslint.config( + { ignores: ['dist', 'src-tauri'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], + }, + }, +);