Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat: Suggestions support for
prefer-regex-literals
(#15077)
* New: Autofix support to prefer-regex-literals Fixes #15029 * Use canTokensBeAdjacent * Fix for NULL * Switch to validatePattern and validateFlags * Fix for unicode * Apply a few suggestions from code review * Fix: Double Escaping? * Tests and fixes for no-unicode regexp * New: Drop usage of getStaticValue * Fix: Remove whitespace changes, fix jsdoc type, and convert to suggestion for unexpectedRegExp * New: More test cases for . * Remove meta.docs.suggestion Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Fix linting * Don't fix NULL * Remove redundant wrapping suggestions for now * String.raw can have problematic chars * Remove fixable * Fix messed up char increase * Apply suggestion from code review Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * chore: use characterNode.raw instead of characterNode.value * chore: do a bit of simplification of onCharacterEnter * Apply suggestions from code review Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * chore: more changes following code review * chore: Use reliable way of testing if spacing needed Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * diff msg for suggestion than main warning * chore: stricter testing * Apply suggestions from code review Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
- Loading branch information
1 parent
314c84c
commit 94e77a6
Showing
2 changed files
with
2,475 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.