Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Account for comments in implicit-arrow-linebreak (#10545)
* Add and pass for a test case for when a comment exists between an arrow and expression body in implicit-arrow-linebreak * Fix formatting * Add and pass test case for when arrow expression is set to variable * Add test cases for when comments exist within parens enwrapped arrow function bodies, pass cases * Add test cases for block comments, multiple comments within an arrow expression, pass test cases, create helper for formatting comments * Add a test case to ensure filtering of comments between start of arrow expression and parens * Change condition to check for length of comment text length * Condense logic for comments filtering * Reword documentation for helper function * Account for multi arrow function test case with comments for implicit-arrow-linebreak, begin implementation for condition * Add test case for when some arrow function bodies are wrapped with parens, add logic to account for test case * Export fixer logic for besides to autoFixBesides function, account for test cases with nested arrow functions, specify astutil functions in implicit arrow linebreak * REmove extra semicolon from top * Add test cases for async arrow functions, method chains, object literals, add parameter and documentation for column for formatComments, add findFirstToken helper * Fix lines for cherry-pick * Remove line * Rename fixerTarget to arrowBody for autoFixBesides and addParentheses functions * Add valid test cases * Account for promise constructor and callback test cases * Add test cases for multiline comments * Remove dangling commas, add comments and extra details to jsdocs for clarity * Update branch, fix import statement for ast-utils * Apply requested change to string template for tests on lines 258 and 269 * Add and pass test cases for variable declarations with multiple declarations
- Loading branch information
1 parent
4242314
commit 06b3b5b
Showing
2 changed files
with
577 additions
and
3 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.