-
Notifications
You must be signed in to change notification settings - Fork 22
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
Modify config to have overrides that correspond to multiple file types #368
Conversation
🦋 Changeset detectedLatest commit: f15fe7d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool 😍 do you want me to test this against dotcom, or did you already give it a go?
I already tested in dotcom, going to test in PVC and PCSS also |
Currently the config is optimized for
.scss
files. As when this package was created we were only using these files for styling. We now have other ways of styling that we need to lint.This pull request aims to refactor the config to adapt for all package styles.
.scss
modules.css
.pcss
postcss.tsx
styled react componentsTo accomplish this, I utilized stylelint's overrides options for changing rules and syntax for other versions.
The config now starts with general rules that can be applied to all situations. These rules are meant to be turned on in all the config file types.
stylelint-config/index.js
Lines 42 to 112 in 91d79a7
After that I have a config for each type in the overrides:
SCSS
stylelint-config/index.js
Lines 114 to 128 in 91d79a7
Styled react components
stylelint-config/index.js
Lines 129 to 161 in 91d79a7
PostCSS
stylelint-config/index.js
Lines 162 to 182 in 91d79a7
CSS Modules
stylelint-config/index.js
Lines 183 to 188 in 91d79a7