Review of #157 (Request changes) caught two blockers: 1. DEAD responsive CSS: the `@media (max-width:600px)` float-reset was added to `image-resize.module.css`, which is imported NOWHERE — the image container's classes come from `common/node-resize.module.css` (via buildResizeClasses). So on mobile a floated image kept its px width + float and crushed the text, exactly the failure the rule promised to prevent. Moved the rule to `common/node-resize.module.css` (the module actually imported by the resize node views); its `:global([data-image-align=...])` selectors are data-attr based, so they work unchanged. Reverted the dead addition from the (pre-existing, orphaned) image-resize.module.css. 2. `applyAlignment` was untested. Exported it and added `image.spec.ts` (vitest/ jsdom) covering all five align values, the data-image-align mirror, and the floatLeft -> left reset-then-apply (the guard against a leaked float). Switched the float writes to the canonical CSSOM `cssFloat` property (portable: browsers + jsdom; behavior identical to the `.float` alias). editor-ext build + client tsc clean; 6 image.spec tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist