Declare category and diagnostic description
MODIFY
packages/@romejs/diagnostics/categories.ts
packages/@romejs/diagnostics/categories.ts
@@ -56,6 +56,7 @@ export type DiagnosticCategory =
| 'lint/undeclaredVariables'
| 'lint/unsafeNegation'
| 'lint/unusedVariables'
+ | 'lint/singleVarDeclarator'
| 'parse/url/query'
| 'parse/url'
| 'parse/js'

MODIFY
packages/@romejs/diagnostics/descriptions.ts
packages/@romejs/diagnostics/descriptions.ts
@@ -249,6 +249,12 @@ export const descriptions = createMessages({
message: 'Your array contains an empty slot',
},
+ SINGLE_VAR_DECLARATOR: {
+ fixable: true,
+ category: 'lint/singleVarDeclarator',
+ message: 'Declare each variable separately',
+ },
+
PREFER_FUNCTION_DECLARATIONS: {
category: 'lint/preferFunctionDeclarations',
message: 'Use a function declaration instead of a const function',

Declare category and diagnostic description