Commit Graph

15 Commits (2cfd8fb5180d35eddbe5aa8319f587e21abf8139)

Author SHA1 Message Date
Zhongliang Wang 2cfd8fb518 Support TypeScript 3.7 (and drop Node 6 support for direct inst… (#6657)
* WIP: Support TypeScript 3.7

* Add support for `asserts` keyword; Update snapshots

* Update typescript-estree to v2.5.0 to remove the dependency on chokidar

* Update TypeScript

* Update CHANGELOG.unreleased.md

* Add examples for TypeScript 3.7

* Update TypeScript 3.7 to latest dev version

* Correct wording

* Support `declare` keyword on class members (TypeScript 3.7 feature)

* Update Changelog and downgrade TypeScript from 3.8.0-dev to 3.7.1-rc

* Add a note regarding to dropping Node 6 support for direct installation

* tweak build config to repair build

* update CHANGELOG.unreleased.md

* TSTypePredicate microrefactoring

* fix formatting

* clean up tests

* fix parens for optional chaining inside computed properties

* update CHANGELOG.unreleased.md

* unify output across parsers for template literals

* enable more tests with optional chaining

* fix unneeded parens inside computed key of OptionalMemberExpression

* fix paren issues for OptionalCallExpression

* more fixes for OptionalCallExpression

* @typescript-eslint/typescript-estree 2.5.1-alpha.4

* fix lint

* revert build hacks

* fix one more parens issue

* @typescript-eslint/typescript-estree 2.5.1-alpha.5, remove loggerFn override

* drop node 6 for direct installing from github

* fix another parens issue, disable some tests for flow

* workaround for flow bug

* fix issues with comments


Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2019-10-28 17:53:57 +01:00
Rich Hong 906d33749b Add support for styled-jsx external styles (#6089) 2019-05-19 13:26:30 -03:00
jwbay 6cee80b5b5 Don't break simple template literals (#5979)
A simple template literal is initially defined as a literal wherein all the expressions are identifiers or member access expressions where all parts are identifiers. We print these expressions into strings with infinite print width before printing the template.
2019-05-08 13:14:55 -03: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
Onur Temizkan f6d8be881c fix(css-in-js) Keep newlines in CSS-in-JS Templates (Fixes: #5147) (#5240)
* fix(css-in-js) Keep newlines in CSS-in-JS Templates (Fixes: #5147)

* Add more tests

* Do not add semicolon when CSS prop is a template variable

* Fix deletion of original semicolon

* Prettify long line
2018-11-01 21:58:16 +02: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
Lucas Duailibe a9be90c5d4 Format CSS prop for emotion 2017-12-02 22:50:07 -03:00
Lucas Duailibe 759953ef6d
Template literals: Don't break on identifiers but break if comments (#3299) 2017-11-21 15:51:15 -02:00
Lucas Duailibe 38b15f7899 Improve template literal expresions line breaks (#3124) 2017-10-31 14:31:27 -06:00
Simone Picciani 85e0bffa7d Removed injectGlobal and keyframes (#2342) 2017-06-28 16:03:33 -07:00
Simone Picciani 067a0137bd Add support for css, keyframes and injectGlobal keywords (#2337)
* styled components now support css keyword

* added support also for keyframes

* added comment to reflect the new keywords

* modified comment

* ignore css and keyframes when testing ast manipulations

* added also injectGlobal
2017-06-28 14:31:27 -07:00
Christopher Chedeau 38d4661ba9 Forward originalText in multiparser (#2260)
If we don't, all the places where we read from the original text (mostly comments) are reading into random places.

Fixes #2258
2017-06-24 17:54:09 -07:00
Christopher Chedeau 08060e7c94 Use fill for CSS values (#2224)
This looks less weird to have them flow as they fit than breaking on every single line.

Fixes #2213
2017-06-21 15:13:51 -07:00
Rodrigo Pombo 8dd0cb2a05 Format CSS in template literals with expressions (#2102)
* Add support for styled-jsx with expressions

* Lint

* Fix require for Node 4

* Re-create template-literal document when replacing placeholders

* Add support for styled-components with expressions

* Fix merge

* Move css library detection to functions
2017-06-13 09:45:16 -07:00
Rodrigo Pombo d4774edd03 Parse CSS in template literals (styled-jsx) (#1984)
* Add basic styled-jsx parsing

* Use eval("require")

* Remove template literal raw and cooked values when it contains CSS

* Set postcss parser to options and group subtree parts

* Gracefully give up TemplateLiteral formatting when it fails
2017-06-06 08:28:13 -07:00