Skip to:

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2924 closed defect (bug) (fixed)

Add stylelint for linting CSS to adhere to WordPress CSS Coding Standards

Reported by: netweb's profile netweb Owned by: netweb's profile netweb
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Tools - Build Keywords:


"Enforce consistent conventions and avoid errors in your stylesheets with stylelint, a modern CSS linter. "

"WordPress CSS Coding Standards shareable config for stylelint "

Change History (9)

#1 @netweb
8 years ago

  • Owner set to netweb
  • Resolution set to fixed
  • Status changed from new to closed

In 5995:

Build Tools: Add @stylelint for linting CSS to adhere to WordPress CSS Coding Standards

This changeset adds a new Grunt task grunt postcss:lint that runs stylelint on CSS & SCSS files to ensure bbPress' CSS adheres to WordPress CSS Coding Standards.

8 months in the making and is maintained by yours truly @netweb, with stylelint I'm learning JavaScript deeply.

See also:

Hat-tip: David Clark and Richard Hallows for the ongoing help and support.

Props netweb.
Fixes #2924.

Version 0, edited 8 years ago by netweb (next)

#2 @netweb
8 years ago

Adding a comment as the commit message above isn't playing nice!

Last edited 8 years ago by netweb (previous) (diff)

#3 @netweb
8 years ago

In 5996:

Build Tools: Add NPM package postcss-scss for styelelint SCSS compatibility

This changeset fixes an idiosyncratic NPM v3.x issue with "flat" folders and sharing dependencies that is not an issue when using NPM v2

See #2924

#4 @netweb
8 years ago

In 5998:

Build Tools: Update styelelint to 5.3.0

See #2924

#5 @netweb
8 years ago

In 6028:

Build Tools: Update stylelint to 6.4.2

See #2924

#6 @netweb
8 years ago

In 6035:

Build Tools: Update stylelint to v6.5.1 and bump .stylelintrc to stylelint-config-wordpress v7.1.1

See #2924

#7 @netweb
8 years ago

In 6100:

Build Tools: Switch stylelint Grunt task from grunt postcss:lint to grunt stylelint

This changeset switches the stylelint task from using the grunt-postcss to grunt-stylelint NPM module. This new Grunt module supports stylelint's native formatters and allows for improved task error reporting. This change also splits the CSS and SCSS lint tasks in preparation for a future stylelint-config-wordpress SCSS update.

See also:

Props netweb.
See #2924.

#8 @netweb
7 years ago

In 6403:

Build Tools: Update stylelint

  • Update stylelint to v7.10.1
  • Update grunt-stylelint to v0.7.0
  • Switch from .stylelintrc format to stylelint shared config stylelint-config-wordpress
  • Add SCSS linting support that's now included in stylelint-config-wordpress

See #2924.

#9 @netweb
7 years ago

In 6404:

Build Tools: Fix copy pasta of ; instead of , added in [6403].

WordPress Coding Standards requires one variable declaration.

See #2924.

Note: See TracTickets for help on using tickets.