Commit Graph

3246 Commits (f2c6b94ee76b858667b9091c3f487ac4500e887f)

Author SHA1 Message Date
Sosuke Suzuki f2c6b94ee7 TypeScript: Keep semi for a class property before index signatu… (#6728)
* Modify to add semi to prop before TSIndexSignature

Co-Authored-By: Simon Lydell <simon.lydell@gmail.com>
2019-10-29 07:17:29 +01:00
dependabot-preview[bot] b4f28a5b65 Bump react-dom from 16.10.2 to 16.11.0 in /website (#6724)
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 16.10.2 to 16.11.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.11.0/packages/react-dom)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-28 18:27:40 +01:00
dependabot-preview[bot] 27ef80d56a Bump react from 16.10.2 to 16.11.0 in /website (#6723)
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.10.2 to 16.11.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.11.0/packages/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-28 17:54:36 +01:00
dependabot-preview[bot] 2c135433ae Bump eslint-config-prettier from 6.4.0 to 6.5.0 (#6722)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.4.0...v6.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-28 17:54:24 +01:00
Zhongliang Wang 2cfd8fb518 Support TypeScript 3.7 (and drop Node 6 support for direct inst… (#6657)
* WIP: Support TypeScript 3.7

* Add support for `asserts` keyword; Update snapshots

* Update typescript-estree to v2.5.0 to remove the dependency on chokidar

* Update TypeScript

* Update CHANGELOG.unreleased.md

* Add examples for TypeScript 3.7

* Update TypeScript 3.7 to latest dev version

* Correct wording

* Support `declare` keyword on class members (TypeScript 3.7 feature)

* Update Changelog and downgrade TypeScript from 3.8.0-dev to 3.7.1-rc

* Add a note regarding to dropping Node 6 support for direct installation

* tweak build config to repair build

* update CHANGELOG.unreleased.md

* TSTypePredicate microrefactoring

* fix formatting

* clean up tests

* fix parens for optional chaining inside computed properties

* update CHANGELOG.unreleased.md

* unify output across parsers for template literals

* enable more tests with optional chaining

* fix unneeded parens inside computed key of OptionalMemberExpression

* fix paren issues for OptionalCallExpression

* more fixes for OptionalCallExpression

* @typescript-eslint/typescript-estree 2.5.1-alpha.4

* fix lint

* revert build hacks

* fix one more parens issue

* @typescript-eslint/typescript-estree 2.5.1-alpha.5, remove loggerFn override

* drop node 6 for direct installing from github

* fix another parens issue, disable some tests for flow

* workaround for flow bug

* fix issues with comments


Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2019-10-28 17:53:57 +01:00
Zaven Muradyan 4e46f92b86 Add formatting for i18n attributes. (#6695)
* Add formatting for i18n attributes.

Previously, Prettier would largely ignore i18n attributes, not even
wrapping their content, which wasn't ideal since i18n descriptive text
can sometimes get long.

After this, Prettier will auto-wrap the contents of i18n attributes once
they exceed the line length.

Fixes #5875.
2019-10-25 22:10:43 +03:00
Chris Brody 7eb4431350 JSDoc type fixes in `src/main/core-options.js` (#6702)
with unused `oppositeDescription` parameter removed

and reordering of some other members

to resolve checkJs issues in `src/main/core-options.js`,

as verified by the following command:

    npx tsc --allowJs --checkJs --noEmit --target es5 src/main/core-options.js
2019-10-25 19:25:15 +03:00
Sosuke Suzuki f207e665bc JavaScript: Break arrays of arrays/objects if each element has more than one element/property (#6694)
* Modify to define isJestEachFunctionCall

* Modify to break ArrayExpression when parent is jest each function

* Add tests

* Update CHANGELOG.unreleased.md

* Fix comment

* Add pr number

* Update CHANGELOG.unreleased.md

* Remove hasNewLineInRange

* Modify to change logic for breaking jest each call function

* Modify to add logic for breaking ArrayExpression

* Modify to avoid mixed nested array

* Modify to remove changes for jest

* Update CHANGELOG.unreleased.md

* Update CHANGELOG.unreleased.md
2019-10-25 19:12:07 +03:00
Georgii Dolzhykov 69b481758c
set up cspell (#6684)
* set up cspell

* fix actual misspellings

* add cspell.json to .prettierignore

* rebase and fix issues in CHANGELOG.unreleased.md
2019-10-25 00:07:17 +03:00
Chris Brody 473bacf966 typescript@3.6.4 update (#6704) 2019-10-24 14:00:16 +03:00
Georgii Dolzhykov 2c14a7f13c
docs on whitespace sensitivity: better wording (#6699) 2019-10-23 21:57:00 +03:00
dependabot-preview[bot] 63b450b8e6 Bump terser-webpack-plugin from 1.4.1 to 2.1.3 (#6654)
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 1.4.1 to 2.1.3.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.4.1...v2.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-23 14:39:44 +02:00
Kai Cataldo df45e12c5c API: add resolveConfig option to getFileInfo() (#6666)
* Add useConfig option to getFileInfo()

* useConfig -> resolveConfig
2019-10-23 13:56:59 +02:00
Sosuke Suzuki 7f68db8e88 JavaScript: arguments with object contains newline in arrow function (#6382)
* Modify to fix arguments with object contains newline in arrow function(nested)

* Update CHANGELOG.unreleased.md

* Update tests

* Modify to refactor

* Modify to refactor

* Add pr number and link

* Update CHANGELOG.unreleased.md

* Modify to remove unnecessary null checking

* Fix for ArrayPattern

* Fix for RestElement

* Fix for AssignmentPattern

* Update tests

* Fix for nested array and object

* Update tests

* Fix for nested array pattern

* Update tests

* Modify to discard unnecessary node type check

* Fix for rest element

* Fix for array in rest

* Fix for array in assignment pattern

* Update tests

* Fix for CallExpression with Assignment

* Fix for ArrowFunction with AssignmentPattern

* Update tests

* Modify to support generally pattern

* Update tests

* Modify to use path.each instead of path.map

* Fix for multi arguments

* Fix typo, Argments => Arguments
2019-10-22 16:05:10 +03:00
Chad Carbert a7cae47cdf Glimmer: Improve whitespace handling (#6354)
* Improve curly and whitespace handling

* Refactoring and clean up

* Collapse elements with non-whitespace children

* Clean selfClosing check in AST compare

selfClosing tags can't be considered when using AST_COMPARE=1.
The new AST may have a Glimmer component that has been collapsed,
ie: <HelloWorld></HelloWorld> -> <HelloWorld />

These result in different ASTs and thereofre we need to clean the
check that compares self-closing in the before and after ASTs

Co-authored-by: Jamie White <jamie@jgwhite.co.uk>

* Add istanbul ignore for ternaries in utilities

* Improve handling around whitespace near elements and block statements

* Update tests after rebasing

* Fix CHANGELOG.unreleased.md after rebase

* Tweak regex around leading and trialing line beraks and update test

Co-authored-by: FabHof <35104465+FabHof@users.noreply.github.com>

* Extract attribute value from concat node
2019-10-21 23:51:41 +02:00
dependabot-preview[bot] e4ab962a6d Bump docusaurus from 1.13.0 to 1.14.0 in /website (#6690)
Bumps [docusaurus](https://github.com/facebook/docusaurus) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/compare/v1.13.0...v1.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 17:34:47 +02:00
dependabot-preview[bot] 5edb0edae5 Bump codemirror-graphql from 0.11.1 to 0.11.2 in /website (#6689)
Bumps [codemirror-graphql](https://github.com/graphql/graphiql) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/graphql/graphiql/releases)
- [Changelog](https://github.com/graphql/graphiql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/graphql/graphiql/compare/codemirror-graphql@0.11.1...codemirror-graphql@0.11.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 14:23:46 +03:00
dependabot-preview[bot] a5a33bca11 Bump codemirror from 5.49.0 to 5.49.2 in /website (#6691)
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.49.0 to 5.49.2.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.49.0...5.49.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 14:03:01 +03:00
Selvazhagan 10deb1f086 Angular: closing parenthesis on a new line after ternaries passed to pipes (#5902) 2019-10-21 12:38:21 +03:00
Zaven Muradyan 8a37258a33 Add basic instructions on how to run Prettier locally for debugging. (#6686)
Fixes #5887.
2019-10-20 16:19:47 +02:00
Sean Baines 4bd0c014fe Fix tooltip being hidden behind browser scrollbars (#6688) 2019-10-20 15:44:29 +02:00
Georgii Dolzhykov e1bfd2e2fc fix playground: wrong parser shown in options on first open (#6683) 2019-10-18 14:20:55 +02:00
fisker Cheung 3dbe4b2038 Docs: add link to `devDependencies` (#6682) 2019-10-18 10:36:24 +02:00
JounQin 9a0bdf71cb feat: add support for PartialApplication (#6397) 2019-10-17 16:45:24 +03:00
Georgii Dolzhykov 80260555c9 ts: fix optional computed methods (#6673) 2019-10-17 14:23:14 +03:00
Georgii Dolzhykov 4ba0d4e36d
fix spelling, wording, markup issues in CHANGELOG.unreleased.md (#6672) 2019-10-16 23:18:53 +03:00
dependabot-preview[bot] f28faf9c04 Bump webpack from 4.41.1 to 4.41.2 in /website (#6671)
Bumps [webpack](https://github.com/webpack/webpack) from 4.41.1 to 4.41.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.41.1...v4.41.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-16 20:11:51 +02:00
Sosuke Suzuki 60d6f139a9 Docs: update docs to follow #6665 (#6670) 2019-10-16 18:53:01 +02:00
fisker Cheung 4750b1c25a Fix an expired todo test (#6665)
* Fix a expired todo test

* only check TypeError

* Throw a specific TypeError

* fix async expect

* use return
2019-10-16 15:09:39 +02:00
Eric Sakmar 10bd71e478 fix(js): Object destructuring in method shorthand #6515 (#6646) 2019-10-16 10:46:20 +03:00
fisker Cheung d52021ecbf Minor tweaks for build configs (#6663)
* Minor tweaks for build configs

* fix `@angular/compiler` path
2019-10-16 07:08:30 +02:00
fisker Cheung b5cc13a5df Remove usage of `require.extensions` in `parser-glimmer.js` (#6658)
* Fix usage of `require.extensions`

* try cjs build

* update comment
2019-10-15 18:00:32 +02:00
Georgii Dolzhykov d4537dc5f2
enable the allowUndeclaredExports Babel option (#6660) 2019-10-15 18:32:46 +03:00
Georgii Dolzhykov ab598e6e23
tests: rename duplicate bindings to be ready for #6400 (#6662) 2019-10-15 18:27:39 +03:00
Sosuke Suzuki 3a998df02e
TSX: Fix incorrectly removing parentheses around jsx elements being accessed in tsx file (#6640)
* Modify to wrap jsx element used with member-expression in tsx

* Add tests

* Update CHANGELOG.unreleased.md

* Modify to support no-inline jsx element

* Add pr number

* Fix from lint-docs

* Modify to rename isTsx => isTSXFile

* Modify to no considering file ext

* Support JSXFragment and add tests

* Update CHANGELOG.unreleased.md
2019-10-16 00:11:48 +09:00
fisker Cheung c949f5ba20 Use `babel` plugin replace `includes` (#6659) 2019-10-15 13:48:56 +02:00
dependabot-preview[bot] aa4c1cad5b Bump @babel/preset-react from 7.0.0 to 7.6.3 in /website (#6648)
Bumps [@babel/preset-react](https://github.com/babel/babel) from 7.0.0 to 7.6.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.0.0...v7.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-14 19:25:54 +02:00
Georgii Dolzhykov 3a8ebae57d refactoring: unify code for printing methods, remove isNodeStar… (#6637)
* unify code for printing methods, remove isNodeStartingWithDeclare hacks

* body is BlockStatement, not an array

* getters and setters can't be async

* unify printPropertyKey calls
2019-10-14 17:39:36 +02:00
dependabot-preview[bot] 1e93fabae5 Bump webpack from 4.41.0 to 4.41.1 in /website (#6649)
Bumps [webpack](https://github.com/webpack/webpack) from 4.41.0 to 4.41.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.41.0...v4.41.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-14 17:23:23 +02:00
dependabot-preview[bot] 6ca2a1842c Bump @babel/preset-env from 7.6.2 to 7.6.3 in /website (#6650)
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.6.2 to 7.6.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.6.2...v7.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-14 17:23:12 +02:00
Georgii Dolzhykov 977b828666 Get rid of TSParenthesizedType nodes before proceeding with formatting (#6605)
* get rid of TSParenthesizedType nodes before proceeding with formatting

* fix parens for TSIndexedAccessType, TSFunctionType, TSConditionalType

fixes #6603

* workaround edge cases with one-item unions and intersections

* fix parens for TSInferType

* fix parens for rest elements in tuple types

* refactoring

* fix function types in conditional types

* move tests for rest and optional tuple elements

* fix comment issues

* tests for unions and intersections

* add parens around multiline unions in tuple

* move the parens check for TS nodes closer to the one for Flow nodes

* update CHANGELOG.unreleased.md

* remove dead code

* fix parens for TSConstructorType

* better wording in CHANGELOG.unreleased.md
2019-10-14 15:00:21 +03:00
Georgii Dolzhykov f8a4a61a62 fix typos (#6642) 2019-10-13 21:51:58 +02:00
Sosuke Suzuki 02ec2337b8 Modify to follow #6638 (#6645) 2019-10-13 21:51:02 +02:00
Flavyoo 43247c88c2 Added image for Estalee and updates users.yml (#6629)
* Added image for Estalee and updates users.yml

* Update users.yml

* Ran SVGO

* Ran SVGO
2019-10-13 19:15:04 +02:00
David Lechner 1435b2756c docs/configuration: specify order of precedence (#6638)
This updates the docs to show the search order of the config files.

Order comes from: 3805034bdf/src/config/resolve-config.js (L35-L44)
2019-10-12 19:26:07 +02:00
fisker Cheung 5118fc21f3 Update `yaml-unist-parser` to support yaml@1.7.1 (#6632) 2019-10-10 12:04:38 +02:00
fisker Cheung 4769f1139a Remove useless `rollup-plugin-node-builtins` (#6635) 2019-10-10 12:03:28 +02:00
Kyle Scully 297be7cc31 docs(website): add build.com to users (#6633) 2019-10-09 19:01:05 +02:00
fisker Cheung 9805496c4d Add code sample for `babel-flow` parser (#6631) 2019-10-09 18:10:24 +02:00
Ingvar Stepanyan 282d1017f3 Add support for V8 intrinsics via Babel (#6496)
This plugin was recently added on Babel side and allows to parse custom syntax for V8 intrinsics.

They don't clash with any real-world JavaScript syntax, so adding this option should be as safe as any other plugin, and would allow to format JavaScript that uses such intrinsics (e.g. code inside Node.js or V8 itself).
2019-10-09 07:29:37 -07:00