Remove trailing whitespace from src/ and markdown files (#1576)
parent
13f247aee3
commit
8ce393a425
32
CHANGELOG.md
32
CHANGELOG.md
|
@ -184,22 +184,22 @@
|
|||
|
||||
[link](https://github.com/jlongster/prettier/compare/0.19.0...0.20.0)
|
||||
|
||||
* Fix extra parens for update expressions (#796)
|
||||
* Fix empty options (#803)
|
||||
* Eagerly evaluate `ifBreak` when processing template literals (fixes #795
|
||||
* Fix function declaration params comments (#802)
|
||||
* Update flow to 0.40 (#808)
|
||||
* Correct link for travis
|
||||
* Fix function call args (#809)
|
||||
* Properly support `do` (#811)
|
||||
* Do not put parenthesis around not named default export (#819)
|
||||
* Adds another preset to related projects (#820)
|
||||
* Fix trailing commas in docs (#825)
|
||||
* Put short body of arrow functions on the same line (#829)
|
||||
* Preserve new lines for comments after `=` (#830)
|
||||
* Fix indentation of a merged group (#828)
|
||||
* Migrate class comments to the beginning (#831)
|
||||
* Update list of related projects (#833)
|
||||
* Fix extra parens for update expressions (#796)
|
||||
* Fix empty options (#803)
|
||||
* Eagerly evaluate `ifBreak` when processing template literals (fixes #795
|
||||
* Fix function declaration params comments (#802)
|
||||
* Update flow to 0.40 (#808)
|
||||
* Correct link for travis
|
||||
* Fix function call args (#809)
|
||||
* Properly support `do` (#811)
|
||||
* Do not put parenthesis around not named default export (#819)
|
||||
* Adds another preset to related projects (#820)
|
||||
* Fix trailing commas in docs (#825)
|
||||
* Put short body of arrow functions on the same line (#829)
|
||||
* Preserve new lines for comments after `=` (#830)
|
||||
* Fix indentation of a merged group (#828)
|
||||
* Migrate class comments to the beginning (#831)
|
||||
* Update list of related projects (#833)
|
||||
* Allow breaking for logical expressions in member chains (#827)
|
||||
|
||||
# 0.19.0
|
||||
|
|
|
@ -161,9 +161,9 @@ Note that `--write` cannot be used with `--debug-check`.
|
|||
|
||||
#### Pre-commit hook for changed files
|
||||
|
||||
You can use this with a pre-commit tool. This can re-format your files that are marked as "staged" via `git add` before you commit.
|
||||
You can use this with a pre-commit tool. This can re-format your files that are marked as "staged" via `git add` before you commit.
|
||||
|
||||
##### 1. [lint-staged](https://github.com/okonet/lint-staged)
|
||||
##### 1. [lint-staged](https://github.com/okonet/lint-staged)
|
||||
|
||||
Install it along with [husky](https://github.com/typicode/husky):
|
||||
|
||||
|
@ -201,9 +201,9 @@ Just copy the following config in your pre-commit config yaml file
|
|||
hooks:
|
||||
- id: prettier
|
||||
additional_dependencies: ['prettier@1.1.0']
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
Find more info from [here](https://github.com/awebdeveloper/pre-commit-prettier)
|
||||
|
||||
##### 3. bash script
|
||||
|
|
|
@ -8,7 +8,7 @@ Go to *File | Settings | Tools | External Tools* for Windows and Linux or *WebSt
|
|||
|
||||
> If on the other hand you have `prettier` installed locally, replace the **Program** with `./node_modules/.bin/prettier` (on OS X and Linux) or `.\node_modules\.bin\prettier.cmd` (on Windows).
|
||||
|
||||
* **Parameters** set `--write [other opts] $FilePathRelativeToProjectRoot$`
|
||||
* **Parameters** set `--write [other opts] $FilePathRelativeToProjectRoot$`
|
||||
* **Working directory** set `$ProjectFileDir$`
|
||||
|
||||
![Example](https://raw.githubusercontent.com/prettier/prettier/master/editors/jetbrains/with-prettier.png)
|
||||
|
@ -16,7 +16,7 @@ Go to *File | Settings | Tools | External Tools* for Windows and Linux or *WebSt
|
|||
### Process directories
|
||||
|
||||
* Clone the External tool created above and name it `Prettier Directories`
|
||||
* **Parameters** set `--write [other opts] $FileDirRelativeToProjectRoot$/**/(*.js|*.jsx)`
|
||||
* **Parameters** set `--write [other opts] $FileDirRelativeToProjectRoot$/**/(*.js|*.jsx)`
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -36,5 +36,5 @@ To automatically format using `prettier` on save, you can use a file watcher.
|
|||
Go to *File | Settings | Tools | File Watchers* for Windows and Linux or *WebStorm | Preferences | Tools | File Watchers* for OS X and click **+** to add a new tool. Let’s name it **Prettier**.
|
||||
|
||||
* **Program** set the full path to a `prettier` executable, such as `/Users/developer/repo/jest/node_modules/.bin/prettier` (on OS X and Linux) or `C:/\Users\developer\repo\jest\node_modules\.bin\prettier.cmd` (on Windows).
|
||||
* **Parameters** set `--write [other opts] $FilePath$`
|
||||
* **Parameters** set `--write [other opts] $FilePath$`
|
||||
* **Working directory** set `$ProjectFileDir$`
|
||||
|
|
|
@ -288,7 +288,7 @@ function printDocToString(doc, options) {
|
|||
out[out.length - 1] = out[out.length - 1].replace(
|
||||
/[^\S\n]*$/,
|
||||
""
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue