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 ErbLint for view linting #90

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Add ErbLint for view linting #90

merged 2 commits into from
Jul 2, 2024

Conversation

tdooner
Copy link
Contributor

@tdooner tdooner commented Jul 1, 2024

Ticket

N/A - I realized we should do these when giving Joe some CR feedback.

Changes

  • Add erb-linter to lint ERB files
  • Add rubocop config to enforce 2-space indents

Context for reviewers

Erblint is the standard way to lint Erb views. I've disabled the SpaceInHtmlTag linter because it forbids putting the close angle bracket on the subsquent line, e.g.:

<div
  attribute="value"
>
  <p>...</p>
</div>

Personally, I find that more readable than if the > were on the same line as attribute="value".

Testing

It should run as part of this PR.

@allthesignals allthesignals self-requested a review July 2, 2024 14:54
Ruby is universally 2-space indent. This commit enables the linter for
that and also the linter to ensure there is no indent after `private` or
`protected` access modifiers.
@tdooner tdooner merged commit 3072ff4 into main Jul 2, 2024
4 checks passed
@tdooner tdooner deleted the td/improve-linters branch July 2, 2024 17:52
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.

None yet

3 participants