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

CommentFileSizeAuthor
#8 2866812-8.patch1.16 KBidebr
#3 2866812-3.patch1.16 KBidebr

Comments

alexpott created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
Issue tags: +Novice
StatusFileSize
new1.16 KB

Attached 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:css in /core

Status: Needs review » Needs work

The last submitted patch, 3: 2866812-3.patch, failed testing.

idebr’s picture

Version: 8.3.x-dev » 8.4.x-dev
idebr’s picture

idebr’s picture

Status: Needs work » Needs review
idebr’s picture

StatusFileSize
new1.16 KB

Reuploaded the patch so it applies to the correct branch.

The last submitted patch, 3: 2866812-3.patch, failed testing.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @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:)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3b06c57 and pushed to 8.5.x. Thanks!

  • alexpott committed 3b06c57 on 8.5.x
    Issue #2866812 by idebr: Update stylelint rule function-name-case to be...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.