-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update prettier, change print width to 120, and enable dangling commas for functions #371
base: main
Are you sure you want to change the base?
Changes from all commits
3801e6d
180c5b4
4872ca8
51198b8
e62c878
c6b86de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSameLine": false, | ||
"bracketSpacing": true, | ||
"htmlWhitespaceSensitivity": "css", | ||
"printWidth": 250, | ||
"semi": true, | ||
"singleQuote": false, | ||
"tabWidth": 4, | ||
"trailingComma": "es5", | ||
"useTabs": false | ||
"printWidth": 120, | ||
"tabWidth": 4 | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's up with these DOCTYPE change? These don't seem desirable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comes from the prettier update to v3 (see https://prettier.io/blog/2023/07/05/3.0.0.html#html). There's also no option to disable this behavior. The doctype is case insensitive so IMO it's not important. I'm glad somebody else has an opinion about it so that I don't need to have one. |
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
@@ -18,13 +18,22 @@ | |
<div class="section-grid"> | ||
<h1 class="section-header">Speedometer 3 General Instructions</h1> | ||
<div class="section-content"> | ||
<p>To get reasonably accurate results your device and browser need to be focused on the benchmark. Here are some basic instructions to allow that:</p> | ||
<p> | ||
To get reasonably accurate results your device and browser need to be focused on the | ||
benchmark. Here are some basic instructions to allow that: | ||
</p> | ||
<ul class="compact"> | ||
<li>Ensure you are running the latest stable browser version.</li> | ||
<li>Prefer using a separate clean browser profile — extensions and non-default browser settings can have a large impact on the score.</li> | ||
<li> | ||
Prefer using a separate clean browser profile — extensions and non-default browser | ||
settings can have a large impact on the score. | ||
</li> | ||
<li>Don't run any programs in the background.</li> | ||
<li>Restart the browser and close all other tabs and windows.</li> | ||
<li>Keep the Speedometer page focused and do not interact with the device while running the benchmark.</li> | ||
<li> | ||
Keep the Speedometer page focused and do not interact with the device while running the | ||
benchmark. | ||
</li> | ||
<li>Keep your battery-powered device plugged into a charger.</li> | ||
<li>Some devices might need time to cool down between consecutive runs.</li> | ||
</ul> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we making all these other changes to prettier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can find out more if you look at the individual commits, as there's one commit for each logical change.
In short a lot of them are the defaults (see 3rd commit), except
printWidth
andtrailingComma
which are the changes by this PR.Changing
trailingComma
is beneficial because it makes better diffs: with the old style, there's no trailing comma, and therefore when function parameters or array properties or object properties are added or removed, the previous line also shows up in a diff. If it has a trailing comma, then it isn't changed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not removing the default ones would make this PR easier to review/less scary