Commit Graph

210 Commits (master)

Author SHA1 Message Date
Ika f94f63b040
chore: update azure pipelines (#5611)
- upload coverage report (codecov) from azure pipelines
- only build `dist` once (`dist` is now shared between production jobs)
- run production tests on macOS (not sure why but it's faster than others)
- extract shareable steps
- remove travis/circle
2018-12-18 08:16:32 +08:00
Danny McCormick d53dcefaae Replace Appveyor badge with Azure Pipelines badge (#5492) 2018-11-15 19:35:51 -05:00
Ika fa40f2ddd3
docs(blog): 1.15 release (#5296) 2018-11-07 09:09:04 +08:00
Jed Fox e9cde7d8d4
Adjust badges on the README (#5189)
* Fix spacing around badges

* Switch the npm downloads badge to weekly

I switched to a weekly statistic since it feels more immediate and “9M/m” is somewhat confusing.
2018-10-05 14:06:53 -04:00
Lucas Azzola cdf28894a4
Update AppVeyor badge to organization (#4828) 2018-07-11 01:12:27 +10:00
Ika dcf44ffbdc
feat: support YAML (#4563)
* feat: support YAML

* fix: do not indent sequence in mappingValue

* docs: add yaml to index.md

* fix: reduce `SyntaxError: Node#parse consumed no characters`

* chore: remove old-build and new-worker.js

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* fix: no space after `<<`

* fix: add yaml to standalone test

* test: add tests

* fix: next empty line in flow collection

* fix: tabs are not allowed
http://yaml.org/spec/1.2/spec.html#space/indentation/

* fix: update parser

* feat: rewrite the mappingItem logic
* feat: indent sequence in mapping
* feat(doc): add ifBreak#groupId and group#id

* chore: fix node 4

* chore: add tools_yaml.svg

* chore: remove resolved TODO

* refactor: remove unnecessary workaround

* chore(worker): importScriptOnce

* chore(build): rename with babelPlugins

* make it rollup compatible

* feat: support singleQuote

* refactor
2018-06-21 10:29:42 +08:00
Lucas Azzola abef84684d
Add AppVeyor and Blazing to Badges (#4628) 2018-06-04 14:16:06 +10:00
Jed Fox fa079c33ff
Badge maintenance (#4500)
* Add CircleCI badge to readme

* Improve badge alt text

* Remove unnecessary space

* Disambiguate the two build|passing status badges
2018-05-18 09:46:50 -04:00
Jed Fox 114895a8a2 Link to the plugin docs in the README (#3762) 2018-01-18 08:54:36 +11:00
Ika 445b4afc73 docs(readme): travis master badge (#3666) 2018-01-07 20:06:25 +11:00
Lucas Azzola 3a9b25b8bc
Add JSX to supported language list (#3579) 2017-12-27 00:20:10 +11:00
Christopher Chedeau c40b061b80
[vue] Introduce proper support for Vue Single File Components (SFC) (#3563)
There's a lot of demand for vue sfc (#2097). This introduces partial support for them: all the html is printed as is, except for the script and style tags which are printed using prettier. I believe that this should cover a lot of the use cases while being simple to support and if we want we can extend to more in the future.

I copy pasted the html parser used by vue (it's just a single 400 lines file) so that we don't run the chancesof conflicts. I'm also very conservative: I only print the style and script at the top level and for the lang attributes we support.

I expect this to be landable as is and provide value, review welcome :)
2017-12-25 01:15:33 +01:00
ntmonson b8a715a8de Changed the alt attribute for monthly downloads (#3553)
Updated the alt attribute to reflect the image it is attached to.
2017-12-22 12:58:17 +11:00
Lucas Azzola 8be1fbb58a
Switch to light logo in README (#3507) 2017-12-18 00:24:19 +11:00
Mae Capozzi f804002579 Update grammar in the README.md (#3485) 2017-12-14 17:49:42 +11:00
Lipis 2032b70918 Add Twitter social button (#3288)
* Twitter Badges

* Update README.md

* Update README.md

* Update Footer.js

* Update README.md

* Update Footer.js
2017-11-29 09:50:02 -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
Jeff Bowen 713497cd7d Update README to point to API doc (#3195)
https://prettier.io/docs/en/usage-options.html `404`s
2017-11-07 13:08:21 -07: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
Tim Neutkens b751d49572 Zeit -> ZEIT 2017-11-06 16:40:23 +01:00
Lucas Azzola e436adae04
Implement getSupportInfo() and use it for inference (#3033)
* Implement getSupportInfo() and use it for inference

* Add comment with source of languages.yml

* Fix build, pin semver

* Simplify test snapshots

* Remove stray 'type' property

* Fix parser being overwritten

* Don't infer unreleased parser from extension

* Add CLI and docs for support info
2017-11-03 18:06:25 +11:00
<script>alert(document.domain+' unicode best-fit coersion')</script> 4a8d52cf35 Add watching for changes to README (#3126)
* Add watching for changes to README

* Update TOC
2017-10-31 14:28:58 -06:00
Lucas Azzola 4043ea655e Add prettier-tslint and stylelint-config-prettier to related projects (#3078) 2017-10-21 17:50:18 +11:00
Lucas Duailibe 4b4a15b842 doc(resolveConfig): document options.config (#3050) 2017-10-18 14:16:02 +11:00
Alan Hogan db0f2ee428 Change badge to say “formatted” (#3000)
* Change badge to say “formatted”

“Styled” sounds like a CSS or CSS-like thing to me — Prettier is a code formatter

* Update code too

* Update the badge at the top too

* Reword badge to “code style: prettier”
2017-10-13 15:03:06 +11:00
Ika abc3b12c5e docs(readme): fix description for `filePath` in `prettier.resolveConfig` (#3007) 2017-10-11 15:57:57 +11:00
Lipis c247026346 LESS -> Less (#2995)
* LESS -> Less

They are switched to Less instead of LESS

* Update README.md
2017-10-09 13:19:12 +02:00
Joseph Frazier 5c86730ec9 Add missing "Require pragma" to Table of Contents (#2993)
This was done with `yarn toc`. Maybe we should add a CI step that runs
`yarn toc` and fails if the README changes?
2017-10-08 20:23:22 -04: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
Simon Lydell 808dc4e7e3 Add missing quote in README.md
Fixes #2935.
2017-09-30 10:00:47 +02:00
Lucas Azzola ae21d60386 Recommend pinning prettier version (#2920)
* Recommend pinning prettier version

* Change from -E to --exact/--save-exact
2017-09-28 14:34:32 +10:00
Stephen Scott c2bc33b3ad 1.7.1 2017-09-27 11:00:29 -06:00
Simon Lydell 68d1b56696 Comment out config file extensions docs until next release
See #2861.
2017-09-19 21:37:20 +02:00
Hugo Dias f6356ae94c chore: add prettier-stylelint to the related projects (#2859) 2017-09-19 20:23:06 +02:00
Nick Ribal 592f99fde6 Enable cosmiconfig rcExtensions (#2749)
* Enable cosmiconfig rcExtensions; add two tests

* Remove default value; make integration input files self descripting; update all integration snapshots

* Add engines field to package.json
2017-09-17 02:47:53 +10: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
Mitermayer Reis c59a82cbae Add CLI option '--config-precedence' (#2733)
Add CLI option '--config-precedence'
2017-09-05 08:56:23 +10:00
Maxime Thirouin 7eaf5c7cb7 Improve lint-staged setup example by adding more filetypes (#2746) 2017-09-04 17:42:26 +10:00
Ika 088aa71b07 feat(resolve-config): add `.sync()` method (#2722)
* feat(resolve-config): add `sync` option

* docs(readme): add `sync` option

* fix(clearCache):  always clear both

* chore(deps): switch to 3.0 branch

* feat: replace `sync` option with `.sync()`

* docs(readme): update `.sync()`
2017-09-01 20:17:07 +10:00
Levi Thomason 828a7b8f0d docs(readme): add and sort cli options (#2700)
* chore(build): auto generate toc

* docs(readme): add and sort cli options

* refactor(build): move toc to seperate task
2017-08-29 13:39:49 -07:00
Ika a44ef1fe8b Update README.md (#2690)
* docs(readme): fix option typo

* docs(readme): fix parameter representation
2017-08-29 16:05:59 +10:00
Lucas Azzola db4d7ac1db Un-comment config file documentation (#2669) 2017-08-28 18:27:04 +02:00
Ika 56ce8cf935 docs(readme): add tslint related projects (#2677) 2017-08-28 23:50:14 +10:00
Larry Rubin ab812e2db9 Clarifying JSX Brackets option (#2659)
Thought the setting wasn't working properly when it didn't apply to self closing elements, and was about to open an issue until I found out it's working as intended.
2017-08-24 19:29:23 -07:00
Simon Lydell cd9ad2c57c Clarify --trailing-comma a bit
Refs. #2655
2017-08-23 17:44:07 +02:00
Patrick Camacho daf8a44ccf Update README.md (#2638)
Add a link to a project I worked on to format code examples in Markdown files with Prettier
2017-08-18 19:50:16 -07:00
Luca dbe0ca6c26 Added rollup-plugin-prettier to Related Projects in README.md (#2616)
Added a link and description to rollup-plugin-prettier (https://github.com/mjeanroy/rollup-plugin-prettier) to the 'Related Projects' section
2017-08-12 21:27:16 +10: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