-
Notifications
You must be signed in to change notification settings - Fork 72
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
Replace sass-lint
with stylelint
#949
base: main
Are you sure you want to change the base?
Conversation
bump stylelint-config-standard-scss: 10.0.0 Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
sass-lint
with stylelint
sass-lint
with stylelint
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.
Looks pretty good so far, just a few comments I had on first inspection
# recommended to turn off descending specificity since we use a lot of nesting: | ||
# https://stylelint.io/user-guide/rules/list/no-descending-specificity/ | ||
no-descending-specificity: null |
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.
It might be nice to have a selector ordering rule. We should look into this further to see how much work it would be and if we should do it in the first place
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.
We could handle it as separate task
@@ -177,7 +179,7 @@ $elasticLogoTextDark: #1C1E23; | |||
} | |||
|
|||
.guideDemo__ghostBackground { | |||
@if (lightness($ouiTextColor) < 50) { | |||
@if lightness($ouiTextColor) < 50 { |
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.
Why the extra space here? There seem to be a lot of these? Is it just an artifact of yarn lint-sass-fix
?
@if lightness($ouiTextColor) < 50 { | |
@if lightness($ouiTextColor) < 50 { |
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.
It is artifact from yarn lint-style --fix
. I was wondering to fix it with prettier
. But we need to update prettier
first and that is separate task.
I tend to avoid manual intervention and keep it as is for now. Prettier would reformat it later
src-docs/src/theme_dark.scss
Outdated
@@ -10,9 +10,8 @@ | |||
*/ | |||
|
|||
// sass-lint:disable no-url-domains, no-url-protocols |
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.
Would love to get rid of old sass-lint
disables
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.
sass-lint
has been removed from the codebase
Signed-off-by: Danila Gulderov <[email protected]>
…earch-project#119) Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
sass-lint
with stylelint
sass-lint
with stylelint
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
https://github.com/opensearch-project/oui/actions/runs/5759821731/job/15628275259?pr=949#step:5:13 Do you know why the linter is failing in CI? Does it need to be rerun? |
Signed-off-by: Danila Gulderov <[email protected]>
@BSFishy I removed the quotes to try and fix CI |
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Love to see the CI is passing, gives me a lot more confidence in this. Will re-review and approve if everything looks good |
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.
Overall looks good, will pull down and play around with it then approve
"lint-style": "stylelint \"{src,src-docs}/**/*.scss\" --max-warnings 0", | ||
"lint-style-fix": "yarn lint-style --fix", |
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.
Curious if this will cause anything unintended to break. All CI passes, but I wonder if anyone else is using these commands that we don't know about. Either way, I don't think it's something we really need to worry about for breaking things ~ this is more meant for dev anyway
@@ -216,6 +210,7 @@ | |||
"moment-timezone": "^0.5.41", | |||
"node-sass": "npm:@amoo-miki/[email protected]", | |||
"pegjs": "^0.10.0", | |||
"postcss": "^8.4.28", |
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.
I am astonished that we were using postcss
without specifying it as a dep 🤦
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.
Just a few minor final things
build | ||
target |
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.
We have a few artifact directories:
dist
docs
es
lib
test-env
types
Additionally, would node_modules
be a good choice to be here?
# while we still use node-sass, only legacy rgb() notation is allowed | ||
color-function-notation: "legacy" |
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.
Will need to followup on this for #1001
Description
sass-lint
is an unmaintained projectPlease review the migration to
stylelint
. Which includes the following steps:yarn lint-style
yarn lint-style --fix
was run to auto fix everything possibleIssues Resolved
resolves #119
Check List
yarn lint
yarn test-unit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.