Make rules more type-safe

This commit is contained in:
Yury Bondarenko
2024-03-15 13:19:47 +01:00
parent b0758c23e5
commit 6e22b5376a
15 changed files with 314 additions and 158 deletions

View File

@@ -15,7 +15,7 @@ import {
describe('TypeScript rules', () => {
for (const { info, rule, tests } of tsPlugin.index) {
tsRuleTester.run(info.name, rule, tests);
tsRuleTester.run(info.name, rule, tests as any);
}
});

View File

@@ -8,13 +8,13 @@
import { RuleTester as TypeScriptRuleTester } from '@typescript-eslint/rule-tester';
import { RuleTester } from 'eslint';
import { themeableComponents } from '../src/util/theme-support';
import {
FIXTURE,
fixture,
} from './fixture';
import { themeableComponents } from '../src/util/theme-support';
// Register themed components from test fixture
themeableComponents.initialize(FIXTURE);