-
Notifications
You must be signed in to change notification settings - Fork 162
Expand file tree
/
Copy pathindex.ts
More file actions
30 lines (26 loc) · 757 Bytes
/
index.ts
File metadata and controls
30 lines (26 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import {
name as packageName,
version as packageVersion,
} from '../package.json';
import configs from './configs';
import rules from './rules';
import { type SupportedTestingFramework } from './utils';
// TODO: type properly when upgraded to ESLint v9
const plugin = {
meta: {
name: packageName,
version: packageVersion,
},
configs,
rules,
};
// TODO: type this with TSESLint.Linter.RuleEntry when upgraded to ESLint v9
Object.keys(plugin.configs).forEach((configKey) => {
plugin.configs[configKey as SupportedTestingFramework].plugins = {
// TODO: remove ignored error when properly typed with ESLint v9
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
'testing-library': plugin,
};
});
export = plugin;