117616: Fix rule creator call & add structure test case

This commit is contained in:
Yury Bondarenko
2024-08-30 12:11:45 +02:00
committed by Alexandre Vryghem
parent 01c8c60624
commit 8ff5a23c40
2 changed files with 18 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import {
AST_NODE_TYPES,
ESLintUtils,
TSESLint,
TSESTree,
} from '@typescript-eslint/utils';
@@ -30,6 +31,9 @@ export const info: DSpaceESLintRuleInfo = {
properties: {
decorators: {
type: 'array',
items: {
type: 'string',
},
},
},
},
@@ -44,7 +48,7 @@ export const info: DSpaceESLintRuleInfo = {
],
};
export const rule = {
export const rule = ESLintUtils.RuleCreator.withoutDocs({
...info,
create(context: TSESLint.RuleContext<Message, unknown[]>, options: any) {
const decoratorCalls: Map<string, Set<string>> = new Map();
@@ -75,7 +79,7 @@ export const rule = {
},
};
},
};
});
export const tests: NamedTests = {
plugin: info.name,