Commit Graph
51 Commits
Author SHA1 Message Date
fisker Cheung 17377f3082 Split css parsers (#7932)
* Split css parsers

* pass function to parseWithParser

* Fix plugins parser

* Fix coverage fails

* coverage ignore

* Update project coverage target to 95%
2020-04-03 12:41:48 +08:00
Georgii Dolzhykov 9dad95b35f Bump Prettier dependency to 2.0.0 2020-03-21 22:09:54 +02:00
Evilebot TnawiandGeorgii Dolzhykov 4602bb6b95 refactor css comments (#7021)
* refactor css comments

* workarounds for postcss-less location bugs

* improve replaceQuotesInInlineComments

* update changelog

* fix comments in selectors

* fix comments in values

* use \ufffe instead of \0 because that's what these characters are for

see http://www.unicode.org/faq/private_use.html#nonchar6

* fix quoted urls

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-03-20 18:09:07 +02:00
fisker Cheung acff41e7c9 Update postcss-less to v3 (#6981) 2020-03-10 01:14:34 +02:00
fisker Cheung c0517441b2 Enable unicorn/prefer-string-slice (#7251) 2020-01-23 15:15:28 +03:00
fisker Cheung 27b5cb4d9d Enable ESLint prefer-rest-params rule (#7400) 2020-01-23 10:36:18 +02:00
fisker Cheung 288bf5ee3d Fix prefer-object-spread in src/language-css (#7351) 2020-01-19 01:20:58 +02:00
fisker CheungandGeorgii Dolzhykov d456b158e0 Style: use object destructuring (#7325)
* Style: use object destructuring

* Update versions.js

* Update sync-flow-tests.js

* Update core.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-14 17:30:18 +02:00
fisker Cheung 85eefb918e Style: enable object-shorthand (#7322) 2020-01-14 14:25:24 +03:00
fisker Cheung 57f0dd56dd Replace indexOf with includes (#6967)
* Replace `indexOf` with `includes`

* Add `unicorn/prefer-includes`
2019-11-17 11:06:14 +01:00
fisker CheungandGeorgii Dolzhykov 85912a738d Update postcss-less to v2 (#6778)
* Update `postcss-less` to v2

* fix less `custom-selectors`

* fix less `custom-selectors` 2

* fix custom-selector `:` position

* remove less hack

* fix custom selector

* cleanup

* add changlog

* add link

* restore changlog

* restore snap

* restore snap

* update postcss-custom-selectors detect

* remove startsWith

* trigger build

* update `custom-selector`

* add test and changelog

* style

* md

* issue-4090-test

* docs

* Update CHANGELOG.unreleased.md

Co-Authored-By: Georgii Dolzhykov <thorn.mailbox@gmail.com>

* fix pr issue

* fix

* fix merge issue

* insert new line

* snap update

* only support custom-selector in css

* scss already parse it as custom-selector

* remove `custom-selector` test in scss

* link
2019-11-08 18:34:14 +03:00
Ika 6a54e21c12 fix(css-in-js): do not remove semicolon (#5353) 2018-11-07 00:19:42 +08:00
Prashant Andani cdcb7b11c9 Use destructures and refactor code for readability (#4844)
* Use destructuring for readability and optimzations at for loop length property

* Destructure variables for easy maintainability of code

* PR review fix

* refactor: fix linting

* Use destructures and refactor code for better readability

* Remove merge conflict line

* lint before commit
2018-07-17 18:01:44 -03:00
Ika 99c4e41fa1 feat: format yaml front matter (#4773)
* refactor: front-matter

* feat: format yaml front matter
2018-07-03 09:54:40 +08:00
Evilebot Tnawi aa4ea034b3 refactor: some stuff (#4703) 2018-06-25 12:57:41 +03:00
Ika f6890bd071 feat(css): support pragma (#4688) 2018-06-14 09:51:18 +08:00
Evilebot Tnawi 9387e9d833 fix: comment type for scss (#4598) 2018-05-30 23:22:18 +03:00
Lucas Duailibe 52a2a46b3c New build system (#4449) 2018-05-24 15:30:45 -03:00
Jed Fox 9155fe5018 Rename all uses of frontmatter to frontMatter or front-matter (#4519) 2018-05-21 10:02:09 -04:00
Lucas Duailibe 983202413c Refactor frontmatter handling (#4482) 2018-05-14 22:17:15 -03:00
Evilebot Tnawi 636ae9d037 refactor: css language (#4483) 2018-05-15 01:08:04 +03:00
Evilebot Tnawi 9d41f1355a refactor: parser-postcss (#4478) 2018-05-15 00:00:45 +03:00
Aakansha Doshi f99aee8e46 refactor: use postcss-values-parser for @import at rule (#4435)
* update to postcss value parser for @import and at rule

* fix specs

* Add rule for @import url and fix specs

* fix more specs

* fix more specs

* import check

* fix specs and add more specs

* remove console.log

* review fixes

* update snapshots

* remove bad code

* fix spec

* remove code

* Add comment

* fix comment

* lint fix
2018-05-14 22:54:34 +03:00
Elias Meire 2f5c00ad18 Fix: not greedy match the frontmatter in postcss parser (#4457) 2018-05-10 13:50:19 -03:00
Elias Meire 5b7ebb18ba Fix: Always preserve frontmatter, remove dependency (#4392)
* Fix: Always preserve frontmatter, remove dependency

* Move correct test to correct filename

* Add test for malformed frontmatter, finetune regex

* Use other malformed test case

* Update yarn.lock
2018-04-28 08:53:30 -03:00
Lipis 37eea26acf Make Travis green again (#4380) 2018-04-26 10:17:19 +08:00
Evilebot Tnawi e5741552ed feat: use postcss-values-parser for @namespace at rule (#4373) 2018-04-25 21:27:12 +03:00
Evilebot Tnawi 58a91cc570 feat: improve @support at-rule output (#4372) 2018-04-25 20:41:41 +03:00
Aakansha Doshi 7f20ffc7f5 Allow trailing comma in scss list and maps (#4317)
* Allow trailing comma in scss list and maps

* fix #4076

* triple equalto

* newline

* linting

* review fixes

* print trailing comma only when options.tralingComma is not none

* Add nested maps and lists

* add isSCSS() check

* linting

* Add utils for isSCSS() in language-css

* lint
2018-04-18 17:40:01 -03:00
Evilebot Tnawi 7c0dee617b refactor: parseNestedCSS function (#4208) 2018-04-13 22:12:59 +03:00
Evilebot Tnawi c9bb96cd52 fix: don't break value property with inlined URL (#4236) 2018-04-02 14:16:39 +03:00
Evilebot Tnawi 5537140296 fix: don't lowercase variable in css modules (#4152) 2018-03-15 18:16:28 +03:00
Evilebot Tnawi 65b988a989 feat: ignore non standard IE filter values (#4028) 2018-02-26 14:58:38 +03:00
Evilebot Tnawi 7b457fd3b8 refactor: at rules parse (#4023) 2018-02-22 12:49:03 +03:00
Evilebot Tnawi e1491d0f95 fix(css): comments in at rules (#3920) 2018-02-21 21:36:09 +03:00
Evilebot Tnawi cce8924ef3 fix(css): @nest at rule (#3975) 2018-02-15 15:19:28 +03:00
Evilebot Tnawi c36cb7670a tests(css): postcss popular plugins (#3959) 2018-02-12 20:12:09 +03:00
Evilebot Tnawi d716c84156 fix(css): space and newlines before parenthesis (#3930) 2018-02-09 15:28:55 +03:00
Evilebot Tnawi bc027bd661 fix(css): space after if in else at rule (#3921) 2018-02-07 19:53:28 +03:00
Evilebot Tnawi 9e6bd15ade fix(css): comments in selectors (#3909) 2018-02-07 13:20:13 +03:00
Evilebot Tnawi 1b13dc8974 fix(css): declaration comments (#3897) 2018-02-06 18:09:42 +03:00
Evilebot Tnawi ed2a9be58e fix(css): stringify unquoted data urls (#3877) 2018-02-02 20:39:53 +03:00
Evilebot Tnawi f5e74cd70a fix(css): at rules improve formatting and tests (#3828) 2018-02-02 18:06:47 +03:00
Evilebot Tnawi ed5f68844f fix(css): scss global flag (#3844) 2018-01-30 17:53:37 +03:00
Evilebot Tnawi 22ba2bcb64 fix(css): don't remove semicolon in less ruleset declaration (#3841) 2018-01-30 14:16:07 +03:00
Evilebot Tnawi a3bf378259 fix: handle YAML front matter block (#3802) 2018-01-24 19:44:09 +03:00
Evilebot Tnawi 7797c93489 fix(css): ignore media params with scss interpolation (#3801) 2018-01-24 12:31:30 +03:00
Evilebot Tnawi 105914e45c fix: don't handle args of @warn and @error directives as media query list (#3769) 2018-01-19 17:00:06 -07:00
Evilebot Tnawi 934f679705 fix(scss): !default directive (#3724) 2018-01-12 22:12:02 +11:00
Christopher Chedeau a4dd86436a [scss] Print comments inside of selector as is (#3649)
Fixes #3647
2018-01-04 19:03:04 -08:00