Skip to content

Commit b36c8b5

Browse files
committed
chore(lint): add node, jsdoc, import plugins to oxlint config
- 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
1 parent 15e849f commit b36c8b5

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

.oxlintrc.jsonc

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
3-
// Enable TypeScript, Unicorn, and Oxc plugins
4-
"plugins": ["typescript", "unicorn", "oxc"],
3+
// Enable TypeScript, Unicorn, Oxc, Node, JSDoc, and Import plugins
4+
"plugins": ["typescript", "unicorn", "oxc", "node", "jsdoc", "import"],
5+
// Environment settings
6+
"env": {
7+
"builtin": true,
8+
"es2024": true,
9+
"node": true,
10+
},
511
// Ignore patterns
612
"ignorePatterns": ["dist", "node_modules", ".claude", "tmp", "*.log", "/nix/store/**"],
713
// Rule categories - strict base configuration
@@ -99,6 +105,44 @@
99105
"ts-expect-error": "allow-with-description",
100106
},
101107
],
108+
// ===================
109+
// Node.js Rules
110+
// ===================
111+
// Disallow direct assignment to exports
112+
"node/no-exports-assign": "error",
113+
// Disallow new require calls
114+
"node/no-new-require": "error",
115+
// ===================
116+
// JSDoc Rules
117+
// ===================
118+
"jsdoc/check-access": "warn",
119+
"jsdoc/check-property-names": "warn",
120+
"jsdoc/empty-tags": "warn",
121+
"jsdoc/implements-on-classes": "warn",
122+
"jsdoc/no-defaults": "warn",
123+
"jsdoc/require-param-name": "warn",
124+
"jsdoc/require-property": "warn",
125+
"jsdoc/require-property-description": "warn",
126+
"jsdoc/require-property-name": "warn",
127+
"jsdoc/require-returns-description": "warn",
128+
// ===================
129+
// Import Rules
130+
// ===================
131+
// Enforce top-level type specifier style
132+
"import/consistent-type-specifier-style": ["error", "top-level"],
133+
// Ensure imports are at the top
134+
"import/first": "error",
135+
// Disallow duplicate imports
136+
"import/no-duplicates": "error",
137+
// Disallow mutable exports
138+
"import/no-mutable-exports": "error",
139+
// Disallow named default exports
140+
"import/no-named-default": "error",
141+
// ===================
142+
// Style Rules
143+
// ===================
144+
// Enforce consistent brace style for all control statements
145+
"curly": ["error", "all"],
102146
},
103147
"overrides": [
104148
{

0 commit comments

Comments
 (0)