From e788e8d3d5a45318862af7f719c798573ae4c5c8 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 9 Nov 2019 01:09:19 +0100 Subject: [PATCH] Release 1.19.0 --- .github/ISSUE_TEMPLATE/formatting.md | 2 +- .github/ISSUE_TEMPLATE/integration.md | 2 +- CHANGELOG.md | 6 +++++ docs/browser.md | 12 +++++----- package.json | 2 +- website/versioned_docs/version-stable/api.md | 4 +++- .../versioned_docs/version-stable/browser.md | 22 ++++++++++--------- website/versioned_docs/version-stable/cli.md | 4 +--- .../version-stable/comparison.md | 4 ++-- .../version-stable/configuration.md | 2 +- .../versioned_docs/version-stable/index.md | 2 +- .../integrating-with-linters.md | 2 +- .../versioned_docs/version-stable/options.md | 15 +++++++++++++ .../versioned_docs/version-stable/plugins.md | 1 + .../version-stable/technical-details.md | 2 +- .../versioned_docs/version-stable/webstorm.md | 2 +- 16 files changed, 54 insertions(+), 30 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index 14ee37160172..0b6612c31843 100644 --- a/.github/ISSUE_TEMPLATE/formatting.md +++ b/.github/ISSUE_TEMPLATE/formatting.md @@ -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): diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 2c3f5e852154..9e9cf5057d82 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -19,7 +19,7 @@ BEFORE SUBMITTING AN ISSUE: --> **Environments:** -- Prettier Version: 1.18.2 +- Prettier Version: 1.19.0 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index 57342784afe6..79b4c778d24b 100644 --- a/CHANGELOG.md +++ b/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) diff --git a/docs/browser.md b/docs/browser.md index 3a4abf94a2a9..5492a3a5d0e7 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -16,8 +16,8 @@ See [Usage](#usage) below for examples. ### Global ```html - - + + - - + + ``` @@ -41,8 +43,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 }); }); @@ -61,7 +63,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 }); ``` diff --git a/website/versioned_docs/version-stable/cli.md b/website/versioned_docs/version-stable/cli.md index 9b483dd37235..dc0136310f13 100644 --- a/website/versioned_docs/version-stable/cli.md +++ b/website/versioned_docs/version-stable/cli.md @@ -18,7 +18,7 @@ In practice, this may look something like: prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" ``` -Don't forget the quotes around the globs! The quotes make sure that Prettier expands the globs rather than your shell, for cross-platform usage. The [glob syntax from the `fast-glob` module](https://github.com/mrmlnc/fast-glob/blob/master/README.md#pattern-syntax) is used. +Don't forget the quotes around the globs! The quotes make sure that Prettier expands the globs rather than your shell, for cross-platform usage. The [glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) is used. Prettier CLI will ignore files located in `node_modules` directory. To opt-out from this behavior use `--with-node-modules` flag. @@ -149,8 +149,6 @@ Prettier CLI will ignore files located in `node_modules` directory. To opt-out f This rewrites all processed files in place. This is comparable to the `eslint --fix` workflow. -To avoid re-checking unchanged files, use the `--only-changed` flag. - ## `--loglevel` Change the level of logging for the CLI. Valid options are: diff --git a/website/versioned_docs/version-stable/comparison.md b/website/versioned_docs/version-stable/comparison.md index f356e2eec3b6..8d02eff6bef0 100644 --- a/website/versioned_docs/version-stable/comparison.md +++ b/website/versioned_docs/version-stable/comparison.md @@ -8,10 +8,10 @@ original_id: comparison 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! diff --git a/website/versioned_docs/version-stable/configuration.md b/website/versioned_docs/version-stable/configuration.md index 9028ed59ed3c..384c82f81dd0 100644 --- a/website/versioned_docs/version-stable/configuration.md +++ b/website/versioned_docs/version-stable/configuration.md @@ -64,7 +64,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: diff --git a/website/versioned_docs/version-stable/index.md b/website/versioned_docs/version-stable/index.md index 0de7d5d10abf..c373e77e5f59 100644 --- a/website/versioned_docs/version-stable/index.md +++ b/website/versioned_docs/version-stable/index.md @@ -19,7 +19,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. diff --git a/website/versioned_docs/version-stable/integrating-with-linters.md b/website/versioned_docs/version-stable/integrating-with-linters.md index a6b762f5bf57..e310e0e1bbc9 100644 --- a/website/versioned_docs/version-stable/integrating-with-linters.md +++ b/website/versioned_docs/version-stable/integrating-with-linters.md @@ -125,7 +125,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 diff --git a/website/versioned_docs/version-stable/options.md b/website/versioned_docs/version-stable/options.md index 170a96fcf96c..b88cd4aeaaae 100644 --- a/website/versioned_docs/version-stable/options.md +++ b/website/versioned_docs/version-stable/options.md @@ -308,6 +308,21 @@ Valid options: | ------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- | | `"css"` | --html-whitespace-sensitivity | htmlWhitespaceSensitivity: "" | +## Vue files script and style tags indentation + +_First available in v1.19.0_ + +Whether or not to indent the code inside `