-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add tips/hints to version test #5605
Conversation
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.
One whitespace nit and one refactoring opportunity, but LGTM and could be merged as is.
test/linter/test-versions.js
Outdated
@@ -103,12 +111,24 @@ function checkVersions(supportData, relPath, logger) { | |||
for (const statement of supportStatements) { | |||
if (!isValidVersion(browser, statement.version_added)) { |
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.
Would be nice to deduplicate these two blocks into a for ... of
loop:
for (const property of ['version_added', 'version_removed']) {
// ...
}
test/linter/test-versions.js
Outdated
@@ -103,12 +111,24 @@ function checkVersions(supportData, relPath, logger) { | |||
for (const statement of supportStatements) { | |||
if (!isValidVersion(browser, statement.version_added)) { |
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.
Would be nice to deduplicate these two blocks into a for ... of
loop:
for (const property of ['version_added', 'version_removed']) {
// ...
}
This pull request has merge conflicts that must be resolved before we can merge this. |
This PR introduces tips to the version linter for common mistakes contributors may make when creating a PR. This was inspired by a comment Daniel posted on a suggestion to rename "safari_ios" to "ios":
Well, here you go, @ddbeck -- one fresh addition of code hot off the grill! 😄