* JSDoc type added in `src/common/util.js`
* skip can return false
* Add TBD for false - 1 not allowed
* Define typedef SkipOptions
* Use method generic for node param
* Define node param for setLocStart and setLocEnd
* Copy idx param to local variable
* Add @returns false
* Update Utility functions docs
* hasNewline param index: allow only number
* Add condition
* Add function keyword to docs
* Add prettier-ignore
* Improve condition
* Remove TBD comment
* Use single quotes
* Add type to oldIndex
* Use singleline JSDocs
* 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
* Use destructuring for readability and optimzations at for loop length property
* Destructure variables for easy maintainability of code
* PR review fix
* refactor: fix linting
* handle cusor position relative to comments correctly
* use more robust method of cursor offset tracking
* add support for cursorOffset with rangeStart/End
* add tests for cursorOffset
* use old JS syntax for node4
* add another cursor offset test case
* remove trailing whitespace in cursor tests
* fix null findNodeAtOffset handling
* remove dead code
* add more test cases
* use indexOf for node4
* revert comments.js
* add more comment tests
* change tests infra
* Fix AST_COMPARE
* move CURSOR to top level of file
* mutate result
* use es6 property shorthand
* simplify diff offset calculation
* put remaining test cases in individual files
* feat: enable plugin-specific comment functionality
This change enables language plugins to provide their own "handleComment" function. To do so, we're exposing the addLeadingComment, addTrailingComment, and addDangling comment functions which attach comment nodes correctly in the ast which will get handled by prettier core when printing.
* moving js comment functionality to plugin
* Split out location extraction into plugin config
* Reduce set of exported function, rebase to current master
* Pass custom locStart/locEnd fn's directly to affected methods
* (wip) always use locStart/locEnd from plugin
* Convert graphql implementation
* Convert HTML implementation
* (wip) convert JS implementation
* Remove unused variables
* Continue conversion of JS implementation
* Replace "util.locStart" with direct call to "options.locStart"
* Remove util closure
* Add unit test for structure of shared util
* Fix linting error, simplify locStart/End implementations
* Added prettier layout for class extends and implements
* Added prettier layout for class extends and implements, fix with keeping it in online if it fits
* Added prettier layout for class extends and implements, fixed tests as a side change
* Extends implements comments in same line fix
* Extends implements comments in same line without ugly workaround
* added empty line to test typescript_class/extends_implements.ts
* If only one extends keep old behaviour
* Removed console logs
* Split up comment printing
* Refactor plugin handling
* Allow multiparser to use options normalization
* Rename to canAttachComment
* Add inline comment
* Format code
* Use prettier.__debug to get AST