* 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
... to more closely align with what we’ve learned the past 3 years.
Note: These are not my personal opinions. It’s my attempt at distilling
internal core discussions into a short document.
Since file watchers ignore partials like `_component.scss` (underscore!) when imported in some `main.scss`, they won’t be prettified. Use the `COMPILE_PARTIAL=true` environment variable to also watch and prettify partials.
* feat: implement --vue-indent-script-and-style mentioned at pr-#6077
* docs: --vue-indent-script-and-style
* update new test case
* feat: playground for --vue-indent-script-and-style
* chores: Revert package.json version
* Remove noisy snapshots
* Add ES6 instructions in browser docs
* Change ES6 to ES6 Modules in browser docs
Co-Authored-By: Jed Fox <git@twopointzero.us>
* Run prettier --write docs/browser.md
* docs: Add simplified installation instructions for lint-staged
Currently, to install and configure lint-staged you'd need to manually install all packaged and modify the `package.json`.
With `mrm` it's done automatically depending on what version of Prettier is installed and specified in project's dependencies.
* docs: Update according to feedback
* Update docs/precommit.md
Co-Authored-By: okonet <okonet@users.noreply.github.com>
Another possible option is `if it gets`
<!-- Please provide a brief summary of your changes: -->
<!-- Please ensure you’ve done all of these things (if applicable). -->
<!-- You can replace the `[ ]` with `[x]` to mark each task as done. -->
- [ ] I’ve added tests to confirm my change works.
- [ ] (If changing the API or CLI) I’ve documented the changes I’ve made (in the `docs/` directory)
- [ ] (If not an internal change) I’ve added my changes to the `CHANGELOG.unreleased.md` file following the template.
- [x] I’ve read the [contributing guidelines](https://github.com/prettier/prettier/blob/master/CONTRIBUTING.md).
**✨[Try the playground for this PR](https://prettier.io/playground-redirect)✨**
This pull requests adds a new parser option `lwc`. This is the same as the HTML parser, but it adds support for unquoted HTML attributes per the needs of LWC. See: #5627