From b36ba4be3ed58db3918441db94e578fd5103e573 Mon Sep 17 00:00:00 2001 From: zanminkian Date: Mon, 18 Sep 2023 19:05:23 +0000 Subject: [PATCH] refactor(eslint-plugin): remove useless regex --- .changeset/pretty-cups-deliver.md | 5 +++++ packages/eslint-plugin/src/rules/import-regex.ts | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 .changeset/pretty-cups-deliver.md diff --git a/.changeset/pretty-cups-deliver.md b/.changeset/pretty-cups-deliver.md new file mode 100644 index 00000000..f3486fa8 --- /dev/null +++ b/.changeset/pretty-cups-deliver.md @@ -0,0 +1,5 @@ +--- +"@git-validator/eslint-plugin": patch +--- + +refactor(eslint-plugin): remove useless regex diff --git a/packages/eslint-plugin/src/rules/import-regex.ts b/packages/eslint-plugin/src/rules/import-regex.ts index d083139b..f11403d8 100644 --- a/packages/eslint-plugin/src/rules/import-regex.ts +++ b/packages/eslint-plugin/src/rules/import-regex.ts @@ -1,13 +1,7 @@ import { ESLintUtils } from "@typescript-eslint/utils"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; -const defaultRegex = [ - "^.*/node_modules/.*$", - "\\.d(\\.[mc]?[jt]s)?$", - "^(\\.\\./){3,}", - "^.*/\\./.*$", - "^\\./\\.\\./", -] +const defaultRegex = ["^.*/node_modules/.*$", "\\.d(\\.[mc]?[jt]s)?$", "^(\\.\\./){3,}"] .map((r) => `(${r})`) .join("|");