Commit Graph

9 Commits (f27f6c525bf8737f174348c162c12143daff21cb)

Author SHA1 Message Date
Lucas Duailibe 5776c8405a
Fix TSMappedType comments (#4418) 2018-05-05 15:43:53 -03:00
Lucas Duailibe f119d4a90f
Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
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
Karl O'Keeffe 0cc0ebc3bc Allow JSX lines to be recombined (#1831)
* Allow JSX lines to be recombined

* Add test case for `<br />` breaking expression

* Fix issue where JSX whitespace could be dropped

* Newlines were incorrectly being preserved when JSX contained text
2017-06-22 09:19:44 -07:00
James Henry 9b772cb4fd Add test for comment in TypeScript type parameters (#2132) 2017-06-14 20:10:03 +10:00
Christopher Chedeau 1edb1f261b Include typeAnnotation inside of node location (#2039)
We should remove this hack once https://github.com/eslint/typescript-eslint-parser/issues/314 lands

Fixes #1946
2017-06-07 15:05:46 -07:00
Christopher Chedeau 09f147decd Do not throw for unprinted comments inside of JSX (#2036)
Fixes #1990
2017-06-07 12:57:03 -07:00
Christopher Chedeau c46f230a40 Fix TSAbstractClass base (#1676)
This lets the comment traversal code discover it
2017-05-23 12:34:40 -07:00
Christopher Chedeau e37ea2c1f6 Add expression node in TSAsExpression (#1675)
This lets the comment traversal code discover it
2017-05-23 12:33:18 -07:00