Alf Eaton
67ec3b2f05
Update instructions for File Watcher in WebStorm ( #3424 )
...
Re-use the instructions for setting the File Watcher program path in WebStorm when prettier is installed locally.
2017-12-06 13:35:56 -02:00
Maxime Thirouin
a9502f0ab7
Add "md" extension in "Pre-commit hook" documentation ( #3421 )
...
It's nice to have all extensions so we can easily copy paste :)
2017-12-06 20:34:58 +11:00
Lipis
20373d6fee
Prettify style in playground and code block languages ( #3419 )
2017-12-05 19:48:11 -07:00
Lucas Azzola
c7c1d2e7a4
Upgrade Prettier to Prettier 1.9 ( #3395 )
...
* Upgrade to prettier@1.9.0
* Run eslint --fix
* Run prettylint --fix
* Fix playground with editorconfig script
2017-12-05 08:14:03 -02: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 c38b84c42a
* 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
Marko Schulz
a05811f8eb
Fix link ( #3392 )
2017-12-05 08:55:32 +11:00
Ika
073c0b16d8
feat(markdown): add `proseWrap: "preserve"` option ( #3340 )
...
* test: add test case
* feat(markdown): add `proseWrap: "preserve"` option
* test: add tests
* docs(options): update `proseWrap`
* feat(markdown): change default to `proseWrap: "preserve"`
BREAKING CHANGE
* docs(options): update `proseWrap`
* test: specify option explicitly
* Fix lint after merge
* Fix error after merge
2017-12-02 09:48:40 +11:00
Ika
23c306c8a0
docs(index): fix links on GitHub ( #3367 )
2017-12-01 10:59:17 +08:00
Ryan Zimmerman
d6bb6edeae
Add note about proseWrap option under printWidth for clarity ( #3364 )
2017-11-30 17:54:54 -03:00
Sylvan Mably
562b4e19d1
Fix broken footnote links ( #3353 )
2017-11-29 18:29:32 -03:00
Ika
ac3f74e7a3
docs(options): add available version for `arrow-parens` ( #3339 )
2017-11-29 00:20:26 +08:00
Suchipi Izumi
6abdd2c6b7
PR feedback
2017-11-27 22:27:34 -07:00
Stephen Scott
9a1e408a3f
Add option and specs (no implementation yet)
...
These new snapshots are from https://github.com/prettier/prettier/pull/2676
2017-11-27 22:26:58 -07: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
Nathaniel Furniss
cbed0f487f
fix config doc typo ( #3298 )
2017-11-20 18:26:33 -02:00
Ika
b6b601815c
docs(webstorm): improve image urls ( #3261 )
2017-11-14 18:37:15 +11:00
Mark Yu
9f7b4df23f
Fix broken Webstorm image links. ( #3260 )
2017-11-14 10:47:04 +08:00
David Glasser
217992fb3a
docs: eslint config is orthogonal to plugin ( #3229 )
2017-11-10 03:16:11 -02:00
Ika
c37e7fae2a
docs(options): add note for available version ( #3217 )
2017-11-09 13:39:07 +08:00
Mitermayer Reis
813d9b93eb
Fix typos ( #3212 )
...
* Adding --stdin-filepath option in order to enable filetype inference from
stdin
* Fixing typo on the documentation
* Fixing typos - fixing some typos
* Restoring static lib files back since they are artifacts
2017-11-09 11:44:24 +11:00
Lucas Azzola
d2241fc0d5
Revert "Respect EditorConfig settings" ( #3213 )
...
* Revert "Respect EditorConfig settings (#2760 )"
This reverts commit 8f58ca0f48
.
2017-11-09 11:38:58 +11:00
Joseph Frazier
8f58ca0f48
Respect EditorConfig settings ( #2760 )
...
This fixes https://github.com/prettier/prettier/issues/42 .
It adds support for .editorconfig's `indent_style`, `indent_size`, `tab_width`,
and `max_line_length` properties.
It doesn't support the `end_of_line` property as described in
https://github.com/prettier/prettier/issues/42#issuecomment-327073326 ,
but that could be added later. The same goes for `quote_type`
(https://github.com/prettier/prettier-atom/issues/293#issue-267288335 ).
* Make test .prettierrc not set config for all file extensions
This makes it easier to keep tests isolated.
2017-11-08 14:30:28 -05:00
Ika
9652ad75f8
docs(website): fix link ( #3206 )
2017-11-09 00:49:39 +08:00
Jamel Toms
dc9d628874
Fix broken link to configuration page ( #3205 )
2017-11-09 00:43:30 +08:00
Lucas Azzola
98eb2c98b7
Add proseWrap docs ( #3201 )
2017-11-08 22:57:08 +11: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
Robin Malfait
d4768e1336
Update editors.md ( #3144 )
2017-11-04 22:30:03 +01:00
Benny Neugebauer
fa62a438a5
docs: fix table for `insertPragma` ( #3010 )
...
* docs: fix table for `insertPragma`
* Update options.md
* Update options.md
2017-10-11 22:30:03 +11:00
Jake
50f3e646c7
Add option to insert @format to first docblock if absent ( #2865 )
...
* Add option to insert @format pragma if absent
prependPragma --> insertPragma
add tst dir, move stripBom, add to README, update snapshots
remove noise from test + update snapshots
use jest@test new functions, update docs, rerun snapshots
fix accidental upgrade to jest@test
update jest-docblock again to latest with strip()
updated snapshot
* updated snapshots
* revert jest dep change
* apply a trim to parsed comments
* remove empty object
* Revert "apply a trim to parsed comments"
This reverts commit 467f71ce5f4b4f8a1b5c4474ee0484bc96c92141.
* rerun snapshots with proper jest version
* pin jest-docblock to latest @test release
* comment out docs for new feature from readme
* remove leading newlines
* ensure blank line between docblock and rest of file
* remove backtick string
2017-10-06 19:37:14 +11:00
ikatyang
7d7fb36499
docs: `requirePragma: <bool>`
2017-09-13 21:43:57 -06:00
Ika
71f5d185a7
docs(readme): port requirePragma docs to README.md ( #2812 )
...
* fix default value
2017-09-14 11:26:43 +08:00
Will Binns-Smith
d5e5d66407
Add option to require @prettier or @format pragma ( #2772 )
...
* Add option to require @prettier or @format pragma
Fixes #2397 .
Inspired by `eslint-plugin-prettier` and the discussion in #2397 , this
implements requiring a special comment pragma to be present in a file's
first comment in order to be formatted.
This will help large codebases gradually transition to prettier over
time without tons of churn or large code reviews.
I implemented this as a standard prettier "option", not just a typical
`argv` flag, as it is relevant in both the cli and the api. This way it
can be provided programmatically, on the command line, or standardized
in a prettierrc file so like the style options, every user can use this
setting consistently and only apply prettier to relevant files, no
mattier their editor integration.
This requires the pragma begin with `@` (in fact it's inserted if the
user doesn't provide it). Currently the usage implies it must be
"prettier" or "format", but it can technically be any value other than
"none", which is similar to the `trailingCommas` option.
cc @vjeux
* Don't quote anything in runPrettier; this is usually handled by a shell
* Make --require-pragma a boolean option
* Use jest-docblock to find pragmas without parsing the ast
* Clarify docs
* includes -> indexOf
* Move test out of integration
2017-09-13 09:03:18 -07:00
Frank Li
dace9ecded
Update website setup to use latest version of Docusaurus ( #2614 )
...
* Update website to new docusaurus API
* Fix missing comma
* Fix link typo in users.json
* Update docusaurus to version 1.0.0-alpha.35
* Clean up siteConfig.js
2017-08-11 12:34:32 -07:00
Marko Schulz
7544006949
Purge usage of `.eslintrc` ( #2592 )
...
* .eslintrc -> .eslintrc.json
Because `.eslintrc` is deprecated.
* Purge second usage of .eslintrc
2017-08-07 19:03:27 +10:00
Adam Hawkins
781ba9580a
Fix variable name in git precommit example ( #2529 )
...
echo "jsfiles" will not work. The example references a variable, not a static string. This commit makes the example functionally correct.
2017-07-21 08:54:51 -07:00
Mitermayer Reis
38fdb6f851
Update vim-prettier location ( #2518 )
2017-07-20 11:06:54 +10:00
Lucas Azzola
324fc86618
Sync usage.md from main README
2017-07-08 17:45:52 +10:00
Lucas Azzola
461fb30181
Fix formatted with Marked
2017-07-03 22:13:09 +10:00
Lucas Azzola
65bbbaec58
Add content to website ( #2377 )
...
* Add content to website
* Fix linting error
* Cleanup, extract content to JSON files
2017-07-03 12:48:05 +02:00
Frank Li
80f38ce75b
Website ( #2241 )
...
* initial docusaurus set-up
* Delete why-prettier.md
* Update README.md
* Update Docusaurus structure
* Update package.json
* Update siteConfig.js
* Remove ~ files
* chore(website): update build script
* Add redirect script
* Get eslint working on website
* Fix to allow for baseUrl of '/'
* Update docusaurus version
* Update README.md
* Change redirect script to use baseUrl of '/'
* Fix index.js formatting
* Load redirect script
* General cleanup
* Add projects using prettier
* Update service worker to just scope to playground
* Reduce link repeatition
* Link "Try it out" button to /playground/
* Make header of playground approximately same as main site
* Remove .html from URLs (e.g. users.html -> users/)
* Link Gitter Chat
* Add circleci.yml
* Only run builds on master
* Do deployment using Travis
2017-07-02 10:14:24 +10:00
Lucas Azzola
6f32a40edd
Fix multiparser in website, fixes #2328 ( #2374 )
2017-07-01 18:14:21 +02:00
Christopher Chedeau
5db9407d78
1.5.2
2017-06-27 20:33:35 -07:00
Christopher Chedeau
adc71ef6ae
1.5.1
2017-06-27 13:42:31 -07:00
Christopher Chedeau
500cf98c06
1.5.0
2017-06-27 10:09:59 -07:00
Christopher Chedeau
6017ac13c7
Create CNAME
2017-06-27 07:43:54 -07:00
Lucas Azzola
eccb17495a
Website: speed up load time, enable service worker ( #2172 )
...
* feat(website): speed up website load 💥
* chore(package): fix bad merge
2017-06-18 20:25:27 +10:00
Lucas Azzola
40c41f232f
Website: usability improvements ( #2118 )
...
* feat(website): use worker thread for formatting
* Create index.html
Remove step=5
2017-06-13 09:20:13 -07:00
Lucas Azzola
4e4922b428
feat(website): revamp the website a bit ( #2113 )
2017-06-12 07:58:06 -07:00
Christopher Chedeau
4758f5a80d
1.4.4
...
Oops, I forgot to re-run the build scripts, this broke postcss
2017-06-07 16:38:05 -07:00