Skip to content

Commit

Permalink
refactor(eslint-plugin): remove useless regex
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Sep 18, 2023
1 parent ffb246f commit b36ba4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-cups-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@git-validator/eslint-plugin": patch
---

refactor(eslint-plugin): remove useless regex
8 changes: 1 addition & 7 deletions packages/eslint-plugin/src/rules/import-regex.ts
Original file line number Diff line number Diff line change
@@ -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("|");

Expand Down

0 comments on commit b36ba4b

Please sign in to comment.