mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Reduce any typings in our eslint rules
This commit is contained in:
@@ -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.'
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user