Navigation Menu

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Suggestions support for prefer-regex-literals #15077

Merged
merged 28 commits into from Dec 17, 2021

Conversation

Yash-Singh1
Copy link
Contributor

@Yash-Singh1 Yash-Singh1 commented Sep 17, 2021

Fixes #15029

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[x] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Add suggestions support to prefer-regex-literals

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Sep 17, 2021
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 17, 2021

CLA Signed

The committers are authorized under a signed CLA.

@mdjermanovic mdjermanovic added enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Sep 19, 2021
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
@Yash-Singh1 Yash-Singh1 changed the title New: Autofix support to prefer-regex-literals New: Suggestions support for prefer-regex-literals Sep 29, 2021
@nzakas nzakas changed the title New: Suggestions support for prefer-regex-literals Update: Suggestions support for prefer-regex-literals Oct 1, 2021
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Dec 1, 2021
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Dec 2, 2021
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
Yash-Singh1 and others added 4 commits December 10, 2021 17:36
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

Looks great, I think there's only one thing that should be fixed, in the tests that are intended to check that there are no suggestions.

tests/lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

I think this is the last change before merging. Unless I'm missing something, suggestions with \0 are valid.

lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
tests/lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
tests/lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
tests/lib/rules/prefer-regex-literals.js Outdated Show resolved Hide resolved
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! I'll leave this open until the start of today's release in case that someone else wants to review it.

@mdjermanovic mdjermanovic merged commit 94e77a6 into eslint:main Dec 17, 2021
@mdjermanovic
Copy link
Member

Thanks for contributing!

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jun 16, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prefer-regex-literals suggestions
2 participants