-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,13 @@ | ||||||
| { | ||||||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||||||
| // Enable TypeScript, Unicorn, and Oxc plugins | ||||||
| "plugins": ["typescript", "unicorn", "oxc"], | ||||||
| // Enable TypeScript, Unicorn, Oxc, Node, JSDoc, and Import plugins | ||||||
| "plugins": ["typescript", "unicorn", "oxc", "node", "jsdoc", "import"], | ||||||
| // Environment settings | ||||||
| "env": { | ||||||
| "builtin": true, | ||||||
| "es2024": true, | ||||||
| "node": true, | ||||||
| }, | ||||||
| // Ignore patterns | ||||||
| "ignorePatterns": ["dist", "node_modules", ".claude", "tmp", "*.log", "/nix/store/**"], | ||||||
| // Rule categories - strict base configuration | ||||||
|
|
@@ -99,6 +105,44 @@ | |||||
| "ts-expect-error": "allow-with-description", | ||||||
| }, | ||||||
| ], | ||||||
| // =================== | ||||||
| // Node.js Rules | ||||||
| // =================== | ||||||
| // Disallow direct assignment to exports | ||||||
| "node/no-exports-assign": "error", | ||||||
| // Disallow new require calls | ||||||
| "node/no-new-require": "error", | ||||||
| // =================== | ||||||
| // JSDoc Rules | ||||||
| // =================== | ||||||
| "jsdoc/check-access": "warn", | ||||||
| "jsdoc/check-property-names": "warn", | ||||||
| "jsdoc/empty-tags": "warn", | ||||||
| "jsdoc/implements-on-classes": "warn", | ||||||
| "jsdoc/no-defaults": "warn", | ||||||
| "jsdoc/require-param-name": "warn", | ||||||
| "jsdoc/require-property": "warn", | ||||||
| "jsdoc/require-property-description": "warn", | ||||||
| "jsdoc/require-property-name": "warn", | ||||||
| "jsdoc/require-returns-description": "warn", | ||||||
| // =================== | ||||||
| // Import Rules | ||||||
| // =================== | ||||||
| // Enforce top-level type specifier style | ||||||
| "import/consistent-type-specifier-style": ["error", "top-level"], | ||||||
|
||||||
| "import/consistent-type-specifier-style": ["error", "top-level"], | |
| "import/consistent-type-specifier-style": ["error", "inline"], |
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-assignandnode/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()orexports(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.