diff --git a/Makefile b/Makefile index d0f24d9e412..cce152f989a 100644 --- a/Makefile +++ b/Makefile @@ -703,9 +703,9 @@ else cd site # Avoid writing files in CI to reduce file write activity ifdef CI - pnpm run check --linter-enabled=false + pnpm exec biome check --error-on-warnings --linter-enabled=false . else - pnpm run check:fix + pnpm exec biome check --error-on-warnings --fix . endif endif .PHONY: fmt/ts diff --git a/site/AGENTS.md b/site/AGENTS.md index a0b39df845e..c8a73e102c4 100644 --- a/site/AGENTS.md +++ b/site/AGENTS.md @@ -28,7 +28,7 @@ Use the TypeScript language server when available for definitions, references, t | Unit tests | `pnpm test` | | One unit file | `pnpm test path/to/file.test.ts` | | Typecheck | `pnpm lint:types` | -| Biome check | `pnpm check` | +| Code check | `pnpm check` | | Lint | `pnpm lint` | | Fix lint | `pnpm lint:fix` | | Format | `pnpm format` | @@ -49,7 +49,7 @@ Some end-to-end tests require a license. The Storybook MCP at `http://localhost: ## TypeScript and data flow -- Use ES modules and Biome. Prefer `for...of` over `forEach`. +- Use ES modules. Run Oxlint for JavaScript and TypeScript linting and Biome for formatting. Prefer `for...of` over `forEach`. - Access browser globals directly. This is a client-only SPA, so do not guard them with `typeof window` or similar checks. - Components must not call API functions directly. Use established React Query definitions and key hierarchies. - Use `mutate()` with callbacks when the result does not need to be awaited. Do not swallow mutation failures in empty catches. diff --git a/site/biome.jsonc b/site/biome.jsonc index 711701b4f77..5993d60c665 100644 --- a/site/biome.jsonc +++ b/site/biome.jsonc @@ -3,6 +3,9 @@ "files": { "includes": ["!e2e/**/*Generated.ts", "!scripts/*.mjs", "!src/vendor"] }, + "javascript": { + "linter": { "enabled": false } + }, "linter": { "rules": { "a11y": { diff --git a/site/package.json b/site/package.json index 4068f45f77d..e290812c943 100644 --- a/site/package.json +++ b/site/package.json @@ -7,21 +7,21 @@ "packageManager": "pnpm@12.16.1+sha512.091d1dee7927575661b25dab3c2ae31cafc1c54d6b71ed6a6600cf0c1cb10434a447eae14015f1b23e2e6bedeed79df94a932e2164d2832280dce3fb32f656d1", "scripts": { "build": "NODE_ENV=production pnpm vite build", - "check": "biome check --error-on-warnings .", - "check:fix": "biome check --error-on-warnings --fix .", + "check": "biome check --error-on-warnings . && pnpm run lint:oxlint", + "check:fix": "pnpm run lint:oxlint --fix; lint_status=$?; biome check --error-on-warnings --fix . && exit \"$lint_status\"", "check:all": "pnpm check && pnpm test", "dev": "vite", "format": "biome format --write .", "format:check": "biome format .", - "lint": "pnpm run lint:check && pnpm run lint:oxlint && pnpm run lint:types && pnpm run lint:circular-deps && pnpm run lint:compiler && pnpm run lint:sentence-case && knip", + "lint": "pnpm run lint:check && pnpm run lint:types && pnpm run lint:circular-deps && pnpm run lint:compiler && pnpm run lint:sentence-case && knip", "lint:compiler": "node scripts/check-compiler.mjs", "lint:sentence-case": "node scripts/check-sentence-case.mjs", - "lint:check": "biome lint --error-on-warnings .", + "lint:check": "biome lint --error-on-warnings . && pnpm run lint:oxlint", "lint:oxlint": "oxlint --deny-warnings", "lint:design-system": "oxlint --config .oxlintrc.design-system.jsonc", "lint:circular-deps": "dpdm --no-tree --no-warning -T ./src/App.tsx", "lint:knip": "knip", - "lint:fix": "biome lint --error-on-warnings --write . && knip --fix", + "lint:fix": "biome lint --error-on-warnings --write . && pnpm run lint:oxlint --fix && knip --fix", "lint:types": "tsc -p .", "playwright:install": "playwright install --with-deps chromium", "playwright:test": "make -C .. site/e2e/bin/coder && playwright test --config=e2e/playwright.config.ts", diff --git a/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx b/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx index 25a50800be7..f5760b4da47 100644 --- a/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx +++ b/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx @@ -482,8 +482,6 @@ export const MultiSelectCombobox: React.FC = ({ heading={key} className="h-full overflow-auto" > - {/* biome-ignore lint/complexity/noUselessFragments: A parent element is - needed for multiple dropdown items */} <> {dropdowns.map((option) => { return ( diff --git a/site/src/modules/dashboard/DashboardLayout.tsx b/site/src/modules/dashboard/DashboardLayout.tsx index 4facbdb79a2..1e93595cba3 100644 --- a/site/src/modules/dashboard/DashboardLayout.tsx +++ b/site/src/modules/dashboard/DashboardLayout.tsx @@ -21,7 +21,6 @@ export const DashboardLayout: React.FC = () => {
- {/* biome-ignore lint/a11y/useValidAnchor: Skip links use fragment anchors by design. */} { diff --git a/site/src/modules/workspaces/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx b/site/src/modules/workspaces/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx index 431b30ace64..26649e891f3 100644 --- a/site/src/modules/workspaces/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx +++ b/site/src/modules/workspaces/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx @@ -34,8 +34,7 @@ export const WorkspaceOutdatedTooltip: React.FC< const [isOpen, setIsOpen] = useState(false); // Keep trigger clicks from triggering a parent clickable row's navigation. - // Radix composes its own click handler, so the popover still opens. The - // span's key handlers only satisfy Biome's lint/a11y/useKeyWithClickEvents. + // Radix composes its own click handler, so the popover still opens. const stopPropagation = (event: React.SyntheticEvent) => { event.stopPropagation(); }; diff --git a/site/src/pages/AgentsPage/components/AgentChatSendButton.tsx b/site/src/pages/AgentsPage/components/AgentChatSendButton.tsx index 15c20a28013..f577995c399 100644 --- a/site/src/pages/AgentsPage/components/AgentChatSendButton.tsx +++ b/site/src/pages/AgentsPage/components/AgentChatSendButton.tsx @@ -192,7 +192,6 @@ const AgentChatSendMenu: React.FC = ({ asChild disabled type={undefined} - // biome-ignore lint/a11y/useValidAriaValues: undefined removes the Radix default. aria-haspopup={undefined} aria-expanded={undefined} >