Skip to content

Commit

Permalink
fix: strf-11280 Exclude any css files from scss validation (#1137)
Browse files Browse the repository at this point in the history
  • Loading branch information
jairo-bc authored Oct 4, 2023
1 parent 325b24c commit e40c9f9
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 140 deletions.
4 changes: 4 additions & 0 deletions lib/ScssValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class ScssValidator {
const filePath = item[1].slice(1, -1);
const fileName = this.tryToResolveCssFileLocation(filePath);
if (
fileName &&
!this.isStyleSheetAComment(content, filePath) &&
!cssFiles.includes(fileName)
) {
Expand Down Expand Up @@ -107,6 +108,9 @@ class ScssValidator {
for (const location of possibleLocations) {
const fullFilePath = path.join(this.themePath, location);
if (fs.existsSync(fullFilePath)) {
if (fullFilePath.endsWith('.css')) {
return null;
}
if (!this.isRootCssFile(location)) {
return this.getCssFileWithoutRootFolder(location);
}
Expand Down
Loading

0 comments on commit e40c9f9

Please sign in to comment.