eslint-plugin-oxfmt 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/dist/index.mjs +165 -159
- package/dts/rule-options.d.ts +12 -12
- package/package.json +13 -13
- package/workers/oxfmt.mjs +1 -0
package/README.md
CHANGED
|
@@ -225,7 +225,7 @@ For detailed behavior, see:
|
|
|
225
225
|
|
|
226
226
|
### JSDoc Options
|
|
227
227
|
|
|
228
|
-
Use `jsdoc` to enable and configure JSDoc comment formatting. Pass an object
|
|
228
|
+
Use `jsdoc` to enable and configure JSDoc comment formatting. Pass `true` to enable defaults, or pass an object for custom behavior (for example `jsdoc: {}`).
|
|
229
229
|
|
|
230
230
|
| Option | Type | Default | Description |
|
|
231
231
|
| ----------------------------------- | --------------------------------------- | -------------- | ------------------------------------------------------ |
|
|
@@ -241,16 +241,20 @@ Use `jsdoc` to enable and configure JSDoc comment formatting. Pass an object to
|
|
|
241
241
|
| `jsdoc.separateReturnsFromParam` | `boolean` | `false` | Add a blank line between final `@param` and `@returns` |
|
|
242
242
|
| `jsdoc.separateTagGroups` | `boolean` | `false` | Add blank lines between different tag groups |
|
|
243
243
|
|
|
244
|
+
Tip: `jsdoc: true` is equivalent to enabling JSDoc with default settings.
|
|
245
|
+
|
|
244
246
|
### Advanced Options
|
|
245
247
|
|
|
246
248
|
| Option | Type | Default | Description |
|
|
247
249
|
| ----------------- | ------------------- | -------- | ---------------------------------------------------------------------------- |
|
|
248
|
-
| `sortImports` | `object`
|
|
250
|
+
| `sortImports` | `boolean \| object` | disabled | Experimental import sorting configuration |
|
|
249
251
|
| `sortPackageJson` | `boolean \| object` | `true` | Experimental package.json sorting (object form: `{ sortScripts?: boolean }`) |
|
|
250
|
-
| `sortTailwindcss` | `object`
|
|
252
|
+
| `sortTailwindcss` | `boolean \| object` | disabled | Experimental Tailwind CSS class sorting (enable with `{}` for defaults) |
|
|
251
253
|
|
|
252
254
|
#### Import sorting (`sortImports`)
|
|
253
255
|
|
|
256
|
+
Use `sortImports: true` to enable import sorting with defaults, or pass an object to customize behavior.
|
|
257
|
+
|
|
254
258
|
Available keys:
|
|
255
259
|
|
|
256
260
|
- `customGroups`: Ordered custom group definitions `{ elementNamePattern?: string[]; groupName?: string; modifiers?: string[]; selector?: string }[]`
|
|
@@ -270,7 +274,7 @@ Available keys:
|
|
|
270
274
|
|
|
271
275
|
#### Tailwind CSS class sorting
|
|
272
276
|
|
|
273
|
-
Enable experimental Tailwind CSS class sorting powered by `prettier-plugin-tailwindcss` (pass an
|
|
277
|
+
Enable experimental Tailwind CSS class sorting powered by `prettier-plugin-tailwindcss` (set `sortTailwindcss: true` for defaults, or pass an object for custom options):
|
|
274
278
|
|
|
275
279
|
```js
|
|
276
280
|
// eslint.config.mjs
|
package/dist/index.mjs
CHANGED
|
@@ -59,7 +59,7 @@ const configs = { recommended };
|
|
|
59
59
|
//#region src/meta.ts
|
|
60
60
|
const meta = {
|
|
61
61
|
name: "eslint-plugin-oxfmt",
|
|
62
|
-
version: "0.
|
|
62
|
+
version: "0.4.0"
|
|
63
63
|
};
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/dir.ts
|
|
@@ -184,61 +184,63 @@ const oxfmtOptionsSchema = {
|
|
|
184
184
|
type: "boolean"
|
|
185
185
|
},
|
|
186
186
|
jsdoc: {
|
|
187
|
-
additionalProperties: false,
|
|
188
187
|
description: `Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass an object (\`jsdoc: {}\`) to enable with defaults, or omit to disable.\n\n- (Default: Disabled)`,
|
|
189
|
-
type: "
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
"singleLine"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
188
|
+
oneOf: [{ type: "boolean" }, {
|
|
189
|
+
additionalProperties: false,
|
|
190
|
+
type: "object",
|
|
191
|
+
properties: {
|
|
192
|
+
addDefaultToDescription: {
|
|
193
|
+
description: `Append default values to \`@param\` descriptions (e.g. "Default is \`value\`").\n\n- (Default: true)`,
|
|
194
|
+
type: "boolean"
|
|
195
|
+
},
|
|
196
|
+
bracketSpacing: {
|
|
197
|
+
description: `Add spaces inside JSDoc type braces: \`{string}\` → \`{ string }\`.\n\n- (Default: false)`,
|
|
198
|
+
type: "boolean"
|
|
199
|
+
},
|
|
200
|
+
capitalizeDescriptions: {
|
|
201
|
+
description: `Capitalize the first letter of tag descriptions.\n\n- (Default: true)`,
|
|
202
|
+
type: "boolean"
|
|
203
|
+
},
|
|
204
|
+
commentLineStrategy: {
|
|
205
|
+
description: `How to format comment blocks.\n\n- \`"singleLine"\` — Convert to single-line \`/** content */\` when possible.\n- \`"multiline"\` — Always use multi-line format.\n- \`"keep"\` — Preserve original formatting.\n\n- (Default: "singleLine")`,
|
|
206
|
+
enum: [
|
|
207
|
+
"singleLine",
|
|
208
|
+
"multiline",
|
|
209
|
+
"keep"
|
|
210
|
+
],
|
|
211
|
+
type: "string"
|
|
212
|
+
},
|
|
213
|
+
descriptionTag: {
|
|
214
|
+
description: `Emit \`@description\` tag instead of inline description.\n\n- (Default: false)`,
|
|
215
|
+
type: "boolean"
|
|
216
|
+
},
|
|
217
|
+
descriptionWithDot: {
|
|
218
|
+
description: `Add a trailing dot to the end of descriptions.\n\n- (Default: false)`,
|
|
219
|
+
type: "boolean"
|
|
220
|
+
},
|
|
221
|
+
keepUnparsableExampleIndent: {
|
|
222
|
+
description: `Preserve indentation in unparsable \`@example\` code.\n\n- (Default: false)`,
|
|
223
|
+
type: "boolean"
|
|
224
|
+
},
|
|
225
|
+
lineWrappingStyle: {
|
|
226
|
+
description: `Strategy for wrapping description lines at print width.\n\n- \`"greedy"\` — Always re-wrap text to fit within print width.\n- \`"balance"\` — Preserve original line breaks if all lines fit within print width.\n\n- (Default: "greedy")`,
|
|
227
|
+
enum: ["greedy", "balance"],
|
|
228
|
+
type: "string"
|
|
229
|
+
},
|
|
230
|
+
preferCodeFences: {
|
|
231
|
+
description: `Use fenced code blocks (\`\`\`) instead of 4-space indentation for code without a language tag.\n\n- (Default: false)`,
|
|
232
|
+
type: "boolean"
|
|
233
|
+
},
|
|
234
|
+
separateReturnsFromParam: {
|
|
235
|
+
description: `Add a blank line between the last \`@param\` and \`@returns\`.\n\n- (Default: false)`,
|
|
236
|
+
type: "boolean"
|
|
237
|
+
},
|
|
238
|
+
separateTagGroups: {
|
|
239
|
+
description: `Add blank lines between different tag groups (e.g. between \`@param\` and \`@returns\`).\n\n- (Default: false)`,
|
|
240
|
+
type: "boolean"
|
|
241
|
+
}
|
|
240
242
|
}
|
|
241
|
-
}
|
|
243
|
+
}]
|
|
242
244
|
},
|
|
243
245
|
jsxSingleQuote: {
|
|
244
246
|
description: `Use single quotes instead of double quotes in JSX. (Default: false)`,
|
|
@@ -288,89 +290,91 @@ const oxfmtOptionsSchema = {
|
|
|
288
290
|
type: "boolean"
|
|
289
291
|
},
|
|
290
292
|
sortImports: {
|
|
291
|
-
additionalProperties: false,
|
|
292
293
|
description: `Experimental: Sort import statements. Disabled by default.`,
|
|
293
|
-
type: "
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
294
|
+
oneOf: [{ type: "boolean" }, {
|
|
295
|
+
additionalProperties: false,
|
|
296
|
+
type: "object",
|
|
297
|
+
properties: {
|
|
298
|
+
customGroups: {
|
|
299
|
+
description: `Define your own groups for matching very specific imports.\n\nThe customGroups list is ordered: The first definition that matches an element will be used.\nCustom groups have a higher priority than any predefined group.\n\nIf you want a predefined group to take precedence over a custom group,\nyou must write a custom group definition that does the same as what the predefined group does, and put it first in the list.\n\n- (Default: [])`,
|
|
300
|
+
type: "array",
|
|
301
|
+
items: {
|
|
302
|
+
additionalProperties: false,
|
|
303
|
+
type: "object",
|
|
304
|
+
properties: {
|
|
305
|
+
elementNamePattern: {
|
|
306
|
+
description: `List of glob patterns to match import sources for this group.`,
|
|
307
|
+
type: "array",
|
|
308
|
+
items: { type: "string" }
|
|
309
|
+
},
|
|
310
|
+
groupName: {
|
|
311
|
+
description: `Name of the custom group, used in the groups option.`,
|
|
312
|
+
type: "string"
|
|
313
|
+
},
|
|
314
|
+
modifiers: {
|
|
315
|
+
description: `Modifiers to match the import characteristics.\nAll specified modifiers must be present (AND logic).\n\nPossible values: "side_effect", "type", "value", "default", "wildcard", "named"`,
|
|
316
|
+
type: "array",
|
|
317
|
+
items: { type: "string" }
|
|
318
|
+
},
|
|
319
|
+
selector: {
|
|
320
|
+
description: `Selector to match the import kind.\n\nPossible values: "type", "side_effect_style", "side_effect", "style", "index", "sibling", "parent", "subpath", "internal", "builtin", "external", "import"`,
|
|
321
|
+
type: "string"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
groups: {
|
|
327
|
+
description: `Specifies a list of predefined import groups for sorting.\n\nEach import will be assigned a single group specified in the groups option (or the \`unknown\` group if no match is found).\nThe order of items in the \`groups\` option determines how groups are ordered.\n\nWithin a given group, members will be sorted according to the type, order, ignoreCase, etc. options.\n\nIndividual groups can be combined together by placing them in an array.\nThe order of groups in that array does not matter.\nAll members of the groups in the array will be sorted together as if they were part of a single group.\n\nPredefined groups are characterized by a single selector and potentially multiple modifiers.\nYou may enter modifiers in any order, but the selector must always come at the end.\n\nThe list of selectors is sorted from most to least important:\n- \`type\` — TypeScript type imports.\n- \`side_effect_style\` — Side effect style imports.\n- \`side_effect\` — Side effect imports.\n- \`style\` — Style imports.\n- \`index\` — Main file from the current directory.\n- \`sibling\` — Modules from the same directory.\n- \`parent\` — Modules from the parent directory.\n- \`subpath\` — Node.js subpath imports.\n- \`internal\` — Your internal modules.\n- \`builtin\` — Node.js Built-in Modules.\n- \`external\` — External modules installed in the project.\n- \`import\` — Any import.\n\nThe list of modifiers is sorted from most to least important:\n- \`side_effect\` — Side effect imports.\n- \`type\` — TypeScript type imports.\n- \`value\` — Value imports.\n- \`default\` — Imports containing the default specifier.\n- \`wildcard\` — Imports containing the wildcard (\`* as\`) specifier.\n- \`named\` — Imports containing at least one named specifier.\n\n- Default: See below\n\`\`\`json\n[\n\"builtin\",\n\"external\",\n[\"internal\", \"subpath\"],\n[\"parent\", \"sibling\", \"index\"],\n\"style\",\n\"unknown\"\n]\n\`\`\`\n\nAlso, you can override the global \`newlinesBetween\` setting for specific group boundaries\nby including a \`{ \"newlinesBetween\": boolean }\` marker object in the \`groups\` list at the desired position.`,
|
|
328
|
+
type: "array",
|
|
329
|
+
items: { anyOf: [
|
|
330
|
+
{ type: "string" },
|
|
331
|
+
{
|
|
313
332
|
type: "array",
|
|
314
333
|
items: { type: "string" }
|
|
315
334
|
},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
335
|
+
{
|
|
336
|
+
additionalProperties: false,
|
|
337
|
+
required: ["newlinesBetween"],
|
|
338
|
+
type: "object",
|
|
339
|
+
properties: { newlinesBetween: {
|
|
340
|
+
description: `A marker object for overriding \`newlinesBetween\` at a specific group boundary.`,
|
|
341
|
+
type: "boolean"
|
|
342
|
+
} }
|
|
319
343
|
}
|
|
320
|
-
}
|
|
344
|
+
] }
|
|
345
|
+
},
|
|
346
|
+
ignoreCase: {
|
|
347
|
+
description: `Ignore case when sorting. (Default: true)`,
|
|
348
|
+
type: "boolean"
|
|
349
|
+
},
|
|
350
|
+
internalPattern: {
|
|
351
|
+
description: `Glob patterns to identify internal imports.`,
|
|
352
|
+
type: "array",
|
|
353
|
+
items: { type: "string" }
|
|
354
|
+
},
|
|
355
|
+
newlinesBetween: {
|
|
356
|
+
description: `Add newlines between import groups. (Default: true)`,
|
|
357
|
+
type: "boolean"
|
|
358
|
+
},
|
|
359
|
+
order: {
|
|
360
|
+
description: `Sort order. (Default: "asc")`,
|
|
361
|
+
enum: ["asc", "desc"],
|
|
362
|
+
type: "string"
|
|
363
|
+
},
|
|
364
|
+
partitionByComment: {
|
|
365
|
+
description: `Partition imports by comments. (Default: false)`,
|
|
366
|
+
type: "boolean"
|
|
367
|
+
},
|
|
368
|
+
partitionByNewline: {
|
|
369
|
+
description: `Partition imports by newlines. (Default: false)`,
|
|
370
|
+
type: "boolean"
|
|
371
|
+
},
|
|
372
|
+
sortSideEffects: {
|
|
373
|
+
description: `Sort side-effect imports. (Default: false)`,
|
|
374
|
+
type: "boolean"
|
|
321
375
|
}
|
|
322
|
-
},
|
|
323
|
-
groups: {
|
|
324
|
-
description: `Specifies a list of predefined import groups for sorting.\n\nEach import will be assigned a single group specified in the groups option (or the \`unknown\` group if no match is found).\nThe order of items in the \`groups\` option determines how groups are ordered.\n\nWithin a given group, members will be sorted according to the type, order, ignoreCase, etc. options.\n\nIndividual groups can be combined together by placing them in an array.\nThe order of groups in that array does not matter.\nAll members of the groups in the array will be sorted together as if they were part of a single group.\n\nPredefined groups are characterized by a single selector and potentially multiple modifiers.\nYou may enter modifiers in any order, but the selector must always come at the end.\n\nThe list of selectors is sorted from most to least important:\n- \`type\` — TypeScript type imports.\n- \`side_effect_style\` — Side effect style imports.\n- \`side_effect\` — Side effect imports.\n- \`style\` — Style imports.\n- \`index\` — Main file from the current directory.\n- \`sibling\` — Modules from the same directory.\n- \`parent\` — Modules from the parent directory.\n- \`subpath\` — Node.js subpath imports.\n- \`internal\` — Your internal modules.\n- \`builtin\` — Node.js Built-in Modules.\n- \`external\` — External modules installed in the project.\n- \`import\` — Any import.\n\nThe list of modifiers is sorted from most to least important:\n- \`side_effect\` — Side effect imports.\n- \`type\` — TypeScript type imports.\n- \`value\` — Value imports.\n- \`default\` — Imports containing the default specifier.\n- \`wildcard\` — Imports containing the wildcard (\`* as\`) specifier.\n- \`named\` — Imports containing at least one named specifier.\n\n- Default: See below\n\`\`\`json\n[\n\"builtin\",\n\"external\",\n[\"internal\", \"subpath\"],\n[\"parent\", \"sibling\", \"index\"],\n\"style\",\n\"unknown\"\n]\n\`\`\`\n\nAlso, you can override the global \`newlinesBetween\` setting for specific group boundaries\nby including a \`{ \"newlinesBetween\": boolean }\` marker object in the \`groups\` list at the desired position.`,
|
|
325
|
-
type: "array",
|
|
326
|
-
items: { anyOf: [
|
|
327
|
-
{ type: "string" },
|
|
328
|
-
{
|
|
329
|
-
type: "array",
|
|
330
|
-
items: { type: "string" }
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
additionalProperties: false,
|
|
334
|
-
required: ["newlinesBetween"],
|
|
335
|
-
type: "object",
|
|
336
|
-
properties: { newlinesBetween: {
|
|
337
|
-
description: `A marker object for overriding \`newlinesBetween\` at a specific group boundary.`,
|
|
338
|
-
type: "boolean"
|
|
339
|
-
} }
|
|
340
|
-
}
|
|
341
|
-
] }
|
|
342
|
-
},
|
|
343
|
-
ignoreCase: {
|
|
344
|
-
description: `Ignore case when sorting. (Default: true)`,
|
|
345
|
-
type: "boolean"
|
|
346
|
-
},
|
|
347
|
-
internalPattern: {
|
|
348
|
-
description: `Glob patterns to identify internal imports.`,
|
|
349
|
-
type: "array",
|
|
350
|
-
items: { type: "string" }
|
|
351
|
-
},
|
|
352
|
-
newlinesBetween: {
|
|
353
|
-
description: `Add newlines between import groups. (Default: true)`,
|
|
354
|
-
type: "boolean"
|
|
355
|
-
},
|
|
356
|
-
order: {
|
|
357
|
-
description: `Sort order. (Default: "asc")`,
|
|
358
|
-
enum: ["asc", "desc"],
|
|
359
|
-
type: "string"
|
|
360
|
-
},
|
|
361
|
-
partitionByComment: {
|
|
362
|
-
description: `Partition imports by comments. (Default: false)`,
|
|
363
|
-
type: "boolean"
|
|
364
|
-
},
|
|
365
|
-
partitionByNewline: {
|
|
366
|
-
description: `Partition imports by newlines. (Default: false)`,
|
|
367
|
-
type: "boolean"
|
|
368
|
-
},
|
|
369
|
-
sortSideEffects: {
|
|
370
|
-
description: `Sort side-effect imports. (Default: false)`,
|
|
371
|
-
type: "boolean"
|
|
372
376
|
}
|
|
373
|
-
}
|
|
377
|
+
}]
|
|
374
378
|
},
|
|
375
379
|
sortPackageJson: {
|
|
376
380
|
description: `Experimental: Sort package.json keys. (Default: true)`,
|
|
@@ -384,37 +388,39 @@ const oxfmtOptionsSchema = {
|
|
|
384
388
|
}]
|
|
385
389
|
},
|
|
386
390
|
sortTailwindcss: {
|
|
387
|
-
additionalProperties: false,
|
|
388
391
|
description: `Experimental: Enable Tailwind CSS class sorting in JSX class/className attributes.\nWhen enabled, class strings will be collected and passed to a callback for sorting.\nPass an object with options from "prettier-plugin-tailwindcss".\n\n- (Default: disabled)`,
|
|
389
|
-
type: "
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
392
|
+
oneOf: [{ type: "boolean" }, {
|
|
393
|
+
additionalProperties: false,
|
|
394
|
+
type: "object",
|
|
395
|
+
properties: {
|
|
396
|
+
attributes: {
|
|
397
|
+
description: `List of additional attributes to sort beyond "class" and "className" (exact match).\n\nNOTE: Regex patterns are not yet supported.\n\n- (Default: [])\n- Example: ["myClassProp", ":class"]`,
|
|
398
|
+
type: "array",
|
|
399
|
+
items: { type: "string" }
|
|
400
|
+
},
|
|
401
|
+
config: {
|
|
402
|
+
description: `Path to your Tailwind CSS configuration file (v3).\n\nNote: Paths are resolved relative to the Oxfmt configuration file.\n\n- (Default: "./tailwind.config.js")`,
|
|
403
|
+
type: "string"
|
|
404
|
+
},
|
|
405
|
+
functions: {
|
|
406
|
+
description: `List of custom function names whose arguments should be sorted (exact match).\n\nNOTE: Regex patterns are not yet supported.\n\n- (Default: [])\n- Example: ["clsx", "cn", "cva", "tw"]`,
|
|
407
|
+
type: "array",
|
|
408
|
+
items: { type: "string" }
|
|
409
|
+
},
|
|
410
|
+
preserveDuplicates: {
|
|
411
|
+
description: `Preserve duplicate classes.\n\n- (Default: false)`,
|
|
412
|
+
type: "boolean"
|
|
413
|
+
},
|
|
414
|
+
preserveWhitespace: {
|
|
415
|
+
description: `Preserve whitespace around classes.\n\n- (Default: false)`,
|
|
416
|
+
type: "boolean"
|
|
417
|
+
},
|
|
418
|
+
stylesheet: {
|
|
419
|
+
description: `Path to your Tailwind CSS stylesheet (v4).\n\nNote: Paths are resolved relative to the Oxfmt configuration file.\n\n- (Example: "./src/app.css")`,
|
|
420
|
+
type: "string"
|
|
421
|
+
}
|
|
416
422
|
}
|
|
417
|
-
}
|
|
423
|
+
}]
|
|
418
424
|
},
|
|
419
425
|
tabWidth: {
|
|
420
426
|
description: `Number of spaces per indentation level. (Default: 2)`,
|
package/dts/rule-options.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
30
30
|
|
|
31
31
|
insertFinalNewline?: boolean
|
|
32
32
|
|
|
33
|
-
jsdoc?: {
|
|
33
|
+
jsdoc?: (boolean | {
|
|
34
34
|
|
|
35
35
|
addDefaultToDescription?: boolean
|
|
36
36
|
|
|
@@ -53,7 +53,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
53
53
|
separateReturnsFromParam?: boolean
|
|
54
54
|
|
|
55
55
|
separateTagGroups?: boolean
|
|
56
|
-
}
|
|
56
|
+
})
|
|
57
57
|
|
|
58
58
|
jsxSingleQuote?: boolean
|
|
59
59
|
|
|
@@ -71,7 +71,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
71
71
|
|
|
72
72
|
singleQuote?: boolean
|
|
73
73
|
|
|
74
|
-
sortImports?: {
|
|
74
|
+
sortImports?: (boolean | {
|
|
75
75
|
|
|
76
76
|
customGroups?: {
|
|
77
77
|
|
|
@@ -102,14 +102,14 @@ export type OxfmtOxfmt = []|[{
|
|
|
102
102
|
partitionByNewline?: boolean
|
|
103
103
|
|
|
104
104
|
sortSideEffects?: boolean
|
|
105
|
-
}
|
|
105
|
+
})
|
|
106
106
|
|
|
107
107
|
sortPackageJson?: (boolean | {
|
|
108
108
|
|
|
109
109
|
sortScripts?: boolean
|
|
110
110
|
})
|
|
111
111
|
|
|
112
|
-
sortTailwindcss?: {
|
|
112
|
+
sortTailwindcss?: (boolean | {
|
|
113
113
|
|
|
114
114
|
attributes?: string[]
|
|
115
115
|
|
|
@@ -122,7 +122,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
122
122
|
preserveWhitespace?: boolean
|
|
123
123
|
|
|
124
124
|
stylesheet?: string
|
|
125
|
-
}
|
|
125
|
+
})
|
|
126
126
|
|
|
127
127
|
tabWidth?: number
|
|
128
128
|
|
|
@@ -160,7 +160,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
160
160
|
|
|
161
161
|
insertFinalNewline?: boolean
|
|
162
162
|
|
|
163
|
-
jsdoc?: {
|
|
163
|
+
jsdoc?: (boolean | {
|
|
164
164
|
|
|
165
165
|
addDefaultToDescription?: boolean
|
|
166
166
|
|
|
@@ -183,7 +183,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
183
183
|
separateReturnsFromParam?: boolean
|
|
184
184
|
|
|
185
185
|
separateTagGroups?: boolean
|
|
186
|
-
}
|
|
186
|
+
})
|
|
187
187
|
|
|
188
188
|
jsxSingleQuote?: boolean
|
|
189
189
|
|
|
@@ -201,7 +201,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
201
201
|
|
|
202
202
|
singleQuote?: boolean
|
|
203
203
|
|
|
204
|
-
sortImports?: {
|
|
204
|
+
sortImports?: (boolean | {
|
|
205
205
|
|
|
206
206
|
customGroups?: {
|
|
207
207
|
|
|
@@ -232,14 +232,14 @@ export type OxfmtOxfmt = []|[{
|
|
|
232
232
|
partitionByNewline?: boolean
|
|
233
233
|
|
|
234
234
|
sortSideEffects?: boolean
|
|
235
|
-
}
|
|
235
|
+
})
|
|
236
236
|
|
|
237
237
|
sortPackageJson?: (boolean | {
|
|
238
238
|
|
|
239
239
|
sortScripts?: boolean
|
|
240
240
|
})
|
|
241
241
|
|
|
242
|
-
sortTailwindcss?: {
|
|
242
|
+
sortTailwindcss?: (boolean | {
|
|
243
243
|
|
|
244
244
|
attributes?: string[]
|
|
245
245
|
|
|
@@ -252,7 +252,7 @@ export type OxfmtOxfmt = []|[{
|
|
|
252
252
|
preserveWhitespace?: boolean
|
|
253
253
|
|
|
254
254
|
stylesheet?: string
|
|
255
|
-
}
|
|
255
|
+
})
|
|
256
256
|
|
|
257
257
|
tabWidth?: number
|
|
258
258
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-oxfmt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "An ESLint plugin for formatting code with oxfmt.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -44,35 +44,35 @@
|
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"eslint": "^9.5.0 || ^10.0.0",
|
|
47
|
-
"oxfmt": ">=0.
|
|
47
|
+
"oxfmt": ">=0.45.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"generate-differences": "^0.1.1",
|
|
51
|
-
"load-oxfmt-config": "^0.
|
|
51
|
+
"load-oxfmt-config": "^0.4.0",
|
|
52
52
|
"picomatch": "^4.0.4",
|
|
53
53
|
"synckit": "^0.11.12"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@ntnyq/eslint-config": "^6.0.
|
|
56
|
+
"@ntnyq/eslint-config": "^6.0.1",
|
|
57
57
|
"@types/json-schema": "^7.0.15",
|
|
58
|
-
"@types/node": "^25.
|
|
59
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
58
|
+
"@types/node": "^25.6.0",
|
|
59
|
+
"@typescript/native-preview": "^7.0.0-dev.20260413.1",
|
|
60
60
|
"bumpp": "^11.0.1",
|
|
61
|
-
"eslint": "^10.
|
|
61
|
+
"eslint": "^10.2.0",
|
|
62
62
|
"eslint-parser-plain": "^0.1.1",
|
|
63
63
|
"eslint-typegen": "^2.3.1",
|
|
64
64
|
"eslint-vitest-rule-tester": "^3.1.0",
|
|
65
65
|
"husky": "^9.1.7",
|
|
66
|
-
"nano-staged": "^0.
|
|
66
|
+
"nano-staged": "^1.0.2",
|
|
67
67
|
"npm-run-all2": "^8.0.4",
|
|
68
|
-
"oxfmt": "^0.
|
|
68
|
+
"oxfmt": "^0.45.0",
|
|
69
69
|
"show-invisibles": "^0.0.2",
|
|
70
|
-
"tinyglobby": "^0.2.
|
|
71
|
-
"tsdown": "^0.21.
|
|
70
|
+
"tinyglobby": "^0.2.16",
|
|
71
|
+
"tsdown": "^0.21.8",
|
|
72
72
|
"tsx": "^4.21.0",
|
|
73
73
|
"typescript": "^6.0.2",
|
|
74
|
-
"vitest": "^4.1.
|
|
75
|
-
"eslint-plugin-oxfmt": "0.
|
|
74
|
+
"vitest": "^4.1.4",
|
|
75
|
+
"eslint-plugin-oxfmt": "0.4.0"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": "^20.19.0 || >=22.12.0"
|