Problem/Motivation
Follow-up to #2865971: Use stylelint as opposed to csslint in core. Configure the function-name-case to be consistent with https://www.drupal.org/docs/develop/standards/css/css-coding-standards
Proposed resolution
Brief instructions on running stylelint - you'll need npm...
All the commands below take place in DRUPAL_ROOT/core
To install stylelint
npm install
This will install Drupal 8's npm dependencies of which stylelint is one.
To run it on all core css files. Apply this issue's patch and do the following command from DRUPAL_ROOT/core
npm run lint:css
Remaining tasks
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2866812-8.patch | 1.16 KB | idebr |
| #3 | 2866812-3.patch | 1.16 KB | idebr |
Comments
Comment #2
alexpottComment #3
idebr commentedAttached patch brings core/.stylelintrc.json in line with the stylelint-config-standard, so I removed the redundant line from our core/.stylelintrc.json file.
Updated the CSS formatting guidelines function names should be lowercase: https://www.drupal.org/docs/develop/standards/css/css-formatting-guideli...
correct:
color: rgba(0, 0, 0, 0.8);incorrect:
color: RGBA(0, 0, 0, 0.8);Added the Novice tag, since there is a clear problem description as well as a proposed resolution and the means to test the issue has been resolved by running
npm run lint:cssin/coreComment #5
idebr commentedComment #6
idebr commentedComment #7
idebr commentedComment #8
idebr commentedReuploaded the patch so it applies to the correct branch.
Comment #11
joelpittetThanks @idebr and @alexpott. I applied the patch, checked the diff, ran the linter, removed the css file and reran to ensure the error was being checked. It's all good:)
Comment #12
alexpottCommitted 3b06c57 and pushed to 8.5.x. Thanks!