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
Lucas Azzola
d1b94c540c
Implement parser switching (HTML, Vue, styled-components) ( #2086 )
...
* feat(multiparser): implement switching from html -> css,js,ts
* feat(multiparser): use quasi value instead of originalText
2017-06-10 08:03:39 -07:00
Lucas Azzola
77f0c05d2a
fix(method-chain): break on non-literal computed member expression, fixes #2075 ( #2087 )
2017-06-10 07:47:22 -07:00
Lucas Azzola
1e08f03554
fix(typescript): break on multiple interface extends, fixes #2043 ( #2085 )
2017-06-10 07:46:59 -07:00
Lucas Azzola
f7819d5695
CSS: implement prettier-ignore ( #2089 )
...
* fix(css): implement prettier-ignore, fixes #2007
* refactor(css): move prettier-ignore to printNodeSequence
2017-06-10 07:45:59 -07:00
Lucas Azzola
a9409f11e7
fix(css): print @else on same line as }, fixes #2053 ( #2088 )
2017-06-10 07:40:05 -07:00
Lucas Azzola
8903e5e527
fix(html): fix AST_COMPARE on htmlparser2 ASTs ( #2084 )
2017-06-09 19:45:39 -07:00
Lucas Azzola
d00956d51d
feat(html): add parse5/htmlparser2 printer ( #2083 )
2017-06-09 19:22:59 -07:00
Lucas Azzola
31ab3b6036
feat(css): split postcss printer into separate file ( #1969 )
2017-06-05 07:28:38 -07:00
Lucas Azzola
642ac7e230
fix(typescript): print semi in class index signatures, fixes #1960 ( #1961 )
2017-06-04 07:21:33 -07:00
Lucas Azzola
fed9f0f4eb
Mention TypeScript and CSS in the README ( #1950 )
...
* Mention TypeScript and CSS in the README.
* Collapse the table of contents with `<details>` tag.
* Clarifies the `--parser` option.
2017-06-03 20:03:30 -07:00
Lucas Azzola
6697122e28
fix(decorators): do not inline methods with decorators with babylon, fixes #1933 ( #1934 )
2017-06-03 05:24:24 -07:00
Lucas Azzola
649cec7fdd
TypeScript: fix trailing comma in enum ( #1938 )
...
* fix(typescript): fix trailing comma in enum, fixes #1932
* fix(typescript): use --trailing-comma es5 for enums
2017-06-03 05:20:36 -07:00
Lucas Azzola
c57f2ab507
fix(typescript): no semi after export default abstract class, fixes #1926 ( #1937 )
2017-06-03 05:19:39 -07:00
Lucas Azzola
2ef169eb67
fix(typescript): print semi with inline interfaces/types, fixes #1930 ( #1936 )
2017-06-03 05:18:59 -07:00
Lucas Azzola
83c5253429
fix(typescript): look at source to determine export = statement ( #1868 )
2017-06-02 08:32:40 -07:00
Lucas Azzola
38eec13a03
TypeScript: temp fix for missing readonly keyword ( #1865 )
...
* fix(typescript): temp fix for missing readonly keyword, fixes #1845
* fix(typescript): use non-master commit from tsep
2017-06-02 08:09:24 -07:00
Lucas Azzola
8511e798dc
feat(decorators): inline more types of decorators ( #1864 )
2017-06-02 07:38:44 -07:00
Lucas Azzola
9ed94c77ab
fix(typescript): do not print trailing comma in TS tuple type, fixes #1858 ( #1863 )
2017-06-02 07:16:41 -07:00
Lucas Azzola
ede078c0d3
fix(typescript): print static before accessibility, fixes #1855 ( #1862 )
2017-06-02 07:16:11 -07:00
Lucas Azzola
c9159f7862
Break on Property with long value and Literal key ( #1786 )
...
* fix(object-expression): break on object literal with long value
* fix(object-expression): add isStringLiteral check
2017-05-29 07:31:24 -07:00
Lucas Azzola
e270032d37
chore(typescript): upgrade typescript-eslint-parser to 992f1fa ( fixes #1769 ) ( #1785 )
2017-05-28 08:05:33 -07:00
Lucas Azzola
2f840f940f
test(typescript): disable failing tests ( #1782 )
2017-05-27 18:22:32 -07:00
Lucas Azzola
2a58e6bc06
test(typescript): enable typescript-verify on most tests ( #1781 )
2017-05-27 17:57:07 -07:00
Lucas Azzola
2c62b5bebe
feat(number): trim extra trailing zeroes ( #1768 )
2017-05-27 10:46:45 -07:00
Lucas Azzola
91bcde9859
fix(typescript): fix unstable optional method ( #1770 )
2017-05-27 07:24:54 -07:00
Lucas Azzola
59a760c5d8
TypeScript: fix namespace comment printing ( #1765 )
...
* fix(typescript): fix namespace comment printing
* fix(typescript): remove extra newline after comment
* chore(lint): lint changes
2017-05-26 21:30:42 -07:00
Lucas Azzola
934216d852
fix(typescript): allow parens with TSFunctionType and ignore empty specifiers ( #1764 )
2017-05-26 20:47:48 -07:00
Lucas Azzola
b265713763
fix(typescript): handle ExperimentalSpreadOperator, optional method, and abstract interface ( #1763 )
2017-05-26 20:19:17 -07:00
Lucas Azzola
599444fe7f
fix(typescript): add TSInterfaceHeritage to ast-types ( #1644 )
2017-05-21 08:10:04 -07:00
Lucas Azzola
575980d7f4
fix(typescript): handle global namespace without modifiers ( #1646 )
2017-05-21 08:09:29 -07:00
Lucas Azzola
5c6fd80d50
fix(typescript): handle undefined variable declarations ( #1645 )
2017-05-21 08:03:38 -07:00
Lucas Azzola
8f00393a56
tools(typescript): do not report SyntaxErrors as errors ( #1647 )
2017-05-21 07:53:30 -07:00
Lucas Azzola
1ea4ad4e30
tools(typescript): add script to run all TypeScript tests ( #1606 )
2017-05-14 03:26:37 -07:00
Lucas Azzola
44934da349
feat(typescript): add fallback for JSX detection ( #1551 )
2017-05-08 05:57:19 -07:00
Lucas Azzola
eabff629dd
chore(build): update snapshot test ( #1549 )
2017-05-07 20:04:32 -07:00
Lucas Azzola
fa27e5838c
feat(typescript): add TSTypeAssertionExpression and naive TSX detection ( #1545 )
2017-05-07 08:09:52 -07:00
Lucas Azzola
3471ce4584
feat(typescript): print semi instead of comma in TS interface ( #1548 )
2017-05-07 07:39:21 -07:00
Lucas Azzola
f655233ba2
fix(typescript): handle declare global syntax ( #1546 )
2017-05-07 03:44:41 -07:00
Lucas Azzola
5cc7878902
fix(typescript): fix a handful of ast(prettier(input)) issues ( #1544 )
2017-05-06 22:34:47 -07:00
Lucas Azzola
92d5a57122
fix(typescript): add TSNamespaceFunctionDeclaration to ast-types ( #1543 )
2017-05-06 21:33:07 -07:00
Lucas Azzola
0fa38cce33
fix(typescript): remove extraneous newline with namespace exports ( #1542 )
2017-05-06 20:28:49 -07:00
Lucas Azzola
e22bd00815
fix(typescript): ArrowFunctionExpression needs parens in TSAsExpression ( #1541 )
2017-05-06 20:03:17 -07:00
Lucas Azzola
5fd9cd01de
test(typescript): do not fail debug check on Literal -> Identifier ( #1540 )
2017-05-06 19:39:19 -07:00
Lucas Azzola
3d45278ea7
fix(typescript): print readonly and ? tokens in TSMappedType ( #1535 )
2017-05-06 10:30:59 -07:00