A couple of weeks ago erblint
and the corresponding lint-staged
hook were added to the project.
But for now there is a huge linting debt in the *.html.erb
files. You can learn more about how it could affect the project and the contributions to it from the discussion #1828 .
Volunteers could help the project to eliminate the debt or make it smaller.
You can get the list of the linting issues running:
bundle exec erblint --lint-all
Get the list for of issues for the specific file or directory:
bundle exec erblint app/views/%path_to_file_or_directory%
You can use --autocorrect
flag, but be careful with it, cause it sometimes fixes indentation incorrectly.
I would recommend running
bundle exec erblint --autocorrect %path_to_file%` and check manually if the fixes are correct.
Please, keep the pull requests small, so they could be reviewed faster. E.g. a separate pull request for each of the app/views/
folder (e.g. app/views/comments
).
If there're some issues you can't fix, please, leave a comment to this issue, or commit with a --no-verify
flag and mention it in your pull request.
I would appreciate your help with this issue.
I will probably start working on this this weekend (not sure if you can assignee an issue to me), if anyone wants to help please check if I am not already working on that specific folder.
Hello 馃憢 I'd like to start working on fixing the linting issues for the views in app/views/additional_content_boxes
.
Update: Done in #1843 馃樃
Currently fixing linting issues for app/views/admin
files.
Update: Done in #1871
Like the idea of using this thread to coordinate, thanks @lightalloy !
@arnellebalane in lots of files there are also HTML errors, if you find any please also fix them.
As I mentioned here:
https://github.com/thepracticaldev/dev.to/issues/1828#issuecomment-465199995
@Glennmen Noted, thanks for pointing that out! I'll keep an eye on errors like those in the views as I go along fixing linting issues in them 馃憤
Working on app/views/articles
I thought it might be helpful to add a checklist:
*.html.erb
files)Not sure if this is correct but it is kinda strange that app/views/homepage/
only contains an empty file.
Currently fixing linting issues for app/views/html_variants
files.
Update: Done in #1872
Currently fixing linting issues for app/views/internal
files.
Update: Done in #1873 and #1882
Currently fixing linting issues for app/views/layouts
files.
Update: Done in #1884
@arnellebalane If the PR still has open errors submit it as a Draft PR or add [WIP]
in the PR title.
Unless project maintainers say it is fine to merge PR's with open linting errors.
@Glennmen Thanks, I've updated my existing PRs with errors to start with [WIP]
in their titles 馃憤
Currently fixing linting issues for app/views/mailers
files.
Update: Done in #1889
Currently fixing linting issues for app/views/moderations
files.
Update: Done in #1900
@maestromac you are a fast reviewer 馃槀
I hope I didn't miss anything, once we do a general sweep through all folders I will go through each one again to double check for HTML errors.
It feels great reviewing/merging lint fixes 馃槃
These PRs doesn't have to fix _everything_. And yeah, can always run the linter again on the whole views folder to see what's left.
@maestromac Problem is that the linter doesn't catch HTML errors, I am trusting Jetbrains to help me find HTML errors.
Just need to jump in a say that this is amazing. Thanks everyone 馃檶
Currently fixing linting issues for app/views/reading_list_items
.
Update: Done in #1902
Currently fixing linting issues for app/views/social_previews
.
Update: Done in #1903
Currently fixing linting issues for app/views/stories
.
Update: Done in #1904
Currently fixing linting issues for app/views/stripe_subscriptions
.
Update: Done in #1905
Currently fixing linting issues for app/views/tags
.
Update: Done in #1906
Currently fixing linting issues for app/views/users
.
Update: Done in #1908
app/views/videos
is for me 馃槀
At this rate in a couple of days you all will be done! Amazing!
@rhymes All PR's have been made 馃ぃ all in review now and ready for merge.
As this issue is reaching it's final stages I would like to say thank you to @arnellebalane for helping me out in going through all the views and fixing all errors.
Also thank you to @lightalloy, @maestromac and @Zhao-Andy for reviewing the PR's and getting them merged this fast.
An extra thank you to @lightalloy for providing extra assistance for any linting error that we couldn't solve.
Also I would like to ask how can this be avoided in the future? How can we know for sure that the PR has ran through the pre-commit check without skipping it.
Maybe this is a discussion for #1828
@Glennmen I think that if the bulk of changes have been dealt with, now the percentage of "unrelated style corrections" shall greatly diminish, lowering in return the times people will skip the pre-commit check. At least in theory
Great work by the way!
I believe everything is merged. Anything else missing?
@maestromac I would like to do a final sweep through all views files before closing this.
Everything is merged yay! 馃挴
Most helpful comment
I will probably start working on this this weekend (not sure if you can assignee an issue to me), if anyone wants to help please check if I am not already working on that specific folder.