Problem/Motivation

Follow-up to #2865971: Use stylelint as opposed to csslint in core. Configure the block-no-empty 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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Issue summary: View changes
alexpott’s picture

BrightBold’s picture

Added this rule and fixed core CSS so all files now pass.

This patch depends on #2865971-41: Use stylelint as opposed to csslint in core.

BrightBold’s picture

BrightBold’s picture

Status: Active » Needs review
BrightBold’s picture

Note: I've been updating all these issues to include the relevant passage from the CSS standards in the Problem/Motivation section, but I can't find a mention of this rule there. So I'm making an assumption that we want to disallow empty blocks. We should update the formatting guidelines if so. (Or if I've missed it, someone could add the correct language to the issue text above).

BrightBold’s picture

Version: 8.3.x-dev » 8.4.x-dev
Assigned: Unassigned » BrightBold
BrightBold’s picture

Rerolled.

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

Thank you @BrightBold and @Alexpott. Ran the patch with the lint command and it has no errors, reverted one file to see the error show and it did.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed e8a584a and pushed to 8.5.x. Thanks!

  • alexpott committed e8a584a on 8.5.x
    Issue #2866800 by BrightBold: Update stylelint rule block-no-empty to be...

Status: Fixed » Closed (fixed)

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