Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
no-misleading-character-class
granular errors (#17515)
* feat: `no-misleading-character-class` granular errors * fix: column offsets * fix: missing CallExpression * Apply suggestions from code review Co-authored-by: Francesco Trotta <[email protected]> * All tests passing again * Edge case: quadruple back slashes * Apply suggestions from code review Co-authored-by: Francesco Trotta <[email protected]> * Update lib/rules/no-misleading-character-class.js Co-authored-by: Francesco Trotta <[email protected]> * Adjusted for repeat characters * Separated kinds into a Set * Update lib/rules/no-misleading-character-class.js Co-authored-by: Francesco Trotta <[email protected]> * Adjust unit tests for accepted changes * Split into adjustment function for sequence pairs * Reduced complexity because of edge cases, as reqiested * Use chars array as suggested - mostly there * Checked that slices include first and last * Used sourceCode.getText(node) over node.raw, and added comments * Update lib/rules/no-misleading-character-class.js * Drastically limit applicability * Restricted regexp literals on \u * Update lib/rules/no-misleading-character-class.js Co-authored-by: Milos Djermanovic <[email protected]> * Corrected erroneous escaped u exclusion * Update lib/rules/no-misleading-character-class.js Co-authored-by: Francesco Trotta <[email protected]> * If a report range is missing, skip other reports * Update lib/rules/no-misleading-character-class.js Co-authored-by: Milos Djermanovic <[email protected]> * Merge branch 'main' * Implement fasttime suggestion for a Map * nit: for loop * Unify zwj reports * Added a couple of multiline tests * use .at(-1) --------- Co-authored-by: Francesco Trotta <[email protected]> Co-authored-by: Milos Djermanovic <[email protected]>
- Loading branch information