mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 01:45:54 +08:00
fix: CI 切换到 MSVC 工具链、添加 eslint.config.js
- Rust: windows-latest 默认 MSVC,无需额外安装 GNU/MinGW - ESLint: 添加 eslint flat config(js + tseslint + react-hooks) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -42,14 +42,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Cargo Check
|
||||||
run: cargo check
|
run: cargo check
|
||||||
|
|
||||||
|
|||||||
@@ -21,14 +21,6 @@ jobs:
|
|||||||
|
|
||||||
- run: npm ci
|
- 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
|
- name: Tauri Build
|
||||||
run: npx tauri build
|
run: npx tauri build
|
||||||
|
|
||||||
|
|||||||
@@ -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 }],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user