Commit Graph
25 Commits
Author SHA1 Message Date
fisker Cheung a21dfbfa21 Merge branch 'main' into next-rebase
# Conflicts:
#	.eslintrc.cjs
#	package.json
#	scripts/build/bundler.mjs
#	scripts/build/config.mjs
#	scripts/build/esbuild-plugins/replace-module.mjs
#	src/cli/file-info.js
#	src/cli/find-config-path.js
#	src/cli/index.js
2022-03-24 15:02:29 +08:00
fisker Cheung 4250812682 Remove require from UMD bundles (#12485) 2022-03-23 10:21:02 +08:00
fisker Cheung 3bb69beabf Use node: protocol (#12373) 2022-03-02 13:44:00 +08:00
fisker Cheung 05aa5e16d6 Migrate src/{main,common,config}/** to ES Modules (#12344) 2022-02-23 20:16:30 +08:00
fisker Cheung 54835025d5 Migrate JS language to ES Module (#12342) 2022-02-21 15:53:02 +08:00
fisker Cheung 894f841fbd Style: Enforce extensions (#11227) 2021-07-21 09:10:34 +08:00
fisker Cheung d3b777dd7d Update build script (#10946) 2021-05-27 08:54:42 +08:00
fisker CheungandGeorgii Dolzhykov 2e1021ca79 Reduce use of Array#reduce() (#10863)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-05-16 12:43:13 +08:00
fisker Cheung 64a3906571 Enable unicorn/prefer-optional-catch-binding (#9464) 2021-02-25 18:28:55 +08:00
Georgii Dolzhykov 1df287acc8 Use default parameters where possible and other microrefactoring (#10135) 2021-01-27 12:36:39 +08:00
fisker Cheung 3fe4666a85 Consistent parser errors (#9406) 2020-10-16 10:39:05 +08:00
fisker Cheung d31ebf4619 Test: Improve coverage (#8811) 2020-08-21 09:43:24 +08:00
Georgii Dolzhykov 9dad95b35f Bump Prettier dependency to 2.0.0 2020-03-21 22:09:54 +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 0e77cd3d33 Update ESLint to v6 (#6364) 2019-08-08 13:21:32 +03:00
Lucas Duailibe 4cc99242a8 Bump Prettier dependency to 1.18.0 2019-06-06 18:48:11 -03:00
Jed Fox b74f94d6dd Remove the dynamic require() call in the standalone bundle (#5612)
* Remove the dynamic `require()` call in the standalone bundle

* Liiiint

* Just use `replaceStrings`

* Reword error message
2018-12-11 05:59:59 -05: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
Lucas Duailibe 52a2a46b3c New build system (#4449) 2018-05-24 15:30:45 -03:00
Lucas Duailibe 5c6e0802af Don't default parser to babylon (#4528)
* Don't default parser to babylon

* Different default values according to version

* Fix error logging

* Add tests specifically for parser inference

* Add another test case

* Add API test
2018-05-23 16:55:06 -03:00
Ika 0f02940de2 refactor(javascript): move loc util (#4443) 2018-05-10 02:23:40 +08:00
Christian Zosel fac08034e7 Split out location extraction into plugin config (#3777)
* Split out location extraction into plugin config

* Reduce set of exported function, rebase to current master

* Pass custom locStart/locEnd fn's directly to affected methods

* (wip) always use locStart/locEnd from plugin

* Convert graphql implementation

* Convert HTML implementation

* (wip) convert JS implementation

* Remove unused variables

* Continue conversion of JS implementation

* Replace "util.locStart" with direct call to "options.locStart"

* Remove util closure

* Add unit test for structure of shared util

* Fix linting error, simplify locStart/End implementations
2018-02-09 23:17:48 +11:00
Marcel Jackwerth a27d19b2c1 Allow Plugins to preprocess text (#3664)
* Allow Plugins to preprocess text

* Actually pull up text

* Always expect the preprocessor to set the text

* Add tests for preprocessing

* Remove unused variable
2018-01-10 00:27:26 +11:00
Lucas Azzola ee148bfded Split up comment printing (#3575)
* Split up comment printing

* Refactor plugin handling

* Allow multiparser to use options normalization

* Rename to canAttachComment

* Add inline comment

* Format code

* Use prettier.__debug to get AST
2017-12-27 00:04:09 +11:00
Lucas Azzola 4c9d4061da Prettier Plugin API (#3536)
* Move files around in preparation for refactor

* Update paths in build script

* Extract generic printing logic from the JavaScript printer

* Conform printer API

* Fixup decorator handling

* Fix multiparser

* Create plugin entry for markdown

* Create plugin entry for javascript/typescript

* Create plugin entry for html

* Create plugin entry for graphql

* Create plugin entry for css/less/scss

* Move JSON to JS plugin entry

* Integrate plugins into getSupportInfo()

* Move astFormat to parser definition

* Move util to common

* Implement parser loading

* remark -> mdast

* Rename cli/cli -> cli/index

* Rename builder -> doc package, fix printer resolution

* Fix doc shape assumption in CSS-in-JS logic

* Fix third-party.js prod resolution

* Fixup build-docs script

* Distribute multiparser code

* Remove requirement to forward options

* Flatten closure

* Remove debug directory

* Expose doc

* Add external plugins

* Pass options to loadPlugins

* Export getParsers

* Pin resolve version

* Use getSupportInfo in Markdown embed

* Document plugin API

* Update build-docs

* Add CLI for plugins

* Lint docs

* Fixup build.js

* Add vue language

* Fixup multiparser for vue

* Upgrade rollup and rollup-plugin-commonjs

* Fixup third-party build

* Change AST format in docs
2017-12-26 12:23:50 +11:00