mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Fix eslint not linting our custom eslint rules
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user