Fix eslint not linting our custom eslint rules

This commit is contained in:
Matt Bierner
2025-03-19 22:49:06 -07:00
parent 79abfa3cef
commit 6b3e9f6759
16 changed files with 38 additions and 29 deletions

View File

@@ -26,19 +26,19 @@ export = new class implements eslint.Rule.RuleModule {
return;
}
const classCtor = classDeclaration.body.body.find(node => node.type === 'MethodDefinition' && node.kind === 'constructor')
const classCtor = classDeclaration.body.body.find(node => node.type === 'MethodDefinition' && node.kind === 'constructor');
if (!classCtor) {
return;
}
const name = classDeclaration.id.name;
const valueText = context.sourceCode.getText(<any>propertyDefinition.value)
const valueText = context.sourceCode.getText(<any>propertyDefinition.value);
if (valueText.includes(name + '.')) {
if (classCtor.value?.type === 'FunctionExpression' && !classCtor.value.params.find((param: any) => param.type === 'TSParameterProperty' && param.decorators?.length > 0)) {
return
return;
}
context.report({