Commit Graph
21 Commits
Author SHA1 Message Date
dependabot[bot]andfisker Cheung d0942b8fae Build(deps): Bump @babel/code-frame from 7.12.11 to 7.12.13 (#10226)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-02-04 09:42:00 +08:00
Christopher Chedeau eec3e82f48 Fix absolute path in custom CSS url() calls (#9966)
At Facebook we have some custom pre-processor `-fb-url(/abs/path/)` that gets messed up as `-fb-url(/ abs/path)`  with the current version of prettier.

The parser has hardcoded logic to only parse as path things that use `url()` but not `-fb-url()` and it parses it as `division /` and `abs/path/`. Because we put a space after division, the bug is introduced.

I don't really know the impact of changing the parser, but on the printer side, it is straightforward to not add a space after `/` if it's the first element in a group. I can't think of any reason why you could write `(/ something` in CSS so I think it's a safe change.
2020-12-28 20:22:25 -03:00
fisker Cheung c0fbd75288 Fix empty front matter formatting (#9791) 2020-11-30 18:10:09 +08:00
Sosuke Suzukiandfisker f7554c62a2 Revert breaking changes related to adding pure css parser for minor releasing (#9500)
* revert without tests

* Downgrade postcss-scss and postcss-less

* Fix tests

* Revert "Make `isSCSS*` function stricter (#9093)"

This reverts commit 01f986bea9.

* Revert "Remove `css` parser from `isLessParser` check (#9092)"

This reverts commit c0bca1805d.

* Revert "Add pure css parser (#7933)"

This reverts commit 589ebf670b.

* Disable `parser-postcss.js` minify

* Try to fix build script

* Update fs.mjs

* Update fs.mjs

* Style

Co-authored-by: fisker <lionkay@gmail.com>
2020-10-31 22:22:35 +09:00
fisker Cheung b77da32a80 Update postcss to v8 (#9209)
* Update `postcss` v8

* Parser custom properties

* Improve logic

* Update lint script

* Fix node location

* Fix comments inside

* Add a test

* Test on `less` and `scss` too

* Fix empty prop print

* Clean

* Update `postcss`

* Exclude `regenerator`

* Test `no-semi`

* Add changelog

* Typo

* Apply review suggestion

* Style

* Simplify logic

* Remove error test, we don't throw on this anymore

* Style

* Update postcss

* Update postcss
2020-09-25 00:51:55 +08:00
fisker Cheung 94ef5f5683 Test: Fix indexes calculation (#9152)
* Test: Fix indexes calculation

* Simplify logic

* Update snapshots
2020-09-17 07:31:29 +08:00
fisker Cheung 01f986bea9 Make isSCSS* function stricter (#9093) 2020-09-01 16:58:35 +08:00
fisker CheungandGeorgii Dolzhykov c0abefb662 SCSS: Fix Comments at the end of the file were lost if the final semicolon was omitted (#8675)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-07-14 23:36:40 +08:00
1d6d60ee37 Fix: at rule supports selector (#8545)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Boyen Vaesen <boyen.vaesen@kbc.be>
2020-07-03 09:24:27 +08:00
boyennandBoyen Vaesen ff865794a6 Fix: Incorrect whitespace added after escaped colon in css line name (#8535)
* {fix}: Incorrect whitespace added after escaped colon in css grid line name

* {chore}: update changelog

* {fix}: add check for prevNode to be defined

Co-authored-by: Boyen Vaesen <boyen.vaesen@kbc.be>
2020-06-10 14:05:21 +03:00
fisker Cheungandjasonxia23 8dcd2d5020 Add tests from pr-5692 (#8482)
Co-authored-by: jasonxia23<xia.jason23@gmail.com>
2020-06-03 11:04:26 +08:00
Michael Mattiacci ffceb60e92 CSS: Fix url() unquoted content manipulation (#2835) (#7592) 2020-05-29 16:09:15 +03:00
fisker Cheung 12d379d29d Test: visualize the range (#8420) 2020-05-28 01:16:52 +08:00
fisker Cheung 44bae94647 Support dynamic languages in front matter (#8381) 2020-05-26 16:18:39 +08:00
fisker Cheung 243a06f073 Test: correct file extensions (#8362) 2020-05-21 21:10:00 +08:00
Georgii Dolzhykov 746fee6fef Add tests to close issues (#8276)
* add tests for #6899

* add tests for #6326

* add tests for #8154
2020-05-11 11:49:04 +03:00
fisker Cheung bfe5787726 Remove less/scss syntax in css tests (#8267) 2020-05-11 09:04:03 +08:00
fisker Cheung 85a2db5a0c Fix css tests (#8264)
* fix `stylefmt-repo` parser

* Fix tests

* Fix snapshots

* fix parsers
2020-05-09 07:50:34 +08:00
Evilebot Tnawiandfisker 3f4da31c62 fix: comment at end of at-rule with selector (#7009)
* fix: comment at end of at-rule with selector

* Improve a little bit

* Fix test

* sass directives

Co-authored-by: fisker <lionkay@gmail.com>
2020-05-08 21:39:41 +08:00
fisker Cheung ed3eeb82f8 Test: add parser check (#8256) 2020-05-08 10:56:09 +08:00
fisker Cheung 7ad515111e Categorize tests part 4(CSS, flow, misc) (#8251) 2020-05-08 01:29:34 +08:00