Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use eslint-plugin-regexp #9993

Merged
merged 10 commits into from
Feb 7, 2024
Merged

Use eslint-plugin-regexp #9993

merged 10 commits into from
Feb 7, 2024

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Feb 6, 2024

Changes

I've been using this plugin in the Vite repo, and I found it to be incredibly helpful in finding common regex bugs, performance improvements, and even potential ReDos security detection. So I made a PR to bring it in here and curious to hear what y'all think 馃槃

The only cumbersome rule I found that might affect contributors is https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-backtracking.html. It helps detect security and perf issues, but often times I'm not really sure how to fix it either and simply ignore it. I think it's still useful to have though.

In this PR, I ran pnpm lint --fix to let the plugin auto-fix some issues, then manually resolve some regexes myself.

Testing

Existing tests should pass.

Docs

n/a. internal change.

Copy link

changeset-bot bot commented Feb 6, 2024

鈿狅笍 No Changeset found

Latest commit: fcc7a2d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: vue Related to Vue (scope) pkg: preact Related to Preact (scope) pkg: integration Related to any renderer integration (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: astro Related to the core `astro` package (scope) docs pr A PR that includes documentation for review labels Feb 6, 2024
Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome to me!

Copy link
Contributor

github-actions bot commented Feb 7, 2024

鈿栵笍 Bundle Size Check

Latest commit: fcc7a2d

File Old Size New Size Change
dev-toolbar/apps/audit/a11y 14.09 KB 14.1 KB + 2 B

@bluwy bluwy merged commit 436841e into main Feb 7, 2024
14 checks passed
@bluwy bluwy deleted the eslint-regexp branch February 7, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs pr A PR that includes documentation for review feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: preact Related to Preact (scope) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants