Fix noCondAssign tests
MODIFY
packages/@romejs/js-compiler/lint/rules/noCondAssign.test.ts
packages/@romejs/js-compiler/lint/rules/noCondAssign.test.ts
@@ -46,7 +46,7 @@ test(
t,
dedent`
do {
- console.log('foo);
+ console.log('foo');
} while (foo = 'bar')
`,
{category: 'lint/noCondAssign'},

MODIFY
packages/@romejs/js-compiler/lint/rules/noCondAssign.ts
packages/@romejs/js-compiler/lint/rules/noCondAssign.ts
@@ -22,7 +22,10 @@ export default {
node.test &&
node.test.type === 'AssignmentExpression'
) {
- path.context.addNodeDiagnostic(node, descriptions.LINT.NO_COND_ASSIGN);
+ path.context.addNodeDiagnostic(
+ node.test,
+ descriptions.LINT.NO_COND_ASSIGN,
+ );
}
return node;

Fix noCondAssign tests