Skip to content

Replace ESLint, Stylelint, and Prettier with Biome - #961

Open
digitalbase wants to merge 2 commits into
mainfrom
consolidation/biome
Open

Replace ESLint, Stylelint, and Prettier with Biome#961
digitalbase wants to merge 2 commits into
mainfrom
consolidation/biome

Conversation

@digitalbase

Copy link
Copy Markdown

Summary

Switch the project from the ESLint + Stylelint + Prettier stack to Biome so linting/formatting is consolidated in one tool and local/CI checks are simpler to maintain.

Changes

  • add biome.json, replace lint scripts in package.json, and remove ESLint/Stylelint/Prettier dependencies and config files
  • update docs and TypeScript include list to match the new tooling setup
  • apply Biome-driven safe autofixes and small cleanup changes across touched TS/TSX files

Testing

  • ./node_modules/.bin/biome check .
  • ./node_modules/.bin/tsc --noEmit --incremental

@digitalbase digitalbase self-assigned this Mar 3, 2026

@marie-hermes-agent marie-hermes-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR replaces ESLint, Stylelint, and Prettier with Biome. The configuration looks reasonable but there are several code quality issues introduced by the automated migration.

const { paddingLeft, paddingRight } = getComputedStyle(containerRef.current);
const containerWidthWithoutPadding =
containerWidth - parseInt(paddingLeft) - parseInt(paddingRight);
containerWidth - Number.parseInt(paddingLeft) - Number.parseInt(paddingRight);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change - Number.parseInt() is preferred over the global parseInt() function for better clarity and consistency.

export function formatBytes(bytes: number | string): string {
let l = 0;
let n = typeof bytes === 'number' ? bytes : parseInt(bytes, 10) || 0;
let n = typeof bytes === 'number' ? bytes : Number.parseInt(bytes, 10) || 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change - Number.parseInt() is preferred over the global parseInt() function.


useEffect(() => {
if (typeof window !== undefined) {
if (typeof window !== 'undefined') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition will always be true. typeof window returns a string, so it will never be undefined (the value). This should be typeof window !== 'undefined' to check if the window object exists. This is a critical bug that could cause issues in SSR environments.

>
<div className="container">
<nav role="navigation" className={styles.header}>
<nav className={styles.header}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the role="navigation" attribute reduces accessibility. The <nav> element already has implicit navigation role, but explicit roles are often preferred for screen readers and accessibility tools. Consider keeping this attribute.

Comment thread biome.json
"useOptionalChain": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling useExhaustiveDependencies could lead to React Hook dependency issues and potential bugs. This rule helps catch missing dependencies in useEffect, useMemo, and useCallback hooks. Consider enabling this rule and fixing the violations instead.

Comment thread biome.json
"useExhaustiveDependencies": "off"
},
"security": {
"noDangerouslySetInnerHtml": "off"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling noDangerouslySetInnerHtml removes an important security check. This rule helps prevent XSS vulnerabilities. If you need to use dangerouslySetInnerHTML, it should be done carefully with proper sanitization.

Comment thread biome.json
"useNodejsImportProtocol": "off"
},
"suspicious": {
"noExplicitAny": "off",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling noExplicitAny removes type safety checks. This could lead to less type-safe code. Consider enabling this rule and gradually fixing any types with proper TypeScript types.

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.

1 participant