Commit Graph
75 Commits
Author SHA1 Message Date
fisker Cheung 22c423933c Refactor angular control flow block (#15614) 2023-11-12 22:15:30 +08:00
0176a33db4 Support angular control flow (#15606)
Co-authored-by: dweizhe <d.weizhe@anyong.com.tw>
Co-authored-by: fisker <lionkay@gmail.com>
2023-11-12 20:01:30 +08:00
Sosuke Suzuki fa48415617 Bump Prettier dependency to 3.0.0 2023-07-05 21:50:05 +09:00
renovate[bot]andfisker 25fa483e35 chore(deps): update dependency typescript to v5.1.5 (#14896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-07-04 11:26:24 +08:00
fisker Cheung 94660f6cf0 Support parse void element in vue (#14560) 2023-03-24 14:51:04 +08:00
fisker Cheung 6d21de11fd Update plugin build system (#14571) 2023-03-24 08:44:25 +08:00
fisker Cheung 9d08be8907 Style: early return to reduce indention (#14561) 2023-03-22 18:47:32 +08:00
fisker Cheung e2c5da38f4 Fix builtin plugins (#14502) 2023-03-13 12:34:56 +08:00
fisker Cheung 375e3f8382 Refactor html parser (#14443) 2023-03-06 09:13:09 +08:00
fisker Cheung 1482ee2703 Merge inferParserByLanguage into inferParser (#14439) 2023-03-03 17:02:13 +08:00
fisker Cheung f8fed37dc7 Simplify inferParserByLanguage (#14437) 2023-03-03 15:12:23 +08:00
fisker Cheung 4fb03a7f2a Remove dynamic imports (#14369) 2023-02-18 11:28:58 +08:00
fisker Cheung b332654039 Merge branch 'main' into next
# Conflicts:
#	docs/browser.md
#	src/language-html/parser-html.js
#	src/language-js/print/jsx.js
#	src/language-js/print/typescript.js
#	website/yarn.lock
#	yarn.lock
2023-01-16 15:53:36 +08:00
fisker Cheung 4ad9160891 Angular: allow self-closing tags on custom elements (#14170)
Fixes https://github.com/prettier/prettier/issues/14168
2023-01-14 10:57:39 +08:00
renovate[bot]andfisker 6959f30a81 Update dependency eslint-plugin-unicorn to v45 (#13876)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2022-11-21 23:41:27 +08:00
fisker Cheung 59eda43d71 Use optional chaining where possible (#13773) 2022-11-03 14:23:07 +08:00
fisker Cheung a3dfbf70f7 Build: more powerful esbuild evaluate plugin (#13724) 2022-10-30 11:14:51 +08:00
fisker Cheung 9cf73d3610 Use c8 ignore comments (#13683) 2022-10-22 23:33:08 +08:00
fisker Cheung cac9222e5e Update angular-html-parser to v2.1.0 (#13680) 2022-10-20 09:11:57 +08:00
fisker Cheung 72c811bfa7 Enable some ESLint rules (#13548) 2022-10-04 00:14:19 +08:00
fisker Cheung f3d1790533 Enable logical-assignment-operators rule (#13529) 2022-09-29 10:40:13 +08:00
fisker CheungandGeorgii Dolzhykov f2c50456b8 Switch parse-srcset to npm published version (#13536)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2022-09-27 16:02:47 +08:00
fisker Cheung 5b962d6f14 Extract inferParserByLanguage to seperate file (#13483) 2022-09-18 19:25:21 +08:00
fisker Cheung 9bacc75772 Use .at() and Object.hasOwn() (#13482) 2022-09-18 17:50:14 +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 Suzukiandfisker Cheung 7d74e821e0 Use import() for html parser (#13270)
* Use `import()` for html parser

* Update src/language-html/parser-html.js

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

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-08-12 23:49:45 +09:00
fisker Cheung 717edf520f Inline require() parsers (#12527) 2022-03-28 09:41:08 +08:00
fisker Cheung 8118299c67 Merge branch 'main' into next
# Conflicts:
#	.github/workflows/validate-vendor-versions.yml
#	package.json
#	src/language-css/printer-postcss.js
#	src/language-js/print/assignment.js
2022-03-10 11:30:31 +08:00
02c17f131b Allow lang attribute of <template> to be empty (#12394)
Co-authored-by: niklasvatn <niklas@vatn.se>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-03-09 06:37:16 +08:00
fisker Cheung dceb88bb3b Migrate HTML language to ES Module (#12343) 2022-02-21 16:44:56 +08:00
Sosuke Suzuki ff78a94424 Reduce bundle size of parser-html.js (#12176) 2022-01-28 10:07:37 +08:00
翠 / greenandfisker Cheung dd3e1a49e0 Improved performance with large HTML files (#11696)
* Simplify Object.assign

* Remove copying ast inside addIsSpaceSensitive

* Remove copying ast inside extractWhitespaces

* Remove copying ast inside removeIgnorableFirstLf

* Remove copying ast inside mergeIeConditonalStartEndCommentIntoElementOpeningTag

* Remove copying ast inside mergeNodeIntoText

* Remove copying ast inside mergeSimpleElementIntoText

* Remove copying ast inside extractInterpolation

* Remove copying ast inside _parse

* Remove copying ast inside preprocess

* Fix lint

* Refactor index/next/prev recalculation with loop

* Remove redundant condition

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

* Remove index/siblings from properties

* Define and use replaceChild method

* Change prev/next into getter

* Make parent non writable

* setNonEnumerableProperties to setNonEnumerableProperty

* Set parent with constructor

* Make parent a normal property

* Use child.prev/next

* Remove parent parameter from constructor

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-01-11 10:06:46 -03:00
fisker Cheung e2d07b35ec Enable unicorn/prefer-switch (#11935) 2021-12-07 14:13:12 +08:00
fisker Cheung 16b6825172 Make options argument in parsers optional (#11892) 2021-12-02 13:56:47 +08:00
Sosuke Suzuki 9dcfd16e6a Use ts-expect-error instead of ts-ignore (#11330) 2021-08-09 00:00:22 +09:00
fisker Cheung 894f841fbd Style: Enforce extensions (#11227) 2021-07-21 09:10:34 +08:00
dependabot[bot]andGeorgii Dolzhykov f6b3919a62 Build(deps): Bump angular-html-parser from 1.7.1 to 1.8.0 (#10681)
* Build(deps): Bump angular-html-parser from 1.7.1 to 1.8.0

Bumps [angular-html-parser](https://github.com/ikatyang/angular-html-parser) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/ikatyang/angular-html-parser/releases)
- [Changelog](https://github.com/ikatyang/angular-html-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ikatyang/angular-html-parser/compare/v1.7.1...v1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Typechecking improvements

* Add a TODO comment

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-04-12 11:53:19 +03:00
a6a05fa7fd Enable and fix typecheck in language-html (#8904)
Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: Christopher J. Brody <chris.brody+brodybits@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-03-29 20:00:50 +08:00
fisker Cheung 230428f34b Add consistent-negative-index-access rule (#10569) 2021-03-20 14:06:12 +02:00
fisker Cheung 9c6de24405 Style: Disallow == (#10338) 2021-02-21 02:44:16 +02:00
Georgii Dolzhykov ca4a51dcd9 build: fix tree shaking for front matter related functions (#10314) 2021-02-15 05:29:15 +02:00
fisker CheungandGeorgii Dolzhykov 6175013ae3 Enable unicorn/no-array-for-each (#10112)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-01-24 19:26:42 +08:00
fisker Cheung 181a325c1c Enable unicorn/explicit-length-check (#9975) 2021-01-04 10:11:57 +08:00
fisker Cheung 9e9cc85072 Enable directly-loc-start-end for all languages (#9610) 2020-11-10 09:06:08 +08:00
fisker Cheung 5b6d1dfd91 Refactor: getParserName -> inferParserByLanguage (#9556) 2020-11-02 10:41:03 +08:00
fisker Cheung 3fe4666a85 Consistent parser errors (#9406) 2020-10-16 10:39:05 +08:00
fisker Cheung e10aeee5c9 HTML: Fix crash on reading Node.sourceSpan (#9372) 2020-10-13 09:17:57 +08:00
fisker Cheung 720177ac5c HTML: Fix format on files with frontMatter (#9043) 2020-08-25 19:49:38 +08:00
fisker Cheung d31ebf4619 Test: Improve coverage (#8811) 2020-08-21 09:43:24 +08:00