Skip to content
Merged
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
48 changes: 46 additions & 2 deletions .oxlintrc.jsonc
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
Expand Down Expand Up @@ -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",
Comment on lines +112 to +114
Copy link

Copilot AI Dec 9, 2025

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.

Suggested change
"node/no-exports-assign": "error",
// Disallow new require calls
"node/no-new-require": "error",
// Disallow new require calls

Copilot uses AI. Check for mistakes.
// ===================
// 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"],
Copy link

Copilot AI Dec 9, 2025

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:

  1. Changing this to ["error", "inline"] to match the TypeScript rule configuration, or
  2. Changing the TypeScript rule's fixStyle to "separate-type-imports" (if supported)

The recommended approach is option 1 to maintain consistency with the existing TypeScript rule.

Suggested change
"import/consistent-type-specifier-style": ["error", "top-level"],
"import/consistent-type-specifier-style": ["error", "inline"],

Copilot uses AI. Check for mistakes.
// Ensure imports are at the top
"import/first": "error",
// Disallow duplicate imports
"import/no-duplicates": "error",
// Disallow mutable exports
"import/no-mutable-exports": "error",
// Disallow named default exports
"import/no-named-default": "error",
// ===================
// Style Rules
// ===================
// Enforce consistent brace style for all control statements
"curly": ["error", "all"],
},
"overrides": [
{
Expand Down
Loading