Skip to content

Conversation

@prosdev
Copy link
Contributor

@prosdev prosdev commented Oct 21, 2025

Closes #24

This pull request migrates the project from ESLint and Prettier to Biome for linting and formatting, updates the continuous integration workflow to use Biome and TypeScript type checking, and standardizes TypeScript types and dependencies across packages. It also improves import ordering and code style consistency in several files.

Migration to Biome (Linting & Formatting):

  • Added biome.json configuration file and Biome as a dev dependency in package.json, specifying formatting, linting, and ignore rules.
  • Replaced ESLint and Prettier scripts with Biome equivalents in package.json and .lintstagedrc.json, removing related config and ignore files (.eslintrc.js, .eslintignore, .prettierrc.json, .prettierignore).
  • Updated import ordering and code style in multiple files for consistency with Biome formatting.

Continuous Integration Workflow Updates:

  • Updated .github/workflows/ci.yml to run Biome linting and TypeScript type checking before tests and build.
  • Revised .github/CI.md to document the new CI steps and local development commands, replacing ESLint/Prettier references with Biome and typecheck steps.

TypeScript and Dependency Standardization:

  • Standardized @types/react and @types/react-dom to version ^18.2.0 in both root and experience-editor package dependencies.

These changes modernize the project's code quality tooling, improve developer experience, and ensure consistent formatting and type safety across the codebase.

Downgrade @types/react and @types/react-dom to ^18.2.0 in experience-editor.
Add resolutions in root package.json to force all packages to use React 18 types.
Fix TypeScript errors in targetFlow.ts by removing invalid fieldsToShow properties.
Update moduleResolution to 'bundler' and add skipLibCheck to fix Vite type issues.
All typecheck errors now resolved.
Install @biomejs/biome v2.2.6 as devDependency.
Create biome.json configuration matching existing ESLint and Prettier rules:
- Formatting: 80 char width, semicolons, double quotes, 2 space indent, trailing commas
- Linting: recommended rules with customizations for React/TypeScript
- Disable strict rules for any, forEach, non-null assertions
- Special rules for test and story files
Apply Biome formatting and linting fixes across the entire codebase.
Organize imports, fix unused imports, and apply consistent code style.
Remove ESLint and Prettier configuration files:
- Delete .eslintrc.js, .eslintignore
- Delete .prettierrc.json, .prettierignore

Update package.json scripts to use Biome:
- lint: biome check .
- lint:fix: biome check --write .
- format: biome format --write .

Update .lintstagedrc.json to run Biome on pre-commit.
Add quality checks to CI workflow:
- Lint step: runs Biome linter on all source files
- Type check step: runs TypeScript type checking across all packages

Update .github/CI.md documentation:
- Document new lint and typecheck steps
- Add instructions for running checks locally
- Include lint:fix command for auto-fixing issues

Closes #24
Fix 11 linting errors across 6 files:
- Remove useless empty fragment in formBuilder
- Remove unused function parameter (spacing) in messaging component
- Fix comma operator in useEffect dependency array
- Remove unused variable (position) in selectMultiple
- Add useId hooks for TextField components to avoid hardcoded IDs
- Add missing key prop in map iteration
- Add type annotations for implicit any variables
- Remove unreachable return statement
- Escape // in JSX to avoid comment interpretation

Lint now passes with only 1 non-blocking warning about document.cookie.
Add es2022 and dom to lib in tsconfig to support Object.hasOwn method used in objects.ts.
This fixes typecheck errors while maintaining es5 as the compile target.
@prosdev prosdev merged commit d380516 into main Oct 23, 2025
1 check passed
@prosdev prosdev deleted the issue/24-migrate-to-biome branch October 23, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add type checking and linting to CI pipeline

3 participants