Skip to content

Commit 8236921

Browse files
authored
chore: update prettier to 2.1.2 (#1774)
1 parent 66d28c2 commit 8236921

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"jest": "26.6.3",
2828
"jest-runner-eslint": "0.10.1",
2929
"jest-snapshot-serializer-raw": "^1.1.0",
30-
"prettier": "^2.0.0",
30+
"prettier": "2.1.2",
3131
"rollup": "^2.7.5",
3232
"rollup-plugin-alias": "^2.0.0",
3333
"rollup-plugin-babel": "^4.3.2",

src/printer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ function printLines(path, options, print, childrenAttribute = "children") {
11021102
const beforeCloseTag = lastNode
11031103
? concat([
11041104
hasNewlineInRange(
1105-
options.originalText,
1105+
options.originalText.trimEnd(),
11061106
options.locEnd(lastNode),
11071107
options.locEnd(node)
11081108
)

tests/markdown/__snapshots__/jsfmt.spec.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ $foo = "bar";
103103
\`\`\`
104104
105105
\`\`\`php
106+
106107
\`\`\`
107108
108109
\`\`\`php
@@ -170,6 +171,7 @@ if (true) {
170171
echo "bar";
171172
?>
172173
test
174+
173175
\`\`\`
174176
175177
================================================================================

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4667,10 +4667,10 @@ prettier-linter-helpers@^1.0.0:
46674667
dependencies:
46684668
fast-diff "^1.1.2"
46694669

4670-
prettier@^2.0.0:
4671-
version "2.0.5"
4672-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
4673-
integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
4670+
prettier@2.1.2:
4671+
version "2.1.2"
4672+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
4673+
integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
46744674

46754675
pretty-format@^26.6.2:
46764676
version "26.6.2"

0 commit comments

Comments
 (0)