Get unlimited public & private packages + team-based management with npm Teams.Learn more »

stylelint-config-wordpress

16.0.0 • Public • Published

stylelint-config-wordpress

NPM version Build Status

WordPress shareable config for stylelint.

Configuration rules to ensure your CSS is compliant with the WordPress CSS Coding Standards.

Table of Contents

Installation

$ npm install stylelint-config-wordpress --save-dev

Usage

If you've installed stylelint-config-wordpress locally within your project, just set your stylelint config to:

{
  "extends": "stylelint-config-wordpress"
}

If you've globally installed stylelint-config-wordpress using the -g flag, then you'll need to use the absolute path to stylelint-config-wordpress in your config:

{
  "extends": "/absolute/path/to/stylelint-config-wordpress"
}

Presets

In addition to the default preset, there is also a SCSS preset. This preset extends both stylelint-config-wordpress and stylelint-config-recommended-scss.

SCSS

{
  "extends": [
    "stylelint-config-wordpress/scss"
  ]
}

Extending the config

Simply add a "rules" key to your config and add your overrides there.

For example, to change the indentation to four spaces and turn off the number-leading-zero rule:

{
  "extends": "stylelint-config-wordpress",
  "rules": {
    "indentation": 4,
    "number-leading-zero": null
  }
}

Changelog

License

Install

npm i stylelint-config-wordpress

DownloadsWeekly Downloads

13,335

Version

16.0.0

License

MIT

Unpacked Size

20.3 kB

Total Files

6

Last publish

Collaborators

  • avatar
  • avatar