Problem/Motivation
Our styleling configuration tries to lint all files matching pattern: **/*.css. This matches both, generated and ungenerated files. We shouldn't lint generated CSS files because they should be only changed by the compiler.
Proposed resolution
I have at least two potential ways to solve this. We could check if the .css file has a PostCSS file associated to it. Another approach would be to add an identifier to generated filenames and to use --ignore-pattern.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3087006-15.patch | 617 bytes | longwave |
Comments
Comment #2
alexpottWhat do we do for JS? We have the same thing with .es6.js and .js no?
Comment #3
lauriiiWe have this in the .eslintignore:
However, this is different because we switched into using ES6 consistently across all files. This is not the case for PostCSS. Therefore we can't use pattern like
!*.pcss.css.Comment #11
longwaveThis has been solved by adding rules to .stylelintignore, should we just close this?
Comment #12
alexpottAlso since #3314523: PostCSS results in CSS that does not comply with our coding standards our generated CSS actually complies with out stylelint rules so in fact we could remove .stylelintignore
Unfortunately though there is one issue...
This is cause by our final css looking like this:
Not sure why the new line is getting inserted.
Comment #13
longwave#12 refers to an IE11 specific rule, so we can remove that now: #3321004: Remove IE11 hack from fieldset.css - postponing on that issue.
Comment #14
longwave#3321004: Remove IE11 hack from fieldset.css landed so we should now be able to remove .stylelintignore.
Comment #15
longwaveSo we can drop .stylelintignore in 10.x, as all our CSS conforms to standards now; with this patch applied:
Comment #16
smustgrave commentedCame across this during the review cleanup and the change looks good!
Comment #17
alexpottComment #18
alexpottCommitted and pushed 3385a4070e to 10.1.x and 3371fa4ccf to 10.0.x. Thanks!