mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Transform-extension sync previously wrote each generated file via runExtensionFile unconditionally, so a regular local target file (e.g. a hand-edited hello.toml) could be overwritten from hello.md without --force, violating the same conflict contract that copy/merge modes honor. - Split runExtension (subprocess → bytes) from runExtensionFile (writes), and have syncExtraTransform apply the conflict/force rules: idempotent when identical, skipped on conflict without --force, overwrite with --force, and auto-replace leftover symlinks. - Centralize the copy-only mode rule in SyncExtra so the API and CLI reject extension+merge/symlink identically; align the server sync handler's mode normalization (EffectiveMode's "merge" default no longer leaks through). - CLI `extras list` no longer short-circuits to an "extension" status before existence/drift checks. Status is now computed via output_ext-aware CheckSyncStatus; a new Extension field carries the display label, decoupled from sync status (plain-text + TUI rendering updated). - Roll back the optimistic cache update in the UI mode-change handler on failure (fixes the unused-var build break). Adds regression tests covering conflict skip/force/idempotent/symlink-replace and non-copy mode rejection.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])