Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

One Design Company shareable config for stylelint

License

Notifications You must be signed in to change notification settings

onedesign/stylelint-config-odc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stylelint-config-odc

The One Design Company shareable config for stylelint.

Use it as is or as a foundation for your own config.

Installation

npm install stylelint-config-odc --save-dev

Usage

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

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

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

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

Extending the config

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

For example, to change the at-rule-no-unknown rule to use its ignoreAtRules option, turn off the block-no-empty rule, and add the unit-whitelist rule:

{
  "extends": "stylelint-config-odc",
  "rules": {
    "at-rule-no-unknown": [ true, {
      "ignoreAtRules": [
        "extends"
      ]
    }],
    "block-no-empty": null,
    "unit-whitelist": ["em", "rem", "s"]
  }
}

About

One Design Company shareable config for stylelint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published