Commit Graph

1363 Commits (c1874c70ead7a4193e4b83506c58120a7552c9c9)

Author SHA1 Message Date
Evilebot Tnawi c1874c70ea refactor(cli): simplify ignore logic (#2455) 2017-07-12 00:36:16 +10:00
Blaine Kasten 438d5f0fe3 Add Hudl as a Prettier User (#2454)
* Add Hudl as a Prettier User

* Add Hudl logo
2017-07-12 00:16:01 +10:00
Lucas Azzola 1c806f81b2 Rename --resolve-config to --find-config-path (#2453) 2017-07-11 23:57:26 +10:00
Evilebot Tnawi 469059dc20 CLI: Support .ignore files (#2412)
Closes #2294
2017-07-11 23:33:46 +10:00
Lucas Azzola 34b0709bf0 Add documentation for configuration (#2452)
* Add documentation for configuration files

* Add CLI docs for configuration

* Support --no-config
2017-07-11 14:21:29 +02:00
Lucas Azzola 3136907a15 Expose clearCache function (#2451) 2017-07-11 20:40:51 +10:00
Lucas Azzola 25a5e3ffe3 Fix ignore unknown --no-semi, fixes #2448 (#2450) 2017-07-11 19:52:47 +10:00
James Henry ee822f99b9 Update tsep and add test for destructuring assignment (#2443)
Fixes #2229
2017-07-11 09:11:18 +10:00
Zac Colley b201c953f2 Make "print width" documentation clearer (#2383) [skip ci]
* Update print width documentation

* Update README.md

* Update README.md

Tried to improve first two sentences.
Moved explanation above table.

* Improve print width based on feedback

* Update README.md

* Update print width explanation
2017-07-11 00:07:32 +10:00
Lucas Azzola b25935d7a3 TypeScript: allow type assertions to hug (#2439)
* TypeScript: allow type assertions to hug, fixes #2437

* Update snapshots
2017-07-10 22:37:43 +10:00
Lucas Azzola dcccfed366 Implement cosmiconfig for workspace configuration (#2434)
* Implement cosmiconfig

* Add resolveOptions API and extname support

* Add --resolve-config and --config, rename resolveOptions to resolveConfig

* Move color to top-level CLI options

* Fix unknown param warning

* Change from {} to null when no config is found

* Change override API to emulate eslint

* Add test for eslint-style overrides

* Delete overrides from resolveConfig
2017-07-10 22:26:36 +10:00
Daniel Lo Nigro 3728749d92 Clean up "not needed anymore" sentence in README (#2435)
* "not needed anymore" → "redundant"

* Update based on feedback
2017-07-08 17:13:31 -04:00
Joseph Frazier 1e5ae50eba Update prettier_d description to mention configuration files 2017-07-08 15:10:22 -04:00
Joseph Frazier 0fb332b2f9 lint: Add yoda rule with range exception (#2433)
This required a small refactoring, but the code is less nested as a result.
See discussion at https://github.com/prettier/prettier/pull/2401#discussion_r125750068

http://eslint.org/docs/rules/yoda#exceptrange
2017-07-09 00:53:00 +10:00
Simen Bekkhus 1b4846b67d Format prettier with newer prettier (#2431) 2017-07-08 14:07:39 +02:00
Simen Bekkhus 3e184d8f37 Upgrade chalk (#2432) 2017-07-08 14:07:03 +02:00
Lucas Azzola 073a02bf1f Add missing $ in bash script 2017-07-08 17:48:21 +10:00
Lucas Azzola 324fc86618 Sync usage.md from main README 2017-07-08 17:45:52 +10:00
Lucas Azzola 4a320a9332 Add supervisory parens for bitwise operations (#2429)
* Add supervisory parens for bitwise operations, fixes #2424

* Flatten x | y | z
2017-07-08 17:31:28 +10:00
Lucas Azzola 7e96e01fba Add more supervisory parens, closes #187 (#2423) 2017-07-07 15:57:17 +02:00
Lucas Azzola 8bbbc3a6f3 Remove parens for type assertions in binary expressions, fixes #2416 (#2419) 2017-07-07 13:02:43 +02:00
Anthony Sottile 19cd7d3227 Add pre-commit metadata directly to prettier (#2414) 2017-07-06 20:13:52 +02:00
Lucas Azzola 82b80b3c79 Trim whitespace in descendant combinator, fixes #2410 (#2411)
* Trim whitespace in descendant combinator, fixes #2410

* Permit whitespace changes in clean-ast.js
2017-07-06 13:55:34 +02:00
Dan Wang 86c88ff278 Print TypeParameter even when unary function type (#2406) 2017-07-06 19:13:30 +10:00
Kent C. Dodds 7c4a8d07a0 Add PayPal to prettier users (#2403)
* add PayPal as a prettier user

* add paypal logo
2017-07-06 08:46:38 +10:00
Joseph Frazier 9290dd8803 Add some standardjs-esque eslint rules (#2401)
I experimented with simplifying the eslint config to just use eslint-config-standard and eslint-config-prettier. There were too many errors to make it a quick change, but I did find a few useful rules we could adopt instead.

---

* lint: Remove useless return statements

http://eslint.org/docs/rules/no-useless-return

* lint: Split declarations into multiple statements

http://eslint.org/docs/rules/one-var

* lint: Remove unneeded ternary operators

http://eslint.org/docs/rules/no-unneeded-ternary

* lint: Require symbol descriptions

http://eslint.org/docs/rules/symbol-description

* lint: Disallow declarations in nested blocks

http://eslint.org/docs/rules/no-inner-declarations

* lint: Disallow yoda conditions

http://eslint.org/docs/rules/yoda

* Revert "lint: Disallow yoda conditions"

See discussion at https://github.com/prettier/prettier/pull/2401#discussion_r125750068

This reverts commit f3b568d5bd48a742460cb0f805d1be38d8f61a40.
2017-07-05 16:54:46 -04:00
Joseph Frazier 16bc297572 Fix --debug-print-doc (#2400)
* Add test of --debug-print-doc

See https://github.com/prettier/prettier/issues/2396

* Pass test of --debug-print-doc

See https://github.com/prettier/prettier/issues/2396
2017-07-05 18:25:51 +02:00
Joseph Frazier 8fcd667200 Update yarn.lock 2017-07-05 10:44:14 -04:00
Kevin Gibbons f490dba609 switch a use of .map to .each (#2395) 2017-07-05 02:03:18 +02:00
Kevin Gibbons 28b3a4b925 Break sequence expressions (#2388)
* Add SequenceExpression tests

* Clean up printing of SequenceExpressions

* Remove test and lint
2017-07-04 22:50:57 +02:00
Joseph Frazier e82a774568 Make --list-different to work with --stdin (#2393)
* Add test for `prettier --stdin --list-different`

See https://github.com/prettier/prettier/issues/2389

* Pass test for `prettier --stdin --list-different`

This fixes https://github.com/prettier/prettier/issues/2389

* Deduplicate --list-different handling

* Exit-early to reduce nesting in listDifferent()

* Simplify condition in listDifferent()
2017-07-04 14:41:46 -04:00
Evilebot Tnawi a0cadad222 feat(cli): support multiple patterns with ignore pattern (#2356) 2017-07-04 17:55:06 +02:00
Joseph Frazier ead0bc0a9c Use eslint-plugin-import to detect devDependencies used in production (#2387)
This solves the same problem as https://github.com/prettier/prettier/pull/2386,
but at lint-time, rather than only on Travis.
2017-07-04 17:53:45 +02:00
Lucas Azzola 067b49fbd7 Re-enable automatic deployment 2017-07-04 09:22:42 +10:00
Lucas Azzola bf2bcbcb1a Create CNAME 2017-07-04 09:19:39 +10:00
Kushagra Gour 0b41ecb55b docs(README): update bash script to mimic lint-stage behavior (#2384) 2017-07-03 14:38:43 -07:00
Joseph Frazier 782835de75 Move strip-bom from devDependencies to dependencies 2017-07-03 17:35:28 -04:00
Dara Hak 185fc608d3 Fix typo on website's tag line 2017-07-03 22:55:10 +02: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
Karl O'Keeffe 06ae32ddce Ensure there is a line break after leading JSX white space (#2348) 2017-07-03 12:43:10 +02:00
Lucas Azzola c3346b0363 Disable automatic website deployment [ci skip] 2017-07-02 11:13:58 +10:00
Lucas Azzola 770ea21c29 Only deploy from node stable 2017-07-02 10:56:34 +10:00
Lucas Azzola ed4943dbec Set CI_PULL_REQUEST 2017-07-02 10:45:57 +10:00
Lucas Azzola d741a47e8f Set env variables to mock CircleCI [skip ci] (#2376) 2017-07-02 10:42:25 +10: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
Lucas Azzola 6f9824778d Strip BOM before parsing, fixes #2362 (#2373) 2017-07-01 18:11:13 +02:00
Mitermayer Reis 7cf46acb9d Fix vim readme broken link (#2368)
* fixing-vim-readme-broken-link - Fixing broken link
2017-07-01 15:47:15 +10:00
Jarda Snajdr 3f6a232cea Fix indentation of a do-while condition (#2359)
Fixes #2353. Use the same printing code for both `WhileStatement` and `DoWhileStatement`.
Fix calculation of `isInsideParenthesis` when printing a `LogicalExpression`. There is
no such thing as `DoStatement` -- it should be `DoWhileStatement`.
2017-06-29 15:46:25 -07:00