Enforce plugin structure and generate documentation

This commit is contained in:
Yury Bondarenko
2024-03-14 18:14:30 +01:00
parent e83a0cd741
commit b0758c23e5
19 changed files with 833 additions and 446 deletions

26
lint/test/rules.spec.ts Normal file
View File

@@ -0,0 +1,26 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
import { default as htmlPlugin } from '../src/rules/html';
import { default as tsPlugin } from '../src/rules/ts';
import {
htmlRuleTester,
tsRuleTester,
} from './testing';
describe('TypeScript rules', () => {
for (const { info, rule, tests } of tsPlugin.index) {
tsRuleTester.run(info.name, rule, tests);
}
});
describe('HTML rules', () => {
for (const { info, rule, tests } of htmlPlugin.index) {
htmlRuleTester.run(info.name, rule, tests);
}
});