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
Lucas Azzola
11a7b8d308
Fix printing of comments between decorators and method names ( #2906 )
2017-09-28 00:03:11 +10:00
Lucas Azzola
f77e471b0c
Upgrade to ts2.5.3-insiders ( #2842 )
2017-09-27 15:43:17 +10:00
Lucas Azzola
daef144102
Support fit(), xit(), it.only(), etc ( #2900 )
2017-09-26 23:12:38 +10:00
Lucas Azzola
48899289da
Upgrade cosmiconfig to v3, remove hardcoded combinatoric problem ( #2843 )
...
* Upgrade cosmiconfig to v3, remove hardcoded combinatoric problem
* Fix indendation change from 1.7
* Ensure default value for useCache is true
* Pin mem version
2017-09-16 20:24:08 +10:00
Lucas Azzola
3f74c45b91
Support graphql(schema, query) ( #2781 )
2017-09-11 20:18:11 +02:00
Lucas Azzola
87503e5ef7
Refactor error handling ( #2750 )
2017-09-06 09:52:59 +10:00
Lucas Azzola
2686b15b91
Update URL to prettier-vscode
2017-08-30 22:53:53 +10:00
Lucas Azzola
db4d7ac1db
Un-comment config file documentation ( #2669 )
2017-08-28 18:27:04 +02:00
Lucas Azzola
2e828de76f
Print 3 or more chained calls on multiple lines ( #2673 )
2017-08-27 09:44:44 -07:00
Lucas Azzola
1e2da6c727
Support TypeScript 2.5 RC ( #2672 )
2017-08-26 05:36:50 -07:00
Lucas Azzola
dd84559991
Merge computed MemberExpression in member chain ( #2670 )
2017-08-26 05:35:05 -07:00
Lucas Azzola
8a45377760
Load babylon parser for json formatting ( #2620 )
2017-08-15 21:54:10 +10: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
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
Lucas Azzola
8159666cad
Clarify that tests/flow is the flow test suite
2017-08-02 09:41:42 +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
Lucas Azzola
a666a29aa3
Print semi after DeclareFunction, fixes #2534 ( #2536 )
2017-07-24 21:55:16 +10:00
Lucas Azzola
4a0e9475df
Print parens around type assertion as LHS in assignment, fixes #2521 ( #2525 )
2017-07-20 23:16:15 +10: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
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
Lucas Azzola
41318937d2
Add link to JSON schema in README
2017-07-12 21:29:57 +10:00
Lucas Azzola
1c806f81b2
Rename --resolve-config to --find-config-path ( #2453 )
2017-07-11 23:57:26 +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
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
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
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
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
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
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
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
Lucas Azzola
968cc3cb2b
Delete fuzzer2.js
2017-06-29 08:52:14 +10:00
Lucas Azzola
678964b8de
fix(typescript): don't add namespace keyword to global declaration, fixes #2327 ( #2329 )
2017-06-28 07:53:10 -07:00
Lucas Azzola
5e51caca1b
Add GraphQL to README ( #2265 )
...
* Add GraphQL to README
* Add JSON to main list of languages
2017-06-27 10:18:22 -07:00
Lucas Azzola
b8af5e5241
Update URL in atom.md
2017-06-25 14:24:05 +10:00
Lucas Azzola
caa77fbfe8
Join range start and range end documentation
2017-06-25 12:44:18 +10:00
Lucas Azzola
438f5887e2
Add links to prettier's parsers
...
Since the parser API exposes the AST, it makes sense to point people towards the parsers we use so they can hack on them.
2017-06-25 12:27:49 +10:00
Lucas Azzola
b93191d4de
Explode the options table ( #2244 )
...
* Explode the options table
The options table in README was getting a bit unwieldy. This commit moves the options to a top-level section, and makes each setting hyperlink-able.
The `cursorOffset` setting has been moved from the list to the documentation for `formatWithCursor`.
* Fix typos/punctuation
* Fix --trailing-comma formatting
2017-06-24 07:52:34 -07:00
Lucas Azzola
d8be8be57a
Clean up API documentation
2017-06-24 18:13:02 +10:00
Lucas Azzola
3474056b36
fix(typescript): handle ObjectPattern instead of ObjectExpression inside BinaryExpression, fixes #2237 ( #2238 )
2017-06-23 07:53:42 -07:00
Lucas Azzola
b2d5366897
Remove apostrophe from JetBrains
2017-06-23 23:01:12 +10:00
Lucas Azzola
e78e07e2ad
refactor(multiparser): move css expression doc printing to transformCssDoc ( #2214 )
2017-06-21 13:41:24 -07:00
Lucas Azzola
43521565e7
CSS: lowercase hex colors, closes #2139 ( #2203 )
2017-06-20 23:07:31 +10: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
58413cde3e
docs(readme): use unordered lists in options section
2017-06-18 15:41:22 +10:00
Lucas Azzola
af90402aab
docs(readme): join API and CLI columns to prevent overflow
2017-06-18 15:25:24 +10:00
Lucas Azzola
21f913cb6e
CLI: ignore node_modules with ./**-style glob, fixes #2110 ( #2185 )
2017-06-18 14:35:42 +10:00
Lucas Azzola
82a0bb5c5e
fix(typescript): upgrade tsep, fixes #2143 ( #2183 )
2017-06-17 17:10:22 -10:00
Lucas Azzola
bff28023b3
Comments: attach method name comments with estree parsers, fixes #2141 ( #2170 )
2017-06-17 22:22:39 +10:00
Lucas Azzola
c669a1db72
TypeScript: group function params in call/construct signatures, fixes #2163 ( #2169 )
2017-06-17 12:09:18 +10:00
Lucas Azzola
7e60d70f97
fix(typescript): always break interfaces onto multiple lines, fixes #2159 ( #2161 )
2017-06-15 14:34:54 -10:00
Lucas Azzola
9e7b02d50e
Print {} in import if it's in the source, fixes #2145 ( #2150 )
2017-06-15 20:19:01 +10:00
Lucas Azzola
a2328edced
TypeScript: keep parens around with yield/await non-null assertion, fixes #2137 ( #2149 )
2017-06-15 09:34:12 +10:00
Lucas Azzola
b7e1c366e0
Vue: pretty-print binding syntax ( #2108 )
...
* feat(vue): pretty-print :class attributes
* feat(vue): switch to brand new custom parser API! 🎉
* refactor(vue): move AST manipulation to post-parse
2017-06-14 22:33:15 +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
d274e24e23
docs(readme): add "styled with prettier" badge
2017-06-13 10:45:08 +10:00
Lucas Azzola
fbf9064090
refactor(multiparser): move some logic from printer.js to multiparser.js ( #2109 )
2017-06-12 08:06:41 -07:00
Lucas Azzola
4e4922b428
feat(website): revamp the website a bit ( #2113 )
2017-06-12 07:58:06 -07:00
Lucas Azzola
364c38de0d
Implement custom parser API ( #1783 )
...
* feat(api): add custom parser API
* test(api): add integration test for parser resolution
* chore(api): fix build after resolving conflicts
* docs(api): document custom parser API
* docs(api): fix typo
* chore(build): add parse5 to build and support yarn test --prod
2017-06-12 16:51:12 +10:00
Lucas Azzola
486a89bfdc
fix(typescript): workaround - don't wrap directives in parens, fixes #2074 ( #2107 )
2017-06-11 19:10:56 -07:00
Lucas Azzola
e8f12cf621
TypeScript: Remove parens from type annotations where possible ( #2098 )
...
* fix(typescript): remove parens from union types where possible, fixes #1885
* fix(typescript): ensure parenthesis removal is stable
* fix(typescript): don't strip parens around function type
2017-06-11 18:06:47 -07:00
Lucas Azzola
9c608d2ec1
fix(typescript): use printFunctionParams for call/construct signature, fixes #2105 ( #2106 )
2017-06-11 16:06:38 -07:00
Lucas Azzola
ec7d99439d
fix(typescript): print arrow function type params on same line as params, fixes #2099 ( #2101 )
2017-06-11 07:30:51 -07:00
Lucas Azzola
026f9b4de7
docs: prune old vim links from the table of contents
2017-06-11 22:35:35 +10:00
Lucas Azzola
4395e09b78
fix(import): allow break with both default named import, fixes #2050 ( #2096 )
2017-06-10 21:55:21 -07:00
Lucas Azzola
a79a444bac
fix(variable-declarator): indent first variable in one-var scenario, fixes #2072 ( #2095 )
2017-06-10 21:19:50 -07:00
Lucas Azzola
fdb7467de7
feat(html): add support for HTML fragments ( #2093 )
2017-06-10 20:10:34 -07:00
Lucas Azzola
b4f0ff346e
feat(mutliparser): add react-relay and graphql-tag parsing ( #2092 )
2017-06-10 08:59:27 -07:00