The spec was updated ( https://tc39.es/proposal-nullish-coalescing/ ) with the following two changes:
- ?? has lower precedence than ||. (previously equal)
- ?? cannot immediately contain, or be contained within, an && or || operation. (parens are now required)
The safe way to upgrade is to run prettier with just this change so that parenthesis are properly added. Then to upgrade the parser (only flow supports the new precendence in the next release, babel hasn't been updated yet) in prettier so that the new precedence is being used. Failure to do so will result in parse errors because of missing parenthesis so we will not have silent errors.
There was only 44 callsites mixing || and ?? in a confusing way in the Facebook codebase so it shouldn't be a huge deal in practice.
... 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
* 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...
* 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
Prior to this change, the CLI would resolve the config for a file before
checking it against the ignored list. If the config was invalid, the CLI
would report a failure.
This change relocates the config-resolution phase until after the file
is confirmed to not be ignored.
Previously, the "Copy markdown" button in the playground generated
markdown containing this when having selected "babel-flow" as parser:
```babel-flow
This commit changes it to:
```jsx
So that the code blocks get syntax highlighting on GitHub.