* feat: hygiene, dep upgrades, Tauri, binary formats, reverse conversion Đợt sửa lỗi 2 — five phases landed together: 1. Build & type hygiene: fix 8 TS strict errors (override, exactOptional, Uint8Array<ArrayBuffer> for Blob), switch `typecheck` to `tsc -b --noEmit`, refactor ThemeToggle to click-outside + Escape (replaces the racy onBlur close), fix 10 pre-existing test failures. 2. Dep upgrades: jsdom 25→29, vite 6→8 (Rolldown), @vitejs/plugin-react 4→6, engines.node >=22.11, manualChunks converted to function form. 3. Tauri process hygiene: explicit RunEvent::ExitRequested + WindowEvent::CloseRequested cleanup; docs/TAURI-NOTES.md captures the WebView2 GDI leak (upstream). 4. Binary converters: BSON, CBOR, MessagePack with base64/hex display encoding; OutputPanel decodes back to raw bytes on download. 5. Reverse conversion: Converter.reverse() interface, JSONL/CSV/YAML/ TOML/RESX → JSON impls, DirectionToggle UI, FormatPicker disables non-reversible formats in reverse mode. 175 tests pass (was 137). Build clean. CI scripts now meaningful. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: apply prettier + ignore src-tauri/target in eslint CI's format:check stage caught 24 files that didn't match the project's prettier config. Run `npm run format` to normalize. Also widen the eslint ignore list to skip cargo build output under src-tauri/target so local Rust builds don't pollute the lint run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(build): switch minifier to oxc for Vite 8 / Rolldown compat Vite 8 deprecated `transformWithEsbuild`; selecting `minify: 'esbuild'` now requires esbuild as a separate install. CI didn't have it (we don't list it as a dep), so the production build failed with `Cannot find package 'esbuild'`. Switching to oxc — the Rolldown-native minifier already included with Vite 8 — fixes the build with no new deps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ['dist', 'node_modules', 'src/components/ui/**', 'src-tauri/**'] },
|
|
{
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
files: ['**/*.{ts,tsx}'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
globals: globals.browser,
|
|
},
|
|
plugins: {
|
|
'react-hooks': reactHooks,
|
|
'react-refresh': reactRefresh,
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
'react-refresh/only-export-components': [
|
|
'warn',
|
|
{ allowConstantExport: true },
|
|
],
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
],
|
|
'@typescript-eslint/consistent-type-imports': [
|
|
'error',
|
|
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
|
|
],
|
|
},
|
|
},
|
|
);
|