Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add suggestions to no-console (#17680)
* feat: Add suggestions to no-console Fixes #17493 * Fix method of when to show safe suggestions and fix tests. * improved formatting of tests with suggestions by breaking them into multiple lines * Updated function name to canProvideSuggestions. Added better description for the function. * Fixed code that fails when AST is not deep enough. * Added suggestions:null for test cases that will not provide a suggestion. * test to make sure console statement with semicolon is removed via suggestion * dont provide suggestions if removing console.log() will lead to ASI breaking * missing period * renamed regexps variable names for better understanding * updated passing in expressionstatement node instead of memberexpression node to maybeAsiHazard * ++ or -- in the token before is not always safe.
- Loading branch information
Showing
2 changed files
with
451 additions
and
15 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.