mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
* fix(ui): pick nothing by default when taking over hooks from targets
The hooks import dialog is also where a hook is edited or removed in its
target file without importing it, but it opened with every hook ticked,
so managing removals could import the rest by accident. It now opens
with nothing selected, and its entry points are named for what they
show ("Hooks in targets", "Not managed yet") instead of "Import".
The review step stacked three scroll areas (dialog body, file list,
diff) and listed each removed hook three times. The dialog body is now
the only thing that scrolls, hook names are listed once, a file card
shows a count per action, and its diff opens on request. The other hook
previews share the component: their diffs still start open but lose the
inner scroll and gain the same toggle.
Adding or editing a hook now uses the same command cards as editing one
in a target: collapsible, with a multi-line editor that can be expanded.
A collapsed card with a missing field is marked. The variable buttons
append to the command there instead of inserting at the cursor.
A missing OpenCode CLI showed the raw exec error when reading its hooks;
it now says the command was not found and what to do.
* fix(ui): explain a missing OpenCode CLI in hook plan warnings
The sync preview, Sync page and target hooks views show the same
failure as a plan warning, wrapped as "target X: detect OpenCode API
...; its hook bindings are skipped". That form still put the raw exec
error in parentheses. It now says the command was not found, that the
bindings are skipped, and what to do. Other detection failures keep
the existing message with the detail.
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...
},
},
])