-
Notifications
You must be signed in to change notification settings - Fork 3
chore(lint): add node, jsdoc, import plugins to oxlint config #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add node, jsdoc, import plugins - Add env settings (builtin, es2024, node) - Add Node.js rules (no-exports-assign, no-new-require) - Add JSDoc rules for documentation validation - Add Import rules for consistent imports - Add curly rule for consistent brace style
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR extends the oxlint configuration by adding three new linting plugins (node, jsdoc, import) along with their associated rules, environment settings, and a curly brace style rule. The changes align the configuration with common oxlint best practices for Node.js/TypeScript projects.
Key Changes:
- Added node, jsdoc, and import plugins to enable additional linting capabilities
- Configured environment settings (builtin, es2024, node) for proper global resolution
- Added 17 new linting rules across Node.js, JSDoc, Import, and Style categories
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Import Rules | ||
| // =================== | ||
| // Enforce top-level type specifier style | ||
| "import/consistent-type-specifier-style": ["error", "top-level"], |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import/consistent-type-specifier-style rule is set to "top-level", which conflicts with the existing typescript/consistent-type-imports rule on line 77 that uses fixStyle: "inline-type-imports".
The TypeScript rule enforces inline type imports like import { type Foo, Bar } from './module', while this Import rule enforces top-level type imports like import type { Foo } from './module'.
Consider either:
- Changing this to
["error", "inline"]to match the TypeScript rule configuration, or - Changing the TypeScript rule's
fixStyleto"separate-type-imports"(if supported)
The recommended approach is option 1 to maintain consistency with the existing TypeScript rule.
| "import/consistent-type-specifier-style": ["error", "top-level"], | |
| "import/consistent-type-specifier-style": ["error", "inline"], |
| "node/no-exports-assign": "error", | ||
| // Disallow new require calls | ||
| "node/no-new-require": "error", |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] These Node.js rules (node/no-exports-assign and node/no-new-require) are designed for CommonJS patterns, but this project uses ES modules exclusively ("type": "module" in package.json).
Since the codebase doesn't use require() or exports (confirmed by searching the source), these rules will likely never trigger and provide limited value.
Consider whether these rules are necessary for this project, or if they're being added preemptively for potential CommonJS code. If they're not needed, removing them would simplify the configuration.
| "node/no-exports-assign": "error", | |
| // Disallow new require calls | |
| "node/no-new-require": "error", | |
| // Disallow new require calls |
Summary
node,jsdoc,importplugins to oxlint configurationbuiltin,es2024,node)no-exports-assign,no-new-require)curlyrule for consistent brace styleTest plan
pnpm oxlintpasses with no errorsSummary by cubic
Expand oxlint config with Node, JSDoc, and Import plugins, plus env settings, to tighten linting and standardize style. This catches Node misuse, validates docs, and enforces consistent imports.
Written for commit b36c8b5. Summary will update automatically on new commits.