Simon Lydell
c198c33700
Merge pull request #2624 from lydell/css-strings
...
Normalize quotes in CSS like in JS
2017-08-15 16:07:06 +02:00
Lucas Azzola
8a45377760
Load babylon parser for json formatting ( #2620 )
2017-08-15 21:54:10 +10:00
Simon Lydell
b286ed171e
Fix AST_COMPARE for CSS strings
2017-08-15 07:58:19 +02:00
Simon Lydell
4979f58c15
Normalize quotes in CSS like in JS
2017-08-14 09:14:57 +02:00
Lucas Azzola
0b9fbf940f
Support styled.div.attr({})`...` ( #2619 )
2017-08-13 13:52:24 +10:00
Lucas Azzola
ec85cf0f0a
Do not accept declare on previous line ( #2618 )
2017-08-13 13:47:48 +10: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
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
Alex Ilyaev
d8b5fe2de9
Docs: Webstorm file watcher screenshot ( #2603 )
...
* Docs: Webstorm file watcher screenshot
* Docs: webstorm file-watcher - Relative image paths
2017-08-10 08:40:00 +10:00
Dmitry Korlas
f738a214d3
fix cut off line-break in scss between comment and followed @else ( #2600 )
...
* fix cut off line-break in scss between comment and followed @else
* fix cut off line-break in scss between comment and followed @else (CR fixes)
2017-08-08 12:07:47 +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
Lucas Azzola
e378f5e9ba
Implement proposal-optional-chaining ( #2572 )
...
* Implement proposal-optional-chaining
Closes #2568
* Refactor optional token printing
2017-08-03 17:38:02 +10:00
Esben Petersen
fea408ff5c
fix link to VS Code extension ( #2576 )
2017-08-02 08:03:13 -06:00
Lucas Azzola
8159666cad
Clarify that `tests/flow` is the flow test suite
2017-08-02 09:41:42 +10:00
Brian Ng
1701f4a0d5
Print declare for TSInterfaceDeclaration ( #2574 )
2017-08-02 00:00:01 +10:00
Brian Ng
4c335cae0a
Add support for printing optional catch binding ( #2570 )
2017-07-31 14:40:14 -06:00
Einar Löve
2560a51f7d
Update README.md to add a notice about using lint-staged ( #2565 )
...
* Update README.md to add a notice about a limitation using lint-staged
The lint-staged example under pre-commit hooks has a limitation where if you use the [Github Desktop](https://desktop.github.com/ ) app to commit specific lines, this approach will stage the whole file after regardless. See this [issue](https://github.com/okonet/lint-staged/issues/62 ) for more info.
* Add back removed empty line
* Remove Github Desktop app reference
2017-07-31 23:23:12 +10:00
Lucas Azzola
8ede13267e
Remove .npmignore and update .ignore ( #2560 )
2017-07-31 08:47:00 +10:00
Lucas Azzola
58edd0d3f3
Keep parens around FunctionTypeAnnotation inside ArrayTypeAnnotation ( #2561 )
...
Without this, this:
const actionArray: (() => void)[] = [];
is formatted as:
const actionArray: () => void[] = [];
Fixes #2559
2017-07-30 00:50:38 +10:00
Lucas Azzola
af6b020f7e
Support styled-components with existing component ( #2552 )
...
Supports the syntax:
```js
styled(ExistingComponent)`
css: property;
`;
```
Fixes #2545
2017-07-28 19:04:17 +10:00
Lucas Azzola
3eed1933e1
Don't pass config path through to cosmiconfig ( #2547 )
2017-07-27 21:59:57 +10:00
Lucas Azzola
675688c814
Set travis dist to "precise"
2017-07-26 19:41:07 +10:00
Lucas Azzola
143480be30
Remove "install" from yarn
2017-07-26 19:27:21 +10:00
Brian Ng
24e1aec306
Add support for flow opaque types ( #2543 )
2017-07-25 19:47:54 -07:00
Brian Ng
cf6258ab4f
Re-enable flow-jsx-func-attr test ( #2541 )
2017-07-26 09:07:37 +10:00
Brian Ng
60f5836b37
Add support for flow export type star ( #2542 )
2017-07-26 09:00:20 +10:00
Yang Su
26842e4d69
Handle closure compiler type cast syntax correctly ( #2484 )
...
* Handle closure compiler type cast syntax correctly
Fixes https://github.com/prettier/prettier/issues/1445
* Move closure type cast detection to needParens in fast-path.js
* every => some and added additional check for leading comment
2017-07-25 11:21:25 +10:00
Lucas Azzola
a666a29aa3
Print semi after DeclareFunction, fixes #2534 ( #2536 )
2017-07-24 21:55:16 +10:00
Joseph Frazier
a78d1389f6
Use babylon.parseExpression for JSON ( #2476 )
...
* Add comments showing parser arguments
Since this is how they are invoked, the comments make it easier to maintain.
* Use babylon.parseExpression for JSON
See https://github.com/prettier/prettier/issues/2378#issuecomment-314600778
Note that this doesn't yet print comments:
echo '{/*comment*/"K":"V"}' | ./bin/prettier.js --parser json
* Remove parser-json.js
This reduces duplicate code in the built package.
See https://github.com/prettier/prettier/pull/2476#pullrequestreview-50181398
* Add test with block comment in JSON
* Fix test with block comment in JSON
* Add test with line comment in JSON
* Don't build now-redundant parser-json.js
2017-07-24 11:43:49 +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
Lucas Azzola
4a0e9475df
Print parens around type assertion as LHS in assignment, fixes #2521 ( #2525 )
2017-07-20 23:16:15 +10:00
James Henry
1c9962df67
Update tsep and account for TSTypeReference change ( #2520 )
...
* Update tsep and account for TSTypeReference change
* Check TSTypeReference in shouldHugType
2017-07-20 12:54:43 +02:00
Lucas Azzola
ffbdff4bc2
prettier
2017-07-20 14:26:55 +10:00
Lucas Azzola
8d9022db54
Fix /users/ link
2017-07-20 13:26:54 +10:00
Mitermayer Reis
38fdb6f851
Update vim-prettier location ( #2518 )
2017-07-20 11:06:54 +10:00
Jared Anderson
2d97f0d0cc
Add graphql to parser options in help output ( #2519 )
2017-07-19 18:33:39 +02:00
Lucas Azzola
e8425a4899
Comment out configuration file docs
2017-07-19 08:53:44 +10:00
Lucas Azzola
02639da9a9
Improve coverage and remove some dead code ( #2504 )
...
* Improve test coverage
* Clean up some un-used code
* Lower patch requirements on codecov
2017-07-17 23:31:42 +10:00
Lucas Azzola
d62d1c5c56
Preserve parens with keyof, enforce parens with arrows with type params ( #2503 )
...
* Force parens around argument of simple arrow function if type annotation is present
* Preserve parens inside keyof operator
2017-07-17 13:32:33 +02:00
Lucas Azzola
b3a4785cec
Add Codecov badge to README
2017-07-17 00:03:51 +10:00
Lucas Azzola
71b2004391
Cleanup unused nodes, and turn on importMeta babylon plugin ( #2498 )
...
* Cleanup unused AST nodes
* Add tests for JSXNamespacedName
* Turn on importMeta babylon plugin
* Add tests for DeclareTypeAlias
* Add back TS*Keyword nodes, fix TS optional destructuring
2017-07-16 23:59:49 +10:00
Lucas Azzola
b7fa01af17
Enable code coverage in CI ( #2497 )
...
* Enable code coverage in CI
* Disable codecov comment
* Ignore some statements from coverage reports
2017-07-16 21:49:37 +10:00
Lucas Azzola
188c466cd5
Don't call shouldHugType for function arguments, fixes #2458 ( #2496 )
2017-07-16 11:53:01 +02:00
Lucas Azzola
028d9e0ea7
Improve bind expression formatting ( #2493 )
...
* Improve bind expression formatting, fixes #1400
* Fix parenthesis with bind expressions, fixes #1446
2017-07-16 11:47:06 +02:00
Lucas Azzola
00d9aa208e
Trim trailing whitespace from comments, closes #2422 ( #2494 )
2017-07-16 17:45:27 +10:00
Lucas Azzola
123d350524
Don't mask TypeScript errors without position information, #2361 ( #2495 )
2017-07-16 16:38:13 +10:00
Lucas Azzola
bac9658687
Flatten x & y & z, and x ^ y ^ z, fixes #2445 ( #2490 )
2017-07-15 12:54:33 +02:00
Lucas Azzola
b9b3da6ee9
Implement prettier-ignore inside JSX ( #2487 )
...
* Implement prettier-ignore inside JSX, closes #2467
* Re-enable babylon and typescript verification
2017-07-15 20:21:43 +10:00
Lucas Azzola
acab856b96
Integrate 1.5.3 hotfix ( #2489 )
2017-07-15 20:16:41 +10:00
Alex Rattray
f0e207280a
Merge pull request #2398 from suchipi/improve_jsx_formatting
...
Improve JSX Formatting
2017-07-13 23:46:06 -07:00