Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit b091fd3
Author: Simon Lydell <simon.lydell@gmail.com>
Date:   Sat Nov 9 12:12:31 2019 +0100

    Remove out-of-date comment

commit 58c6b42
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Sat Nov 9 12:47:54 2019 +0200

    fix formatting of union type as arrow function return type (prettier#6896)

commit 8c3efeb
Author: Simon Lydell <simon.lydell@gmail.com>
Date:   Sat Nov 9 01:44:53 2019 +0100

    Try to fix some code blocks in 1.19.0 blog post

commit 4eb3e26
Author: Simon Lydell <simon.lydell@gmail.com>
Date:   Sat Nov 9 01:23:57 2019 +0100

    Blog post, changelog and docs for 1.19 (prettier#6787)

commit 98d27c7
Author: Simon Lydell <simon.lydell@gmail.com>
Date:   Sat Nov 9 01:14:31 2019 +0100

    Bump Prettier dependency to 1.19.0

commit e788e8d
Author: Simon Lydell <simon.lydell@gmail.com>
Date:   Sat Nov 9 01:09:19 2019 +0100

    Release 1.19.0

commit 057e15d
Author: Simon Lydell <simon.lydell@gmail.com>
Date:   Sat Nov 9 01:00:06 2019 +0100

    prettier 1.19.0-beta.1

commit 3fb111a
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Sat Nov 9 01:12:32 2019 +0200

    deduplicate entries in yarn.lock - part 2 (prettier#6884)

commit 10c5c37
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Sat Nov 9 00:43:34 2019 +0200

    deduplicate entries in yarn.lock (prettier#6882)

    * deduplicate entries in yarn.lock

    * revert changes for @babel/code-frame

commit 361fd2d
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Sat Nov 9 00:06:54 2019 +0200

    fix printing bigint literals parsed by Flow (prettier#6883)

commit ea70396
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Fri Nov 8 23:31:31 2019 +0200

    Fix lost adjacent JSX when using Babel (prettier#6881)

    Bump @babel/parser to 7.7.3. Otherwise Prettier formats "<a/><b/>" to "<a/ >;".

commit 7959b12
Author: Justin Ridgewell <jridgewell@google.com>
Date:   Fri Nov 8 15:25:38 2019 -0500

    Don't require parens for same-operator logical expressions (prettier#6864)

    Multiple same-operator logical expressions do not require parentheses to disambiguate.

commit 3618361
Author: fisker Cheung <lionkay@gmail.com>
Date:   Sat Nov 9 02:38:55 2019 +0800

    Update `codecov` to v3.6.1 (prettier#6876)

commit e1d30d6
Author: fisker Cheung <lionkay@gmail.com>
Date:   Sat Nov 9 02:37:56 2019 +0800

    Update `@babel/core` to v7.7.2 (prettier#6877)

commit d865eb5
Author: fisker Cheung <lionkay@gmail.com>
Date:   Sat Nov 9 02:37:41 2019 +0800

    Update `flow-parser` to v0.111.3 (prettier#6878)

commit ec65947
Author: fisker Cheung <lionkay@gmail.com>
Date:   Sat Nov 9 02:36:27 2019 +0800

    Update `@rollup/plugin-replace` to v2.2.1 (prettier#6879)

commit 460ea2f
Author: fisker Cheung <lionkay@gmail.com>
Date:   Sat Nov 9 02:33:59 2019 +0800

    Format `style[lang="css"]` (prettier#6875)

commit 597dae8
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Fri Nov 8 17:44:23 2019 +0100

    Bump @babel/preset-env from 7.6.3 to 7.7.1 in /website (prettier#6826)

    Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.6.3 to 7.7.1.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
    - [Commits](babel/babel@v7.6.3...v7.7.1)

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

    Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>

commit d05be09
Author: fisker Cheung <lionkay@gmail.com>
Date:   Sat Nov 9 00:33:28 2019 +0800

    Fix unpkg links in docs (prettier#6872)

commit 85912a7
Author: fisker Cheung <lionkay@gmail.com>
Date:   Fri Nov 8 23:34:14 2019 +0800

    Update `postcss-less` to v2 (prettier#6778)

    * Update `postcss-less` to v2

    * fix less `custom-selectors`

    * fix less `custom-selectors` 2

    * fix custom-selector `:` position

    * remove less hack

    * fix custom selector

    * cleanup

    * add changlog

    * add link

    * restore changlog

    * restore snap

    * restore snap

    * update postcss-custom-selectors detect

    * remove startsWith

    * trigger build

    * update `custom-selector`

    * add test and changelog

    * style

    * md

    * issue-4090-test

    * docs

    * Update CHANGELOG.unreleased.md

    Co-Authored-By: Georgii Dolzhykov <thorn.mailbox@gmail.com>

    * fix pr issue

    * fix

    * fix merge issue

    * insert new line

    * snap update

    * only support custom-selector in css

    * scss already parse it as custom-selector

    * remove `custom-selector` test in scss

    * link

commit 91c5235
Author: fisker Cheung <lionkay@gmail.com>
Date:   Fri Nov 8 20:51:51 2019 +0800

    Show invalid config filename in error message (prettier#6865)

commit 304acbe
Author: fisker Cheung <lionkay@gmail.com>
Date:   Fri Nov 8 19:49:32 2019 +0800

    Change external links to https (prettier#6874)

commit b06b42d
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Fri Nov 8 14:18:59 2019 +0300

    Bump @babel/parser from 7.7.0 to 7.7.2 (prettier#6862)

    Bumps [@babel/parser](https://github.com/babel/babel) from 7.7.0 to 7.7.2.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
    - [Commits](babel/babel@v7.7.0...v7.7.2)

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

commit 8188876
Author: Justin Ridgewell <jridgewell@google.com>
Date:   Thu Nov 7 13:56:44 2019 -0500

    Fix nullish coalescing parenthesis with mixed logical operators (prettier#6863)

    * Fix nullish coalescing with mixed logical operators parenthesis

    Mixing nullish coalescing (`??`) with the other logical operators (`&&` and `||`) requires parenthesis to disambiguate the inteded short circuiting. Without it, it's a `SyntaxError`. Earlier drafts of the spec allowed mixing, but it was disallowed when we reached Stage 3.

    See https://v8.dev/features/nullish-coalescing#mixing-and-matching-operators

    * Update changelog

    * Fixes and cleanup

    * Update changelog

commit d4a7a47
Author: fisker Cheung <lionkay@gmail.com>
Date:   Thu Nov 7 18:33:24 2019 +0800

    Remove handlebars@4.4.5 requirement in yarn.lock (prettier#6867)

commit 5caa608
Author: fisker Cheung <lionkay@gmail.com>
Date:   Thu Nov 7 18:04:32 2019 +0800

    Update browerslist in yarn.lock (prettier#6868)

commit b9ab7e2
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Thu Nov 7 12:02:41 2019 +0200

    fix formatting of comments in flow enums (prettier#6860)

commit 54cbdb8
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Wed Nov 6 21:53:16 2019 +0200

    better formatting for AwaitExpression in CallExpression/MemberExpression (prettier#6856)

    * better formatting for AwaitExpression nested in CallExpression or MemberExpression

    * update changelog

commit 5458fb5
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Wed Nov 6 20:45:09 2019 +0100

    Bump @typescript-eslint/typescript-estree from 2.6.0 to 2.6.1 (prettier#6805)

    * Bump @typescript-eslint/typescript-estree from 2.6.0 to 2.6.1

    Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 2.6.0 to 2.6.1.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.6.1/packages/typescript-estree)

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

    * add shim for path.extname

commit 5992654
Author: Evilebot Tnawi <evilebottnawi@users.noreply.github.com>
Date:   Wed Nov 6 22:43:21 2019 +0300

    test: issue prettier#6283 (prettier#6855)

commit 4ed377a
Author: Chris Brody <chris@brody.consulting>
Date:   Wed Nov 6 14:38:38 2019 -0500

    audit(critical): handlebars@4.4.5 in package resolutions (prettier#6853)

    * audit(critical): handlebars@4.4.5 in package resolutions

    and update yarn.lock

    resolves critical `yarn audit` issue due to:

        https://www.npmjs.com/advisories/755

    fixed formatting of `resolutions` package field using the following command:

        node ./bin/prettier.js --write package.json

    * and remove resolutions, not needed now that the lock file has been updated

commit b23c6a2
Author: George Zahariev <gkz@fb.com>
Date:   Wed Nov 6 11:36:16 2019 -0800

    Flow enums (prettier#6833)

commit 16f2c97
Author: Aymeric Bouzy <8168981+aymericbouzy@users.noreply.github.com>
Date:   Wed Nov 6 15:57:49 2019 +0100

    Add mongo as a VS Code supported language (prettier#6848)

    * Add mongo as a VS Code supported language

    * updated Changelog

    * fix spellcheck error

    * fix tests

commit 4d9acf8
Author: fisker Cheung <lionkay@gmail.com>
Date:   Wed Nov 6 18:29:02 2019 +0800

    Bump `eslint` from 6.5.1 to 6.6.0 (prettier#6846)

commit e48a9df
Author: George Zahariev <z@georgezahariev.com>
Date:   Tue Nov 5 22:50:32 2019 -0800

    Upgrade flow-parser from 0.89 to 0.111 (prettier#6830)

commit 2b22c7a
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Wed Nov 6 07:46:14 2019 +0100

    Bump @babel/preset-react from 7.6.3 to 7.7.0 in /website (prettier#6827)

    Bumps [@babel/preset-react](https://github.com/babel/babel) from 7.6.3 to 7.7.0.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
    - [Commits](babel/babel@v7.6.3...v7.7.0)

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

    Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>

commit d3fbdd9
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Wed Nov 6 07:40:45 2019 +0100

    Bump typescript from 3.7.1-rc to 3.7.2 (prettier#6832)

    Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.1-rc to 3.7.2.
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Commits](https://github.com/Microsoft/TypeScript/commits)

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

    Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>

commit c26f087
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Tue Nov 5 23:45:28 2019 +0200

    Bump rollup from 1.26.0 to 1.26.3 (prettier#6821)

    Bumps [rollup](https://github.com/rollup/rollup) from 1.26.0 to 1.26.3.
    - [Release notes](https://github.com/rollup/rollup/releases)
    - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
    - [Commits](rollup/rollup@v1.26.0...v1.26.3)

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

commit 1df4c17
Author: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Date:   Tue Nov 5 21:08:41 2019 +0200

    update Babel to 7.7.0 and enable error recovery (prettier#6816)

commit 9d2f5e0
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Tue Nov 5 19:08:14 2019 +0100

    Bump terser-webpack-plugin from 2.1.3 to 2.2.1 (prettier#6819)

    Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 2.1.3 to 2.2.1.
    - [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](webpack-contrib/terser-webpack-plugin@v2.1.3...v2.2.1)

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

    Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
  • Loading branch information
Christopher Quadflieg committed Nov 9, 2019
1 parent b32f56f commit c3cfee8
Show file tree
Hide file tree
Showing 116 changed files with 3,399 additions and 1,862 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/formatting.md
Expand Up @@ -26,7 +26,7 @@ Tip! Don't write this stuff manually.
-->

**Prettier 1.18.2**
**Prettier 1.19.0**
[Playground link](https://prettier.io/playground/#.....)
```sh
# Options (if any):
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/integration.md
Expand Up @@ -19,7 +19,7 @@ BEFORE SUBMITTING AN ISSUE:
-->

**Environments:**
- Prettier Version: 1.18.2
- Prettier Version: 1.19.0
- Running Prettier via: <!-- CLI, Node.js API, Browser API, etc. -->
- Runtime: <!-- Node.js v6, Chrome v67, etc. -->
- Operating System: <!-- Windows, Linux, macOS, etc. -->
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -5,7 +5,7 @@

- [ ] 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 the change is user-facing) I’ve added my changes to the `CHANGELOG.unreleased.md` file following the template.
- [ ] (If the change is user-facing) I’ve added my changes to `changelog_unreleased/*/pr-XXXX.md` file following `changelog_unreleased/TEMPLATE.md`.
- [ ] 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)**
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,9 @@
# 1.19.0

[diff](https://github.com/prettier/prettier/compare/1.18.2...1.19.0)

🔗 [Release Notes](https://prettier.io/blog/2019/11/09/1.19.0.html)

# 1.18.2

[diff](https://github.com/prettier/prettier/compare/1.18.1...1.18.2)
Expand Down
39 changes: 39 additions & 0 deletions changelog_unreleased/TEMPLATE.md
@@ -0,0 +1,39 @@
<!--
1. Choose a folder based on which language your PR is for.
- For JavaScript, choose `javascript/` etc.
- For TypeScript specific syntax, choose `typescript/`.
- If your PR applies to multiple languages, such as TypeScript/Flow, choose one folder and mention which languages it applies to.
2. In your chosen folder, create a file with your PR number: `pr-XXXX.md`. For example: `typescript/pr-6728.md`.
3. Copy the content below and paste it in your new file.
4. Fill in a title, the PR number and your user name.
5. Optionally write a description. Many times it’s enough with just sample code.
6. Change ```jsx to your language. For example, ```yaml.
7. Change the `// Input` and `// Prettier` comments to the comment syntax of your language. For example, `# Input`.
8. Choose some nice input example code. Paste it along with the output before and after your PR.
-->

#### Title ([#XXXX](https://github.com/prettier/prettier/pull/XXXX) by [@user](https://github.com/user))

Optional description if it makes sense.

<!-- prettier-ignore -->
```jsx
// Input
(foo ?? baz) || baz;

// Prettier stable
foo ?? baz || baz;

// Prettier master
(foo ?? baz) || baz;
```
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
22 changes: 22 additions & 0 deletions changelog_unreleased/typescript/pr-6896.md
@@ -0,0 +1,22 @@
#### Fix formatting of union type as arrow function return type ([#6896](https://github.com/prettier/prettier/pull/6896) by [@thorn0](https://github.com/thorn0))

<!-- prettier-ignore -->
```jsx
// Input
export const getVehicleDescriptor = async (
vehicleId: string,
): Promise<Collections.Parts.PrintedCircuitBoardAssembly['attributes'] | undefined> => {}

// Prettier stable
export const getVehicleDescriptor = async (
vehicleId: string
): Promise<| Collections.Parts.PrintedCircuitBoardAssembly["attributes"]
| undefined> => {};

// Prettier master
export const getVehicleDescriptor = async (
vehicleId: string
): Promise<
Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined
> => {};
```
Empty file.
Empty file.
8 changes: 6 additions & 2 deletions cspell.json
Expand Up @@ -91,8 +91,8 @@
"editorconfig",
"ekkhus",
"elektronik",
"ENOENT",
"Eneman",
"ENOENT",
"ericsakmar",
"Ericsburgh",
"Esben",
Expand Down Expand Up @@ -288,6 +288,7 @@
"React's",
"readline",
"readlines",
"rebalance",
"rebeccapurple",
"recurse",
"recurses",
Expand Down Expand Up @@ -337,6 +338,7 @@
"superset",
"supertypes",
"swac",
"systemjs",
"tdeekens",
"templating",
"tempy",
Expand All @@ -362,6 +364,7 @@
"unparenthesized",
"unparseable",
"unpause",
"unpkg",
"unrestrict",
"untracked",
"valourous",
Expand Down Expand Up @@ -393,6 +396,7 @@
"<!-- prettier-ignore -->\\n(`{3,})\\w*\\n[\\s\\S]+?\\1",
"\\[@\\w+?\\]",
"\\[`\\w+`\\]",
"ve+r+y+(long\\w+)?"
"ve{2,}r{2,}y",
"ve+r+y+long\\w*"
]
}
2 changes: 1 addition & 1 deletion docs/api.md
Expand Up @@ -49,7 +49,7 @@ prettier.resolveConfig(filePath).then(options => {
});
```

If `options.editorconfig` is `true` and an [`.editorconfig` file](http://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding prettier configuration. This configuration will be overridden by `.prettierrc`, etc. Currently, the following EditorConfig properties are supported:
If `options.editorconfig` is `true` and an [`.editorconfig` file](https://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding prettier configuration. This configuration will be overridden by `.prettierrc`, etc. Currently, the following EditorConfig properties are supported:

- `end_of_line`
- `indent_style`
Expand Down
22 changes: 12 additions & 10 deletions docs/browser.md
Expand Up @@ -3,7 +3,7 @@ id: browser
title: Browser
---

Run Prettier in the browser with the `standalone.js` UMD bundle shipped in the NPM package (starting in version 1.13). The new UMD bundle only formats the code and has no support for config files, ignore files, CLI usage, or automatic loading of plugins.
Run Prettier in the browser with the `standalone.js` UMD bundle shipped in the NPM package (starting in version 1.13). The UMD bundle only formats the code and has no support for config files, ignore files, CLI usage, or automatic loading of plugins.

### `prettier.format(code, options)`

Expand All @@ -15,12 +15,14 @@ See [Usage](#usage) below for examples.

### Global

<!-- prettier-ignore -->
```html
<script src="https://unpkg.com/prettier@1.13.0/standalone.js"></script>
<script src="https://unpkg.com/prettier@1.13.0/parser-graphql.js"></script>
<script type="text/javascript">
prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
<script src="https://unpkg.com/prettier@1.19.0/standalone.js"></script>
<script src="https://unpkg.com/prettier@1.19.0/parser-graphql.js"></script>
<script>
prettier.format("query { }", {
parser: "graphql",
plugins: prettierPlugins
});
</script>
```

Expand All @@ -40,8 +42,8 @@ prettier.format("query { }", {

```js
define([
"https://unpkg.com/prettier@1.13.0/standalone.js",
"https://unpkg.com/prettier@1.13.0/parser-graphql.js"
"https://unpkg.com/prettier@1.19.0/standalone.js",
"https://unpkg.com/prettier@1.19.0/parser-graphql.js"
], (prettier, ...plugins) => {
prettier.format("query { }", { parser: "graphql", plugins });
});
Expand All @@ -60,7 +62,7 @@ This syntax doesn't necessarily work in the browser, but it can be used when bun
### Worker

```js
importScripts("https://unpkg.com/prettier@1.13.0/standalone.js");
importScripts("https://unpkg.com/prettier@1.13.0/parser-graphql.js");
importScripts("https://unpkg.com/prettier@1.19.0/standalone.js");
importScripts("https://unpkg.com/prettier@1.19.0/parser-graphql.js");
prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
```
4 changes: 2 additions & 2 deletions docs/comparison.md
Expand Up @@ -7,10 +7,10 @@ title: Prettier vs. Linters

Linters have two categories of rules:

**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), [comma-style](http://eslint.org/docs/rules/comma-style)...
**Formatting rules**: eg: [max-len](https://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](https://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](https://eslint.org/docs/rules/keyword-spacing), [comma-style](https://eslint.org/docs/rules/comma-style)...

Prettier alleviates the need for this whole category of rules! Prettier is going to reprint the entire program from scratch in a consistent way, so it's not possible for the programmer to make a mistake there anymore :)

**Code-quality rules**: eg [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)...
**Code-quality rules**: eg [no-unused-vars](https://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](https://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](https://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](https://eslint.org/docs/rules/prefer-promise-reject-errors)...

Prettier does nothing to help with those kind of rules. They are also the most important ones provided by linters as they are likely to catch real bugs with your code!
2 changes: 1 addition & 1 deletion docs/configuration.md
Expand Up @@ -63,7 +63,7 @@ singleQuote = true

Overrides let you have different configuration for certain file extensions, folders and specific files.

Prettier borrows ESLint’s [override format](http://eslint.org/docs/user-guide/configuring#example-configuration).
Prettier borrows ESLint’s [override format](https://eslint.org/docs/user-guide/configuring#example-configuration).

JSON:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Expand Up @@ -18,7 +18,7 @@ Prettier is an opinionated code formatter with support for:
- [Markdown](https://commonmark.org/), including [GFM](https://github.github.com/gfm/) and [MDX](https://mdxjs.com/)
- [YAML](https://yaml.org/)

It removes all original styling[\*](#footnotes) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter))
It removes all original styling[\*](#footnotes) and ensures that all outputted code conforms to a consistent style. (See this [blog post](https://jlongster.com/A-Prettier-Formatter))

Prettier takes your code and reprints it from scratch by taking the line length into account.

Expand Down
2 changes: 1 addition & 1 deletion docs/integrating-with-linters.md
Expand Up @@ -124,7 +124,7 @@ Then in `tslint.json`:

### Disable formatting rules

[`stylelint-config-prettier`](https://github.com/prettier/stylelint-config-prettier) is a config that disables rules that conflict with Prettier. Add it to your `devDependencies`, then extend from it within your `.stylelintrc` configuration. Make sure to put it last in the `extends` array, so it gets the chance to override other configs.
[`stylelint-config-prettier`](https://github.com/prettier/stylelint-config-prettier) is a config that disables rules that conflict with Prettier. Add it to your [`devDependencies`], then extend from it within your `.stylelintrc` configuration. Make sure to put it last in the `extends` array, so it gets the chance to override other configs.

```bash
yarn add --dev stylelint-config-prettier
Expand Down
6 changes: 4 additions & 2 deletions docs/rationale.md
Expand Up @@ -132,9 +132,11 @@ One final thing: TC39 has [not yet decided if decorators come before or after `e

```js
@decorator
export class Foo { }
export class Foo {}

export @decorator class Foo { }
export
@decorator
class Foo {}
```

### Semicolons
Expand Down
2 changes: 1 addition & 1 deletion docs/technical-details.md
Expand Up @@ -3,7 +3,7 @@ id: technical-details
title: Technical Details
---

This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer with its algorithm replaced by the one described by Wadler in "[A prettier printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". There still may be leftover code from recast that needs to be cleaned up.
This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer with its algorithm replaced by the one described by Wadler in "[A prettier printer](https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". There still may be leftover code from recast that needs to be cleaned up.

The basic idea is that the printer takes an AST and returns an intermediate representation of the output, and the printer uses that to generate a string. The advantage is that the printer can "measure" the IR and see if the output is going to fit on a line, and break if not.

Expand Down
30 changes: 15 additions & 15 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "1.18.2",
"version": "1.20.0-dev",
"description": "Prettier is an opinionated code formatter",
"bin": {
"prettier": "./bin/prettier.js"
Expand All @@ -16,10 +16,10 @@
"dependencies": {
"@angular/compiler": "8.2.13",
"@babel/code-frame": "7.5.5",
"@babel/parser": "7.6.4",
"@babel/parser": "7.7.3",
"@glimmer/syntax": "0.41.0",
"@iarna/toml": "2.2.3",
"@typescript-eslint/typescript-estree": "2.6.0",
"@typescript-eslint/typescript-estree": "2.6.1",
"angular-estree-parser": "1.1.5",
"angular-html-parser": "1.3.0",
"camelcase": "5.3.1",
Expand All @@ -35,7 +35,7 @@
"esutils": "2.0.3",
"find-parent-dir": "0.3.0",
"find-project-root": "1.1.1",
"flow-parser": "0.89.0",
"flow-parser": "0.111.3",
"get-stream": "5.1.0",
"globby": "6.1.0",
"graphql": "14.5.8",
Expand All @@ -56,7 +56,7 @@
"n-readlines": "1.0.0",
"normalize-path": "3.0.0",
"parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
"postcss-less": "1.1.5",
"postcss-less": "2.0.0",
"postcss-media-query-parser": "0.2.3",
"postcss-scss": "2.0.0",
"postcss-selector-parser": "2.2.3",
Expand All @@ -67,23 +67,23 @@
"resolve": "1.12.0",
"semver": "6.3.0",
"string-width": "4.1.0",
"typescript": "3.7.1-rc",
"typescript": "3.7.2",
"unicode-regex": "3.0.0",
"unified": "8.4.1",
"vnopts": "1.0.2",
"yaml-unist-parser": "1.1.1"
},
"devDependencies": {
"@babel/core": "7.6.3",
"@babel/preset-env": "7.6.3",
"@babel/core": "7.7.2",
"@babel/preset-env": "7.7.1",
"@rollup/plugin-alias": "2.2.0",
"@rollup/plugin-replace": "2.2.0",
"@rollup/plugin-replace": "2.2.1",
"babel-loader": "8.0.6",
"benchmark": "2.1.4",
"builtin-modules": "3.1.0",
"codecov": "codecov/codecov-node#e427d900309adb50746a39a50aa7d80071a5ddd0",
"codecov": "3.6.1",
"cross-env": "6.0.3",
"eslint": "6.5.1",
"eslint": "6.6.0",
"eslint-config-prettier": "6.5.0",
"eslint-formatter-friendly": "7.0.0",
"eslint-plugin-import": "2.18.2",
Expand All @@ -96,10 +96,10 @@
"jest-snapshot-serializer-raw": "1.1.0",
"jest-watch-typeahead": "0.4.0",
"mkdirp": "0.5.1",
"prettier": "1.18.2",
"prettier": "1.19.0",
"prettylint": "1.0.0",
"rimraf": "3.0.0",
"rollup": "1.26.0",
"rollup": "1.26.3",
"rollup-plugin-babel": "4.3.3",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-json": "4.0.0",
Expand All @@ -111,7 +111,7 @@
"strip-ansi": "5.2.0",
"synchronous-promise": "2.0.10",
"tempy": "0.2.1",
"terser-webpack-plugin": "2.1.3",
"terser-webpack-plugin": "2.2.1",
"webpack": "4.41.2"
},
"scripts": {
Expand All @@ -130,6 +130,6 @@
"build": "node --max-old-space-size=3072 ./scripts/build/build.js",
"build-docs": "node ./scripts/build-docs.js",
"check-deps": "node ./scripts/check-deps.js",
"spellcheck": "npx -p cspell@4.0.31 cspell {bin,scripts,src}/**/*.js {docs,website/blog}/**/*.md CHANGELOG.unreleased.md"
"spellcheck": "npx -p cspell@4.0.31 cspell {bin,scripts,src}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md"
}
}
5 changes: 5 additions & 0 deletions scripts/build/shims/path.js
@@ -0,0 +1,5 @@
export function extname(path) {
const dotIndex = path.lastIndexOf(".");
if (dotIndex === -1) return "";
return path.slice(dotIndex);
}
2 changes: 0 additions & 2 deletions scripts/release/README.md
Expand Up @@ -3,8 +3,6 @@
## Usage

```sh
# set environment variable GITHUB_API_TOKEN if it's a patch release
# since we need to get merged PRs from GitHub to generate changelog
node ./scripts/release/release.js --version NEW_VERSION
```

Expand Down
2 changes: 1 addition & 1 deletion scripts/release/steps/update-changelog.js
Expand Up @@ -57,7 +57,7 @@ module.exports = async function({ version, previousVersion }) {
dedent(chalk`
{yellow.bold A manual step is necessary.}
You can copy the entries from {bold CHANGELOG.unreleased.md} to {bold CHANGELOG.md}
You can copy the entries from {bold changelog_unreleased/*/pr-*.md} to {bold CHANGELOG.md}
and update it accordingly.
You don't need to commit the file, the script will take care of that.
Expand Down
5 changes: 5 additions & 0 deletions scripts/release/steps/update-version.js
Expand Up @@ -16,6 +16,11 @@ async function bump({ version }) {
content.replace(/^(- Prettier Version: ).*?$/m, `$1${version}`)
);

// Update unpkg link in docs
processFile("docs/browser.md", content =>
content.replace(/(\/\/unpkg\.com\/prettier@)(?:.*?)\//g, `$1${version}/`)
);

await execa("yarn", ["update-stable-docs"], {
cwd: "./website"
});
Expand Down

0 comments on commit c3cfee8

Please sign in to comment.