Fix noShorthandArrayType diagnostic and tests
MODIFY
packages/@romejs/diagnostics/descriptions.ts
packages/@romejs/diagnostics/descriptions.ts
@@ -436,7 +436,7 @@ export const descriptions = createMessages({
},
NO_SHORTHAND_ARRAY_TYPE: {
category: 'lint/noShorthandArrayType',
- message: 'Use Array<T> instead of shorthand T[]',
+ message: escapeMarkup('Use Array<T> instead of shorthand T[]'),
},
NO_UNSAFE_FINALLY: (type: string) => ({
category: 'lint/noUnsafeFinally',

MODIFY
packages/@romejs/js-compiler/lint/rules/noShorthandArrayType.test.ts
packages/@romejs/js-compiler/lint/rules/noShorthandArrayType.test.ts
@@ -17,7 +17,7 @@ test(
t,
dedent`
let valid: Array<foo>;
- let invalid = bar[];
+ let invalid: bar[];
`,
{category: 'lint/noShorthandArrayType', syntax: ['ts']},
);
@@ -27,7 +27,7 @@ test(
t,
dedent`
let valid: Array<foo>;
- let invalid = bar[];
+ let invalid: bar[];
`,
{category: 'lint/noShorthandArrayType', syntax: ['flow']},
);

Fix noShorthandArrayType diagnostic and tests