Skip to content

Commit 12189bf

Browse files
committed
Bug 1826062 - Upgrade Prettier to 2.8.8. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D177026
1 parent c987af1 commit 12189bf

File tree

4 files changed

+17
-22
lines changed

4 files changed

+17
-22
lines changed

package-lock.json

Lines changed: 10 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"eslint-plugin-react-hooks": "4.6.0",
2626
"eslint-plugin-spidermonkey-js": "file:tools/lint/eslint/eslint-plugin-spidermonkey-js",
2727
"jsdoc": "4.0.2",
28-
"prettier": "2.0.5",
28+
"prettier": "2.8.8",
2929
"stylelint": "^15.6.0",
3030
"stylelint-config-recommended": "^12.0.0",
3131
"yarn": "1.22.19"

tools/lint/eslint/__init__.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,11 @@ def lint(paths, config, binary=None, fix=None, rules=[], setup=None, **lintargs)
114114
binary,
115115
os.path.join(module_path, "node_modules", "prettier", "bin-prettier.js"),
116116
"--list-different",
117+
"--no-error-on-unmatched-pattern",
117118
]
118119
+ extra_args
119120
# Prettier does not support exclude arguments.
120121
# + exclude_args
121-
# Prettier only supports this from 2.3 and above (bug 1826062).
122-
# + "--no-error-on-unmatched-pattern",
123122
+ paths
124123
)
125124
log.debug("Prettier command: {}".format(" ".join(cmd_args)))
@@ -223,17 +222,10 @@ def run_prettier(cmd_args, config, fix):
223222
errors = [
224223
error
225224
for error in errors
226-
if not (
227-
"No supported files were found" in error
228-
or "No files matching the pattern were found" in error
229-
# Unknown options are not an issue for Prettier, this avoids
230-
# errors during tests.
231-
or "Ignored unknown option" in error
232-
)
225+
# Unknown options are not an issue for Prettier, this avoids
226+
# errors during tests.
227+
if not ("Ignored unknown option" in error)
233228
]
234-
# --no-error-on-unmatched-pattern was only added in Prettier 2.3,
235-
# when we upgrade to the latest version (bug 1826062), we can pass in
236-
# that argument and remove this check.
237229
if len(errors):
238230
print(PRETTIER_ERROR_MESSAGE.format("\n".join(errors)))
239231

tools/lint/eslint/manifest.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[
22
{
33
"filename": "eslint.tar.gz",
4-
"size": 25695117,
4+
"size": 25984466,
55
"algorithm": "sha512",
6-
"digest": "bf0380a802a31ea3d7f9228a4d94a8f08c07dd5bf687247b15f7c8fb1e1c547ab791e4023e3cf20a91fb39a40dffeba1624c7ad168da01c5328263b20ae65624",
6+
"digest": "6a06bc35ebf8b6e523f23aba3a23f02a79eec61baa1bc39287672baac09c03f9f38c26b8c385bc5a8b02d11630aa5b9c700761ac86cbb19a40f5bc0f6cbff87c",
77
"unpack": true,
88
"visibility": "public"
99
}

0 commit comments

Comments
 (0)