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

refactor(noOctalEscape): fixes and improvements #5243

Merged

Conversation

Conaclos
Copy link
Member

@Conaclos Conaclos commented Mar 2, 2025

Summary

Fixes:

  • Use text_trimmed instead of text. This avoids reporting octal escape sequences in comments
  • Accept the non deprecated \0
  • Check Object member names

Improvements:

  • Add a code action.
  • Set default rule severity to warning.
  • Better diagnostics that follow our diagnostic pillars.
  • Report exactly the range where the escape sequence is instead of printing the node.

Test Plan

The conversion of json tests to js test was not correctly performed for valid tests.
I fixed it.
Also, I removed redundant tests.

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Mar 2, 2025
@Conaclos Conaclos requested review from a team March 2, 2025 19:25
Copy link

codspeed-hq bot commented Mar 2, 2025

CodSpeed Performance Report

Merging #5243 will improve performances by 6.88%

Comparing conaclos/noOctalEscape-text-trimmed-and-improvements (07227a1) with main (2ba0672)

Summary

⚡ 1 improvements
✅ 96 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
react.production.min_3378072959512366797.js[cached] 2 ms 1.9 ms +6.88%

Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

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

Nice!

Why were the test cases trimmed though?

@Conaclos
Copy link
Member Author

Conaclos commented Mar 3, 2025

Why were the test cases trimmed though?

Redundant tests.

@Conaclos Conaclos merged commit b9d438b into main Mar 3, 2025
16 checks passed
@Conaclos Conaclos deleted the conaclos/noOctalEscape-text-trimmed-and-improvements branch March 3, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants