* 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>
* 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.
* 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
* 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
* 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
* 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
* 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
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).
* fix: adjacent JSX elements should be allowed in mdx
* chore: update CHANGELOG.unreleased.md for PR
* fix: adjacent JSX elements format issue of line
* fix: get html text from ast correctly
* fix: self closing issue
* fix: finally find out how to get original text from position
* chore: reset unnecessary changes
* fix: additional text after jsx should also be allowed
* fix: regression of empty text
* docs: add missing links
* fix linting...