regexp.ts 416 B

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