Commit Graph
41 Commits
Author SHA1 Message Date
fisker Cheung a26e8ace46 Resolves config by default in getFileInfo() (#14108) 2023-01-30 09:59:19 +08:00
fisker Cheung 2d23d33a40 Remove since from options and languages (#13699) 2022-10-23 11:18:36 +08:00
fisker CheungandSosuke Suzuki 31a796d32c Restructure package files, add exports (#13530)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2022-10-06 15:20:19 +08:00
fisker Cheung 822f354ceb Update docs (#13309) 2022-09-26 19:28:43 +08:00
fisker Cheung a054eb3868 Make prettier.clearConfigCache async (#13265) 2022-08-11 14:13:13 +08:00
fisker CheungandGeorgii Dolzhykov 0b9cb96f58 Remove support for custom parser api (#13250)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2022-08-08 01:09:10 +08:00
fisker 0e0f879c1a Merge branch 'main' into next
# Conflicts:
#	docs/browser.md
#	package.json
#	scripts/release/yarn.lock
#	scripts/vendors/vendor-meta.json
#	scripts/vendors/vendors.mjs
#	src/cli/expand-patterns.js
#	src/cli/format.js
#	src/cli/utils.js
#	src/language-js/index.js
#	src/language-js/parse/postprocess/index.js
#	src/language-js/parse/postprocess/typescript.js
#	tests/format/misc/errors/invalid/jsfmt.spec.js
#	tests/integration/__tests__/__snapshots__/support-info.js.snap
#	website/playground/sidebar/SidebarOptions.js
#	yarn.lock
2022-06-19 11:12:22 +08:00
fisker Cheung 59ec4f2ef4 Bump Prettier dependency to 2.7.0 2022-06-14 14:33:25 +08:00
fisker Cheung 193365eb71 Load plugins asynchronously (#12790) 2022-05-06 09:27:54 +08:00
fisker Cheung 34fadbe67d Remove {resolveConfig,resolveConfigFile,getFileInfo}.sync (#12788) 2022-05-05 19:15:08 +08:00
fisker Cheung c6d6b25833 prettier.{format,formatWithCursor,check}() are now async (#12574) 2022-04-29 14:22:24 +08:00
Georgii Dolzhykov 109492a497 Clarify prettier.format docs (#10499) 2021-03-10 02:54:50 +02:00
554b15473d Document recommended setup and improve docs overall (#8510)
Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-06-28 09:47:29 +08:00
fisker Cheung eb6ff31c26 Docs: Update resolveConfigFile usage example (#6873) 2020-06-18 20:09:10 +08:00
fisker Cheung fbf0beb716 Fix inferredParser when calling getFileInfo() with resolveConfig: true (#8551) 2020-06-17 18:47:56 +08:00
Georgii Dolzhykov 9dad95b35f Bump Prettier dependency to 2.0.0 2020-03-21 22:09:54 +02:00
fisker Cheung 31c5798e59 Memoize loadPlugins (#7485) 2020-02-27 16:43:02 +02:00
Georgii Dolzhykov cf3d9f0b80 api: remove the version parameter of getSupportInfo (#7620)
* api: remove the version parameter of getSupportInfo

* add changelog entry

* remove mapDeprecated

* Update pr-7620.md

* remove the first parameter completely

* Update api.md

* add default value for opts just to be on the safe side
2020-02-23 02:47:17 +02:00
Jack SteamandGeorgii Dolzhykov a858a315e9 Clarify API docs (#7402)
* Clarify API docs

It is not immediately obvious how to set the language (parser), hopefully this will save others time.

* improve wording

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-25 16:19:42 +02:00
fisker Cheung 304acbea01 Change external links to https (#6874) 2019-11-08 14:49:32 +03:00
Kai Cataldo df45e12c5c API: add resolveConfig option to getFileInfo() (#6666)
* Add useConfig option to getFileInfo()

* useConfig -> resolveConfig
2019-10-23 13:56:59 +02:00
Sosuke Suzuki 60d6f139a9 Docs: update docs to follow #6665 (#6670) 2019-10-16 18:53:01 +02:00
Sosuke Suzuki 1aef2b13f4 Website: Update documentation of resolveConfigFile (#6568) 2019-10-02 17:34:58 +02:00
Jimmy Gaussen a8d423b18c docs: remove redundant "./" from relative links (#5741)
Fixes #5740

fixed with `sed -i "s#(\./#(#" docs/*.md website/versioned_docs/version-stable/*.md`
2019-01-10 12:06:41 -02:00
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
Alexander Kachkaev a18d80253a Restore --check option docs (#5674) 2018-12-25 16:01:02 +08:00
Alexander Kachkaev 439b1649ff Temporary remove --check docs until 1.16 is released to avoid confusion (#5671)
Context: https://github.com/prettier/prettier/pull/5629#issuecomment-448933238
2018-12-21 06:27:17 -05:00
Alexander Kachkaev 711c6d78a8 Add --check option (#5629) 2018-12-19 22:03:30 +08:00
Alexander Kachkaev b87fe4cf22 Add option to enforce certain line endings (#5327) 2018-11-06 22:47:13 +08:00
Ika e72cb538f9 fix: update flow support info (#4943) 2018-08-08 23:47:49 +08:00
Ika 11275bfa9d docs: fix linting 2018-05-29 10:16:07 +08:00
Berton Zhu bfa191f07c Update example code in Doc to v1.13 (#4578) 2018-05-28 20:12:22 +10:00
Lucas Duailibe 412b064df8 Format docs with Prettier 1.13 2018-05-27 15:38:31 -03:00
Alexander Kachkaev cc734753fc Implement prettier.getFileInfo() method and --file-info CLI option (#4341)
* Implement prettier.getFileInfo() method and --file-info CLI option

* Add empty line between functions in index.js

* Support --plugin-search-dirs / pluginSearchDirs() in --file-info / getFileInfo()

* Address review comments by @ikatyang
2018-05-10 00:53:44 +08:00
Lucas Duailibe 67f1c4877e Refactoring: better boundaries for different parts of the project (#4364) 2018-04-25 13:29:35 -03:00
Ika 586b55b326 docs(api): language.since is now optional (#4363) 2018-04-24 21:00:52 +08:00
Joseph Frazier cecf0657a5 Re-add EditorConfig support (undo #3213) (#3255)
* Revert "Revert "Respect EditorConfig settings" (#3213)"

This reverts commit d2241fc0d5.

* Comment out EditorConfig docs

See https://github.com/prettier/prettier/pull/3213#issuecomment-343009769

* editorconfig: Support `indent_size = 0`

See https://github.com/prettier/prettier/pull/2760#discussion_r137447715
and https://github.com/josephfrazier/editorconfig-to-prettier/commit/c38b84c42a2e022067c104c494298a8c9533e7a7

* Revert "Comment out EditorConfig docs"

This reverts commit ddfa529c55cac4853a1e76e00c8b5e3ef158c01f.

* Mark EditorConfig functionality as v1.9.0+

See https://github.com/prettier/prettier/pull/3255#discussion_r150432508

* editorconfig: Upgrade editorconfig-to-prettier to 0.0.4

* editorconfig: Only enable for CLI, by default

https://github.com/prettier/prettier/pull/3255#issuecomment-348420546

* editorconfig: Add tests confirming that editorconfig is ignored by default in the API

https://github.com/prettier/prettier/pull/3255#issuecomment-348420546

* editorconfig: Add/fix CLI option parsing

* editorconfig: Move docs from configuration.md to options.md

* editorconfig: Add `oppositeDescription` to show docs for `--no-editorconfig`

Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154542792

* editorconfig: Update test snapshots

* editorconfig: Remove unnecessary options parsing code

Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154544560

* editorconfig: Move docs from options.md to api.md and cli.md

Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154545979

* resolveConfig: return null if both .prettierrc and .editorconfig are missing

Addresses https://github.com/prettier/prettier/pull/3255#discussion_r154574613

* Don't add now-failing tests

The way these tests work, both `tests_integration/cli/config/.prettierrc`
and `.prettierrc` apply to `tests_integration/cli/config/editorconfig/file.shouldnotexist`,
so the test wouldn't work even on master. Here's a way to confirm that:

```js
const path = require('path')
const assert = require('assert')
const prettier = require('./')

const file = './tests_integration/cli/config/editorconfig/file.shouldnotexist'
console.log(prettier.resolveConfig.sync(file))
assert(prettier.resolveConfig.sync(file) === null)
```
2017-12-05 09:28:27 +11:00
Ika 76efb33e75 chore: setup markdown formatting (#3224)
* chore(deps): upgrade prettier to v1.8.2

* chore: setup lint-docs script

* docs: add `<!-- prettier-ignore -->`s

* docs: format docs

* Revert "docs: format docs"

This reverts commit 6dba903987dddc498cb589ca311905f25b6aee53.

* chore(prettierrc): set `--no-prose-wrap`

* docs: format docs

* Revert "docs: format docs"

This reverts commit 139bd744b6921916be8fac4fa3bab83bae5d12df.

* docs: tweak

* docs: format docs

* chore: rename .prettierrc

* chore: rename back to .prettierrc

* chore: split out third-party

* refactor: fix linting

* chore: do not split out third-party on website
2017-11-22 22:27:40 +11:00
Ika 9652ad75f8 docs(website): fix link (#3206) 2017-11-09 00:49:39 +08:00
Lucas Azzola 84adbff232 Upgrade docusaurus to beta.10 (#3166)
* Upgrade docusaurus to beta.10

* Fixes for highlightjs

* Load github buttons script
2017-11-07 20:47:21 +11:00
Lucas Azzola 71a5533c4e Move all docs to website (#3139)
* Sync README -> docs/options.md

* Sync README -> docs/*.md

* Misc fixups

* Remove markdown-toc

* Remove insert-pragma from ToC

* Never again!

* Move all docs to ./docs

* Remove yarn toc

* Fix inter-doc links

* Fix links in footer

* Clean up README.md

* Add basic description to README.md

* Use flat badges

* Move editor guides to website

* Improve prettier-ignore docs

* Fixup bad find/replace

* Add JSON to README

* Fix custom parser API link

* Fixup GitHub centering, add downloads badge

* Add 1.8 docs

* docs(website): mention markdown on homepage (#1)

* Add intro

* Add watching-files.md

* Fix markdown syntax highlighting

* Switch back to .md links
2017-11-07 14:39:07 +11:00