Skip to content

Commit

Permalink
feat: ✨ add eslint-plugin-regexp rules
Browse files Browse the repository at this point in the history
🏁 Closes: #89
  • Loading branch information
jimmy-guzman committed Nov 20, 2024
1 parent f7f3b03 commit 4176695
Show file tree
Hide file tree
Showing 9 changed files with 695 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "0.4.14",
"eslint-plugin-regexp": "^2.7.0",
"eslint-plugin-testing-library": "7.0.0-beta.6",
"eslint-plugin-unicorn": "^56.0.1",
"globals": "^15.12.0",
Expand Down
59 changes: 59 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions src/configs/regexp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as regexpPlugin from "eslint-plugin-regexp";

import { regexpRules } from "../rules/regexp";

export const regexpConfig = () => {
return [
{
name: "jimmy.codes/regexp",
plugins: { regexp: regexpPlugin },
rules: regexpRules,
},
];
};
1 change: 1 addition & 0 deletions src/factory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe("jimmyDotCodes", () => {
"prettier",
"ignores",
"javascript",
"regexp",
])("should create configuration w/ %s", async (input) => {
await expect(jimmyDotCodes({ autoDetect: false })).resolves.toStrictEqual(
expect.arrayContaining([
Expand Down
2 changes: 2 additions & 0 deletions src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { nodeConfig } from "./configs/node";
import { perfectionistConfig } from "./configs/perfectionist";
import { prettierConfig } from "./configs/prettier";
import { reactConfig } from "./configs/react";
import { regexpConfig } from "./configs/regexp";
import { tanstackQuery } from "./configs/tanstack-query";
import { testingConfig } from "./configs/testing";
import { testingLibrary } from "./configs/testing-library";
Expand Down Expand Up @@ -64,6 +65,7 @@ export const jimmyDotCodes = async (
nodeConfig(),
unicornConfig(),
eslintCommentsConfig(),
regexpConfig(),
importsConfig({ typescript: isTypescriptEnabled }),
isTypescriptEnabled ? typescriptConfig(typescriptOptions) : [],
isReactEnabled ? await reactConfig() : [],
Expand Down
Loading

0 comments on commit 4176695

Please sign in to comment.