ER: Fix needed for conflicts scss-lint.yml and .stylelint.json #5048
Labels
Added to dev/pm agenda
Bug
Something isn't working
Complexity: Large
Draft
Issue is still in the process of being created
ER
Emergent Request
Feature: Refactor CSS
Page is working fine - CSS needs changes to become consistent with other pages
role: back end/devOps
Tasks for back-end developers
size: 0.25pt
Can be done in 0.5 to 1.5 hours
size: 3pt
Can be done in 13-18 hours
Milestone
Emergent Requirement - Problem
lint-scss.yml
action returned an error when PR Updated scss to only target h2 on privacy policy page #4945 (fixes Change h2 margin on Privacy Policy Page #4864) was opened. Note that the error message does not refer to code that was changed, but rather that the linter does not recognize scss syntax. We need to implement a fix so that github/super-linter v5.0.0 recognizes and lints scss.Additional Details
github/super-linter
was updated to v5.0.0 last week, thus the error is likely related to the updated version..stylelint.json
Log screenshot for Lint SCSS action
See lines 76-79:Issue you discovered this emergent requirement in
Date discovered
7/19/23
Did you have to do something temporarily
Who was involved
@t-will-gillis @ronaldpaek @angelenelm
What happens if this is not addressed
An error will be raised every time
lint-scss.yml
runs on an scss file. Furthermore, when the linter raises errors inappropriately it is not functioning as a check on the scss code.Resources
Recommended Action Items
Potential solutions [draft]
Recommended starting point- Caution: the following is not a complete solution yet.:
or
"no-extra-semicolons": true
. This prop is deprecated.Doing the above and running the linter on _privacy-policy.scss will result in successfully implementing scss syntax in the linter, but will also cause an error on line 30 saying that "map-get" should be replaced with "map.get". The Sass Migrator can be used to fix the issue with "map" and will satisfy
lint.scss.yml
as can be seen in this log.Log screenshot for Lint SCSS after the above edits (with "map-get")
.stylelintrc.json
do successfully address the "CssSyntaxError" and the note that "...you should use the 'customSyntax'map-get
).sass-migrator --migrate-deps module main.scss
. As shown includes options for tracing the modules/ dependencies throughout the entire codebase. The Migrator will trace and refactor all scss files on the website, using more recent syntax such as:Post Sass Migrator
CONCLUSION: I think that all of the above could be done and this could be fixed, but we may want to discuss whether this is worth the time and energy to 'fix' a problem (i.e. with the linter telling us incorrectly that there are errors ) that is not currently effecting the website.
Updating the Sass/scss syntax might be a worthwhile endeavor but it appears that this will be a major project.
Recent log run after Sass Migrator
Additional comments below
-See comments below
The text was updated successfully, but these errors were encountered: