0.0.6 • Published 3 years ago

@drmartingonzo/stylelint-config v0.0.6

Weekly downloads
7
License
MIT
Repository
-
Last release
3 years ago

@drmartingonzo/stylelint-config

Personal wip stylelint config.

Extends stylelint-config-rational-order.

Installation

npm install @drmartingonzo/eslint-config --save-dev

Usage

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

{
  "extends": "@drmartingonzo/stylelint-config"
}

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

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

Since stylelint 9.7.0, you can simply use the globally installed configuration name instead of the absolute path:

{
  "extends": "@drmartingonzo/stylelint-config"
}

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, change the indentation to tabs, turn off the number-leading-zero rule,and add the unit-whitelist rule:

{
  "extends": "@drmartingonzo/stylelint-config",
  "rules": {
    "at-rule-no-unknown": [
      true,
      {
        "ignoreAtRules": ["extends", "ignores"]
      }
    ],
    "indentation": "tab",
    "number-leading-zero": null,
    "unit-whitelist": ["em", "rem", "s"]
  }
}