Commit Graph

19 Commits (master)

Author SHA1 Message Date
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
Ika 4af3dd4b07
test: improve snapshots (#5521)
- before
  ```
  ${input}${"~".repeat(printWidth)}
  ${output}
  ```
- after
  ```
  ===options===
  ${options}
  ${" ".repeat(printWidth)}| printWidth
  ====input====
  ${input}
  ===output====
  ${output}
  =============
  ```
2018-11-25 16:21:14 +08:00
Ika 5e8a4a115a
feat: support HTML/Vue/Angular (#5259) 2018-11-04 23:03:07 +08:00
Jed Fox 65b2454dd8
Improved object-break heuristic (#5205) 2018-10-12 12:45:30 -04:00
Ika 5bcd4424fa
fix(css): no wrong loc info caused by front matter (#5103)
Replace front matter with whitespaces to maintain the loc info.
2018-09-19 09:18:50 +08:00
Simen Bekkhus 51b7c02e12 Upgrade jest to 22 (#4782)
* chore: upgrade Jest

* chore: update snapshots

* chore: lock down babel dependency using invalid syntax

* 2 args to test.skip

* use jest 22 for now

* Revert "2 args to test.skip"

This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.

* remove snapshot name from matcher

* fix standalone tests skips
2018-07-03 03:06:29 -03:00
Ika f51acf22fe
feat(vue): support pragma (#4713) 2018-06-25 10:44:00 +08:00
Ika b99de9811b
feat(graphql): support pragma (#4699) 2018-06-17 14:04:48 +08:00
Evilebot Tnawi 03a2002348
fix: newline between front-matter and comment (#4701) 2018-06-15 16:27:41 +03:00
Ika f6890bd071
feat(css): support pragma (#4688) 2018-06-14 09:51:18 +08:00
Ika 317f3a3c56
feat: split out JSON5 (#4367)
* feat: split out JSON5

* test: update snapshots

* test: update debug-check tests

* feat(playground): use JSON's code sample for JSON5

* fix: add missing trailing newline
2018-04-25 22:10:22 +08:00
Lucas Duailibe 50101e98c6
Fix pragma detection/insertion for JSON (#4333) 2018-04-24 10:10:16 -03:00
Ika 0c1d62079e
feat(markdown): support hasPragma/insertPragma (#4275)
* feat(markdown): support hasPragma/insertPragma

* test: add require-pragma tests

* feat: support pragma with front matter

* feat: support pragma in multiline comment
2018-04-09 00:10:24 +08:00
Lucas Duailibe 13103101eb
Move pragma detection/insertion to plugins (#3685)
New pragma infrastructure, only JS and JSON has detection/insertion implemented
2018-03-08 13:50:33 -03:00
Lucas Azzola f87cbcf76e
Bump jest-docblock to 22.2.2 (#3947) 2018-02-11 17:42:08 +11:00
Lucas Duailibe 90e8b13e86
Ignore whitespace in docblock right after /** (#3430) 2017-12-07 03:28:29 -02: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
Jake 50f3e646c7 Add option to insert @format to first docblock if absent (#2865)
* Add option to insert @format pragma if absent

prependPragma --> insertPragma

add tst dir, move stripBom, add to README, update snapshots

remove noise from test + update snapshots

use jest@test new functions, update docs, rerun snapshots

fix accidental upgrade to jest@test

update jest-docblock again to latest with strip()

updated snapshot

* updated snapshots

* revert jest dep change

* apply a trim to parsed comments

* remove empty object

* Revert "apply a trim to parsed comments"

This reverts commit 467f71ce5f4b4f8a1b5c4474ee0484bc96c92141.

* rerun snapshots with proper jest version

* pin jest-docblock to latest @test release

* comment out docs for new feature from readme

* remove leading newlines

* ensure blank line between docblock and rest of file

* remove backtick string
2017-10-06 19:37:14 +11:00