Commit Graph
112 Commits
Author SHA1 Message Date
Lipisandfisker Cheung 4ed2d3c4bc style: Add new ESLint rule no-lonely-if and unicorn/no-lonely-if (#10176)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-09-29 10:25:54 +08:00
renovate[bot]andfisker d22f010106 Update dependency postcss-scss to v4.0.5 (#13491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2022-09-18 21:04:14 +08:00
fisker Cheung 9bacc75772 Use .at() and Object.hasOwn() (#13482) 2022-09-18 17:50:14 +08:00
fisker Cheung 17cb07665f Improve css/yaml embed traverse (#13294) 2022-08-30 11:00:12 +08:00
fisker Cheung 30f8825cb0 Add cause to parse error (#13342) 2022-08-30 10:27:11 +08:00
fisker Cheung 86424ccc22 Remove the parsers argument for plugin.parsers.parse (#13268) 2022-08-16 09:52:27 +08:00
Sosuke Suzuki 503045c050 Use import() for postcss parsers (#13277)
* Import core parsers

* Import media parser

* Import selector parser

* Import value parser

* Remove require

* Improve imports

* Fix bundle config
2022-08-15 22:30:46 +09:00
fisker Cheung e3cb487706 Merge branch 'main' into next
# Conflicts:
#	.eslintrc.cjs
#	package.json
#	src/language-yaml/index.js
#	yarn.lock
2022-07-11 17:03:30 +08:00
fisker Cheung 6bc6914d0b Enable unicorn/prefer-logical-operator-over-ternary rule (#13060) 2022-07-09 16:03:46 +09:00
24a066399e Update dependency postcss to v8.4.13 (#12815)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-05-16 10:28:29 +08:00
fisker Cheung 717edf520f Inline require() parsers (#12527) 2022-03-28 09:41:08 +08:00
fisker Cheung 1caec5de69 Migrate CSS language to ES Module (#12341) 2022-02-21 14:22:51 +08:00
fisker Cheung 9303d84697 Merge branch 'main' into next
# Conflicts:
#	src/language-css/parser-postcss.js
#	tests/integration/__tests__/arg-parsing.js
#	tests/integration/__tests__/check.js
#	tests/integration/__tests__/config-invalid.js
#	tests/integration/__tests__/config-resolution.js
#	tests/integration/__tests__/cursor-offset.js
#	tests/integration/__tests__/debug-check.js
#	tests/integration/__tests__/debug-print-ast.js
#	tests/integration/__tests__/debug-print-comments.js
#	tests/integration/__tests__/debug-print-doc.js
#	tests/integration/__tests__/early-exit.js
#	tests/integration/__tests__/error-on-unmatched-pattern.js
#	tests/integration/__tests__/file-info.js
#	tests/integration/__tests__/help-options.js
#	tests/integration/__tests__/ignore-absolute-path.js
#	tests/integration/__tests__/ignore-emoji.js
#	tests/integration/__tests__/ignore-in-subdirectories.js
#	tests/integration/__tests__/ignore-path.js
#	tests/integration/__tests__/ignore-relative-path.js
#	tests/integration/__tests__/ignore-unknown.js
#	tests/integration/__tests__/ignore-vcs-files.js
#	tests/integration/__tests__/infer-parser.js
#	tests/integration/__tests__/invalid-ignore.js
#	tests/integration/__tests__/line-suffix-boundary.js
#	tests/integration/__tests__/list-different.js
#	tests/integration/__tests__/loglevel.js
#	tests/integration/__tests__/parser-api.js
#	tests/integration/__tests__/patterns-dirs.js
#	tests/integration/__tests__/patterns-glob.js
#	tests/integration/__tests__/patterns.js
#	tests/integration/__tests__/piped-output.js
#	tests/integration/__tests__/plugin-default-options.js
#	tests/integration/__tests__/plugin-extensions.js
#	tests/integration/__tests__/plugin-flush-line-suffix.js
#	tests/integration/__tests__/plugin-options-string.js
#	tests/integration/__tests__/plugin-options.js
#	tests/integration/__tests__/plugin-precedence.js
#	tests/integration/__tests__/plugin-preprocess.js
#	tests/integration/__tests__/plugin-resolution.js
#	tests/integration/__tests__/plugin-virtual-directory.js
#	tests/integration/__tests__/skip-folders.js
#	tests/integration/__tests__/stdin-filepath.js
#	tests/integration/__tests__/support-info.js
#	tests/integration/__tests__/syntax-error.js
#	tests/integration/__tests__/with-config-precedence.js
#	tests/integration/__tests__/with-node-modules.js
#	tests/integration/__tests__/with-parser-inference.js
#	tests/integration/__tests__/with-shebang.js
#	tests/integration/__tests__/write.js
2022-02-10 10:52:10 +08:00
fisker Cheung d962466a82 Style: Enforce kebab-case filename (#12265) 2022-02-10 10:12:31 +08:00
fisker Cheung f0b63f3dff Merge branch 'main' into next
# Conflicts:
#	CONTRIBUTING.md
#	cspell.json
#	docs/options.md
#	package.json
#	scripts/build/bundler.mjs
#	src/language-css/loc.js
#	src/language-css/parser-postcss.js
#	src/language-css/utils/index.js
#	tests/format/js/arrows-bind/jsfmt.spec.js
#	tests/format/js/async-do-expressions/jsfmt.spec.js
#	tests/format/js/bind-expressions/jsfmt.spec.js
#	tests/format/js/classes/top-level-super/jsfmt.spec.js
#	tests/format/js/comments-pipeline-own-line/jsfmt.spec.js
#	tests/format/js/decorator-comments/jsfmt.spec.js
#	tests/format/js/decorators-export/jsfmt.spec.js
#	tests/format/js/decorators/jsfmt.spec.js
#	tests/format/js/do/jsfmt.spec.js
#	tests/format/js/export-default/escaped/jsfmt.spec.js
#	tests/format/js/export-extension/jsfmt.spec.js
#	tests/format/js/export-star/jsfmt.spec.js
#	tests/format/js/exports/jsfmt.spec.js
#	tests/format/js/invalid-code/jsfmt.spec.js
#	tests/format/js/logical-assignment/jsfmt.spec.js
#	tests/format/js/multiparser-invalid/jsfmt.spec.js
#	tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js
#	tests/format/js/object-property-comment/jsfmt.spec.js
#	tests/format/js/partial-application/jsfmt.spec.js
#	tests/format/js/pipeline-operator/jsfmt.spec.js
#	tests/format/js/private-in/jsfmt.spec.js
#	tests/format/js/record/jsfmt.spec.js
#	tests/format/js/reserved-word/jsfmt.spec.js
#	tests/format/js/strings/jsfmt.spec.js
#	tests/format/js/throw_expressions/jsfmt.spec.js
#	tests/format/js/trailing-whitespace/jsfmt.spec.js
#	tests/format/js/v8_intrinsic/jsfmt.spec.js
#	tests/format/misc/errors/js/literal/jsfmt.spec.js
#	tests/format/misc/errors/js/object/jsfmt.spec.js
#	tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js
#	tests/integration/__tests__/bundle.js
#	tsconfig.json
#	yarn.lock
2022-02-09 09:22:32 +08:00
Sosuke Suzuki a0cc4ab43b Reduce bundle size of parser-postcss.js (#12204)
* Extract utils

* Move `utils.js` to `utils/index.js`
2022-01-31 16:46:47 +09:00
fisker Cheung 011672669e Merge branch 'main' into next
# Conflicts:
#	package.json
#	yarn.lock
2021-12-07 15:15:42 +08:00
fisker Cheung 294a02b979 Enable regexp/no-useless-lazy rule (#11014) 2021-12-07 14:15:03 +08:00
fisker Cheung 7bce1d02c7 Fix comments inside map (#11920) 2021-12-06 21:31:51 +08:00
fisker Cheung 81d7ca3926 Merge branch 'main' into next 2021-12-02 14:00:53 +08:00
fisker Cheung 16b6825172 Make options argument in parsers optional (#11892) 2021-12-02 13:56:47 +08:00
fisker Cheung a3cfb5a81c Merge branch 'main' into next 2021-09-09 16:15:34 +08:00
Ivan Nikolićandsosukesuzuki 1c4da1e441 Consistently quote Sass modules strings (#11461)
* Consistently quote Sass modules strings

Fixes #11053.

* Add module rule name check function

* Add more tests for `@use` and `@forward`

* Lint changelog

* Lint files

Co-authored-by: sosukesuzuki <aosukeke@gmail.com>
2021-09-09 13:18:12 +09:00
fisker Cheung f46e68052a Merge branch 'main' into next
# Conflicts:
#	src/language-css/utils.js
#	yarn.lock
2021-09-08 13:41:12 +08:00
fisker Cheung 754531032d Enable regexp/no-unused-capturing-group rule (#11013) 2021-09-08 11:18:07 +08:00
fisker Cheung a998e3c34d Merge branch 'main' into next
# Conflicts:
#	package.json
#	scripts/build/bundler.mjs
#	src/language-css/loc.js
#	yarn.lock
2021-08-13 11:45:05 +08:00
fisker Cheung 894f841fbd Style: Enforce extensions (#11227) 2021-07-21 09:10:34 +08:00
fisker 77f8f0ddb5 Merge branch 'main' into next
# Conflicts:
#	package.json
#	scripts/build/bundler.mjs
#	yarn.lock
2021-06-14 00:31:55 +08:00
fisker Cheung 9b7ba8a42c Style: Use dotAll regexp (#10864) 2021-05-18 02:44:21 +08:00
fisker Cheung 60619338f1 Merge branch 'main' into next
# Conflicts:
#	package.json
#	tests/css/atrule/each.css
#	tests/css/atrule/for.css
#	tests/css/atrule/if-else.css
#	tests/css/atrule/include.css
#	tests/css/atrule/while.css
#	tests/format/css/atrule/each.css
#	tests/format/css/atrule/for.css
#	tests/format/css/atrule/if-else.css
#	tests/format/css/atrule/include.css
#	tests/format/css/atrule/while.css
#	tests/scss/atrule/each.scss
#	tests/scss/atrule/for.scss
#	tests/scss/atrule/if-else.scss
#	tests/scss/atrule/include.scss
#	tests/scss/atrule/while.scss
#	yarn.lock
2021-05-06 16:00:12 +08:00
TJ Mazeikaandfisker Cheung 7e4f4d5fe6 Exclude @keyframes params from being parsed as a Less variable (#10773)
* Exclude @keyframes params from being parsed as a Less variable

* Update changelog_unreleased/css/10773.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* Update changelog_unreleased/css/10773.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* Add "keyframes" to cspell.json

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-04-26 01:13:40 +03:00
fisker Cheung 85fc1fa017 Merge branch 'main' into next
# Conflicts:
#	package.json
#	src/language-css/printer-postcss.js
#	yarn.lock
2021-03-29 19:47:56 +08:00
fisker Cheung 230428f34b Add consistent-negative-index-access rule (#10569) 2021-03-20 14:06:12 +02:00
fisker Cheung d8dd82d80d Fix build script (#10491) 2021-03-09 13:02:12 +08:00
fisker Cheung c5072910be Fix eslint issue 2021-03-08 18:35:48 +08:00
fisker Cheung d3c58df606 Merge branch 'main' into next
# Conflicts:
#	package.json
#	src/language-css/utils.js
#	yarn.lock
2021-03-08 17:38:10 +08:00
fisker Cheung 64a3906571 Enable unicorn/prefer-optional-catch-binding (#9464) 2021-02-25 18:28:55 +08:00
Georgii Dolzhykov ca4a51dcd9 build: fix tree shaking for front matter related functions (#10314) 2021-02-15 05:29:15 +02:00
fisker Cheung ce26805e84 Enable unicorn/prefer-spread (#10129) 2021-01-26 09:46:14 +08:00
fisker fdfb6ff312 Merge branch 'master' into next
# Conflicts:
#	docs/options.md
#	package.json
#	scripts/build/bundler.js
#	src/language-css/printer-postcss.js
#	yarn.lock
2021-01-11 14:26:20 +08:00
fisker Cheung 181a325c1c Enable unicorn/explicit-length-check (#9975) 2021-01-04 10:11:57 +08:00
fisker Cheung 8616182e95 Revert #9500 (#9584) 2020-11-09 16:47:12 +08:00
fisker Cheung 84b81c8a1a Enable directly-loc-start-end in language-css (#9591) 2020-11-05 19:26:05 +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
dependabot[bot]andfisker bc9db85490 Build(deps): Bump postcss-less from 3.1.4 to 4.0.0 (#9471)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-10-26 09:46:00 +08:00
fisker Cheung 3fe4666a85 Consistent parser errors (#9406) 2020-10-16 10:39:05 +08:00
Georgii Dolzhykov 633f084a76 LESS: fix comments in value lists (#9356) 2020-10-12 09:16:36 +08:00
fisker Cheung 9efeb8309e Update postcss-scss to v3 (#9210) 2020-09-27 08:49:16 +08: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 01f986bea9 Make isSCSS* function stricter (#9093) 2020-09-01 16:58:35 +08:00