prettier/tests/typescript_comments
Marshall Bowers 445f51709e Fix indentation for JSDoc comments (#2470)
* Fix TypeScript comment snapshot

* Add failing test for TypeScript method comments

* Remove trailing space in comment

* Add snapshot for comment with many lines

* Add TODO marking potential location for comment re-indentation

* Update snapshot

* Indent comments based on the parent node

* Only adjust indentation if the comment looks like a JSDoc comment

* Only strip leading spaces when adjusting comment indentation

* Update snapshot

* Add test to show incorrect indentation based on parent node

* Update snapshot

* Update snapshot

* Update comment indentation to not rely on the parent node

* Extract code for getting the indent size

* Add test where the parent indentation changes as well

* Fix lint warning regarding lexical declarations within case block

* Update lockfile

* Update snapshot

* Add test case for block comment inside of a method

* Replace spread operator with `concat`

* Use `align` instead of `addAlignmentToDoc`

* Add test for mismatched indentation within JSDoc comment

* Always add a leading space to subsequent lines in a JSDoc comment

* Refactor JSDoc comment printing into a separate function

* Remove unneeded `align`

* Replace `forEach` with `map` for better style

* Only `trimLeft` when the end comment token is on the last line of the comment

* Remove unneeded `docBuilders`

* Add tests for JSDoc comments in JSX

* Update snapshots
2017-10-08 20:34:24 +11:00
..
__snapshots__ Fix indentation for JSDoc comments (#2470) 2017-10-08 20:34:24 +11:00
abstract_class.ts Fix TSAbstractClass base (#1676) 2017-05-23 12:34:40 -07:00
jsfmt.spec.js Add expression node in TSAsExpression (#1675) 2017-05-23 12:33:18 -07:00
jsx.ts Do not throw for unprinted comments inside of JSX (#2036) 2017-06-07 12:57:03 -07:00
location.ts Include typeAnnotation inside of node location (#2039) 2017-06-07 15:05:46 -07:00
methods.ts Fix indentation for JSDoc comments (#2470) 2017-10-08 20:34:24 +11:00
type-parameters.ts Add test for comment in TypeScript type parameters (#2132) 2017-06-14 20:10:03 +10:00
types.ts Add expression node in TSAsExpression (#1675) 2017-05-23 12:33:18 -07:00