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

Stylelint for all the SCSS files #196

Merged
merged 2 commits into from
Jul 4, 2019
Merged

Stylelint for all the SCSS files #196

merged 2 commits into from
Jul 4, 2019

Conversation

whyboris
Copy link
Owner

@whyboris whyboris commented Jul 2, 2019

Stylelint is awesome for keeping all the CSS properties alphabetized for easier reference 👍

Now you can run npm run lint:scss:fix to fix all the SCSS 🚀

There are some do not alphabetize comments in the code I'll need to double-check and make sure nothing broke visually 😅

update: all works fine ✅

@@ -151,14 +151,14 @@ $sidebar-width: 190px;
box-sizing: border-box;
height: 100vh;
max-width: $sidebar-width !important;
// don't alphabetize for some reason
Copy link
Owner Author

Choose a reason for hiding this comment

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

I'll need to check this manually 🙆‍♂

Copy link
Owner Author

Choose a reason for hiding this comment

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

Resolved ✅


background: $gray-15;
border: 1px solid $gray-30; // don't alphabetize this one
Copy link
Owner Author

Choose a reason for hiding this comment

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

Check manually

Copy link
Owner Author

Choose a reason for hiding this comment

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

Resolved ✅

@whyboris whyboris merged commit 58f3345 into master Jul 4, 2019
@whyboris whyboris deleted the stylelint branch July 4, 2019 01:53
@@ -34,7 +34,9 @@
"electron:local": "npm run build:prod && electron .",
"electron:linux": "npm run build:prod && electron-builder build --linux",
"electron:windows": "npm run build:prod && electron-builder build --windows",
"electron:mac": "npm run build:prod && electron-builder build --mac"
"electron:mac": "npm run build:prod && electron-builder build --mac",
"lint:scss": "stylelint \"./src/**/*.scss\"",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should include this in one of the building commands above? 🤔

Copy link
Owner Author

Choose a reason for hiding this comment

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

Would be good to automate the lint sometime, but I don't think it would be a good idea during the build.

I see the lint as a general house-cleaning procedure to keep our SCSS organized (more-readable / easier to search through). It's not important for the built app.

The biggest problem is that since the lint alphabetizes things, some properties might override the behavior of others above, resulting in an incorrect display of some elements. I'd rather have the build come out as-close to the dev environment as possible 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

To be clear, I meant lint:scss just to display the warnings (I assume that's what it does), rather than the lint:scss:fix version to actually change the code! 👍

That way you're more likely to notice, oh, I should change that, rather than remembering to run the linter! 😅

@whyboris whyboris mentioned this pull request Jul 28, 2019
16 tasks
@whyboris whyboris mentioned this pull request Aug 26, 2019
16 tasks
@whyboris whyboris mentioned this pull request Oct 11, 2019
10 tasks
@whyboris whyboris mentioned this pull request Feb 16, 2020
4 tasks
@whyboris whyboris mentioned this pull request Dec 15, 2020
1 task
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