Skip to content
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 max line length of 120 to linter #1524

Merged
merged 2 commits into from
Feb 7, 2023
Merged

Conversation

angelapwen
Copy link
Contributor

@angelapwen angelapwen commented Feb 6, 2023

This change adds the max-len property to the linter, which will enforce a maximum of 120 characters per line. It also ignores URLs, strings, and template literals in case these cases exceed 120 characters.

We also have the option to ignore all comments, or just trailing comments (https://eslint.org/docs/latest/rules/max-len). I have left those out for now but am open to adding them! The PR also fixes some comments that have exceeded the 120 character limit.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@angelapwen angelapwen requested a review from a team as a code owner February 6, 2023 19:03
aeisenberg
aeisenberg previously approved these changes Feb 6, 2023
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. My understanding is that the linting rules here are copied from gh/gh. I think it's generally ok to become stricter than gh/gh, but not more lenient. So, this PR LGTM.

henrymercer
henrymercer previously approved these changes Feb 6, 2023
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Perhaps we can look to remove the ignore* settings as we go forwards, but we should prioritize this alongside re-enabling the rules we disabled while transitioning to eslint at the bottom of the file.

@angelapwen
Copy link
Contributor Author

Had to rebase main in so requesting re-review!

@angelapwen angelapwen enabled auto-merge (squash) February 6, 2023 22:07
Comment on lines +90 to +91
/** Whether the relevant tools dotcom feature flags have been misconfigured.
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For next time (I don't think this is worth a recompiling and rerunning the checks for)

Suggested change
/** Whether the relevant tools dotcom feature flags have been misconfigured.
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
/**
* Whether the relevant tools dotcom feature flags have been misconfigured.
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the change in this PR: #1532

@angelapwen angelapwen merged commit 81644f3 into github:main Feb 7, 2023
@github-actions github-actions bot mentioned this pull request Feb 8, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants