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

Introduce scss linting to codebase #3703

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

blyedev
Copy link

@blyedev blyedev commented Nov 22, 2024

Description

Disclaimer: this PR is purely the result of the fact i was experimenting with tooling and needed a larger codebase to do so.

In here I add stylelint which allows you to spot issues in your scss such as duplicate selectors, prefixes that shouldn't be there because of tools like autoprefixer and many others. Each issue comes with a rule name which has some solid reasoning behind it on their website.

Judging by the current output it needs fine tuning to adjust to the code-base conventions such as selector-case since there's a lot of classes with camel case. But given scss conventions maintainers might elect to conform to the recommended rules.

Perhaps the coolest part of this PR though: The formatter on the lint:scss:ci script makes GitHub highlight all errors directly in the code so you get something akin to an automatic code review. So if you enable GitHub actions on my PR you will see every error raised without having to run it locally

From the 1800 issues about 800 are auto-fixable, I did not do that in this PR because I do not know this code-base nearly well enough to do so confidently but if I receive approval I will gladly fix all the issues mentioned by the linter

Issues Resolved

List any existing issues this PR resolves

Check List

  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello there blyedev! 👋

Thank you and congrats 🎉 for opening your first PR on this project! ✨ 💖

We will try to review it soon!

@johannesjo
Copy link
Owner

Hey there! Thank you very much for opening up this PR. While I support adding stylelint I am currently developing a bigger new feature, which I like to merge back to master before doing such a wide ranging change. Would it be alright if I ping you once that is done?

@blyedev
Copy link
Author

blyedev commented Nov 24, 2024

Sure

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.

2 participants