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

fix(eslint-plugin): [prefer-includes] escape special characters #7161

Merged
merged 3 commits into from Jul 8, 2023

Conversation

Max10240
Copy link
Contributor

@Max10240 Max10240 commented Jul 2, 2023

PR Checklist

Overview

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @Max10240!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify
Copy link

netlify bot commented Jul 2, 2023

Deploy Preview for typescript-eslint failed.

Name Link
🔨 Latest commit 305a166
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/64a8f04b8bbb600008bb3fc8

@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #7161 (af33cb7) into main (2f46341) will increase coverage by 0.00%.
The diff coverage is 87.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7161   +/-   ##
=======================================
  Coverage   87.39%   87.40%           
=======================================
  Files         386      386           
  Lines       13198    13203    +5     
  Branches     3873     3872    -1     
=======================================
+ Hits        11535    11540    +5     
  Misses       1296     1296           
  Partials      367      367           
Flag Coverage Δ
unittest 87.40% <87.50%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ackages/eslint-plugin/src/rules/prefer-includes.ts 97.84% <87.50%> (+0.12%) ⬆️

@Max10240 Max10240 changed the title fix: escape special characters #7145 fix(eslint-plugin): [prefer-includes] escape special characters #7145 Jul 5, 2023
@@ -234,6 +234,33 @@ ruleTester.run('prefer-includes', rule, {
`,
errors: [{ messageId: 'preferStringIncludes' }],
},
// test SequenceExpression
Copy link
Member

Choose a reason for hiding this comment

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

[Non-actionable / Praise] More and more do I wish JavaScript just didn't have SequenceExpression 🙃 it's so confusing... +1 to you for explicitly adding tests for it.

@JoshuaKGoldberg JoshuaKGoldberg changed the title fix(eslint-plugin): [prefer-includes] escape special characters #7145 fix(eslint-plugin): [prefer-includes] escape special characters Jul 8, 2023
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🔥 this is great, thanks @Max10240!

I'm going to add one quick little test for the issue's repro case, then merge. 👍

@JoshuaKGoldberg JoshuaKGoldberg merged commit 5a347a5 into typescript-eslint:main Jul 8, 2023
34 of 40 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [prefer-includes] Autofix does not escape special characters
2 participants