2024-05-19 21:20:42 +08:00
|
|
|
import type { Linter } from 'eslint';
|
|
|
|
|
2024-08-02 22:18:46 +08:00
|
|
|
import { interopDefault } from '../util';
|
|
|
|
|
|
|
|
export async function regexp(): Promise<Linter.Config[]> {
|
2024-05-19 21:20:42 +08:00
|
|
|
const [pluginRegexp] = await Promise.all([
|
2024-08-02 22:18:46 +08:00
|
|
|
interopDefault(import('eslint-plugin-regexp')),
|
2024-05-19 21:20:42 +08:00
|
|
|
] as const);
|
|
|
|
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
plugins: {
|
|
|
|
regexp: pluginRegexp,
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
...pluginRegexp.configs.recommended.rules,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|