regexp.ts 361 B

123456789101112131415161718
  1. import type { Linter } from 'eslint';
  2. export async function regexp(): Promise<Linter.FlatConfig[]> {
  3. const [pluginRegexp] = await Promise.all([
  4. import('eslint-plugin-regexp'),
  5. ] as const);
  6. return [
  7. {
  8. plugins: {
  9. regexp: pluginRegexp,
  10. },
  11. rules: {
  12. ...pluginRegexp.configs.recommended.rules,
  13. },
  14. },
  15. ];
  16. }