Reduce any typings in our eslint rules

This commit is contained in:
Matt Bierner
2025-11-10 13:49:24 -08:00
parent 734a949cad
commit 1d2bb43237
32 changed files with 123 additions and 83 deletions

View File

@@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as eslint from 'eslint';
import { TSESTree } from '@typescript-eslint/utils';
import * as eslint from 'eslint';
/**
* Enforces that all parameter properties have an explicit access modifier (public, protected, private).
@@ -14,8 +14,7 @@ import { TSESTree } from '@typescript-eslint/utils';
export = new class implements eslint.Rule.RuleModule {
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
function check(inNode: any) {
const node: TSESTree.TSParameterProperty = inNode;
function check(node: TSESTree.TSParameterProperty) {
// For now, only apply to injected services
const firstDecorator = node.decorators?.at(0);
@@ -28,7 +27,7 @@ export = new class implements eslint.Rule.RuleModule {
if (!node.accessibility) {
context.report({
node: inNode,
node: node,
message: 'Parameter properties must have an explicit access modifier.'
});
}