Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/lintBuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
run: npx tsc
- name: Lint
run: npm run lint
- name: Check formatting
run: npm run fmt:check
- name: Test
run: npm test run
- name: Build
Expand Down
22 changes: 21 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"jsPlugins": [
{
"name": "playwright",
"specifier": "eslint-plugin-playwright"
}
// eslint-plugin-react-hook-form won't work — all its rules use context.getScope()

Choose a reason for hiding this comment

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

Is this still the case? I believe getScope() may be implemented on the most recent releases of oxlint? https://github.com/oxc-project/oxc/blob/e9d346f1f219025229013da47386d387823c220e/apps/oxlint/src-js/plugins/scope.ts#L359

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like it, though only the access control rule errors like this. The other two don't seem to work, though — at least with the destructuring rule, I see things that should fail but aren't getting caught.

  × Error running JS plugin.
  │ File path: /Users/david/oxide/console/app/components/form/fields/TlsCertsField.tsx
  │ TypeError: context.getScope is not a function
  │     at check (/Users/david/oxide/console/node_modules/eslint-plugin-react-hook-form/lib/rules/no-access-control.js:43:12)
  │     at file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:20177:17
  │     at walkVariableDeclarator (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:18336:70)
  │     at walkNode (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:17746:4)
  │     at walkNode (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:17467:33)
  │     at walkVariableDeclaration (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:18332:109)
  │     at walkNode (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:17743:4)
  │     at walkNode (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:17467:33)
  │     at walkBlockStatement (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:18108:109)
  │     at walkNode (file:///Users/david/oxide/console/node_modules/oxlint/dist/lint.js:17575:4)

Choose a reason for hiding this comment

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

Warnings/errors aren't integrated into the editor extension yet for JS plugin violations, just in case you're expecting those to show up.

Otherwise, may be worth opening an issue in the oxc repo about this particular plugin having problems so they can be investigated. 🙇‍♂️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, putting it on my todo list.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

While putting together a repro at https://github.com/david-crespo/oxlint-rhf-plugin-repro, Claude notes:

Note: Had to use ESLint 8.57.1 because eslint-plugin-react-hook-form also uses context.getScope() which was removed in ESLint 9 (replaced with sourceCode.getScope()). The plugin itself needs updating for ESLint 9 compatibility.

This could explain the above.

Copy link

@connorshea connorshea Dec 29, 2025

Choose a reason for hiding this comment

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

@david-crespo Looks like that is planned for support, though it won't be until late next month at the absolute earliest: oxc-project/oxc#17130

Reach out if you run into any other problems!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you! Subscribed to that issue.

],
"plugins": [
"import",
"react",
"jsx-a11y",
"promise",
// defaults (see https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins)
"eslint",
"unicorn",
"typescript",
"oxc"
Expand Down Expand Up @@ -74,7 +82,19 @@
// catch unawaited Playwright calls in e2e tests
"files": ["test/e2e/**/*.ts"],
"rules": {
"@typescript-eslint/no-floating-promises": "error"
"@typescript-eslint/no-floating-promises": "error",
"playwright/expect-expect": [
"warn",
{
"assertFunctionNames": [
"expectVisible",
"expectRowVisible",
"expectOptions",
"expectRowMenuStaysOpen"
]
}
],
"playwright/no-force-option": "off"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"oxc.oxc-vscode",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
]
Expand Down
11 changes: 5 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[javascript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[javascriptreact]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[typescriptreact]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"eslint.format.enable": true,
"tailwindCSS.experimental.classRegex": ["classed.[a-z]+`([^`]*)`"],
"css.customData": ["./.vscode/css.json"],
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
"package.json": "package-lock.json, .babelrc, .editorconfig, .eslint*, .figma*, .github*, .huskyrc*, plopfile*, .prettier*, .vscode*, playwright.config.*, prettier*, tsconfig.*, vitest.config.*, yarn*, postcss.config.*, tailwind.config.*, vite.config.ts, mockServiceWorker.js, vercel.json, .licenserc.yaml, LICENSE"
"package.json": "package-lock.json, .babelrc, .editorconfig, .figma*, .github*, .huskyrc*, plopfile*, .oxlintrc*, .prettier*, .vscode*, playwright.config.*, prettier*, tsconfig.*, vitest.config.*, yarn*, postcss.config.*, tailwind.config.*, vite.config.ts, mockServiceWorker.js, vercel.json, .licenserc.yaml, LICENSE"
},
"vite.browserType": "system",
"vite.buildCommand": "npm run build",
Expand Down
1 change: 1 addition & 0 deletions app/components/form/fields/RadioField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function RadioField<
</div>
<RadioGroup
defaultChecked={field.value}
// oxlint-disable-next-line jsx-a11y/aria-proptypes -- https://github.com/oxc-project/oxc/issues/17465
aria-labelledby={`${id}-label`}
onChange={(e) =>
parseValue ? field.onChange(parseValue(e.target.value)) : field.onChange(e)
Expand Down
1 change: 1 addition & 0 deletions app/components/form/fields/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const TextFieldInner = <
title={label}
type={type}
error={!!error}
// oxlint-disable-next-line jsx-a11y/aria-proptypes -- https://github.com/oxc-project/oxc/issues/17465
aria-labelledby={`${id}-label ${id}-help-text`}
onChange={(e) => onChange(transform ? transform(e.target.value) : e.target.value)}
{...fieldRest}
Expand Down
1 change: 0 additions & 1 deletion app/table/cells/BooleanCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Copyright Oxide Computer Company
*/

/* eslint-disable jsx-a11y/aria-proptypes */
// there seems to be a bug in the linter. it doesn't want you to use the string
// "true" because it insists it's a boolean
import { Disabled12Icon, Success12Icon } from '@oxide/design-system/icons/react'
Expand Down
173 changes: 0 additions & 173 deletions eslint.config.ts

This file was deleted.

Loading
Loading