Have ideas to improve npm?Join in the discussion! »

    stylelint-config-sugarss-recommended

    3.0.0 • Public • Published

    stylelint-config-sugarss-recommended

    The recommended shareable config of SugarSS for stylelint.

    It turns on all the possible errors rules within stylelint.

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

    Installation

    npm

    npm install stylelint-config-sugarss-recommended --save-dev

    yarn

    yarn add stylelint-config-sugarss-recommended --dev

    Usage

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

    {
      "extends": "stylelint-config-sugarss-recommended"
    }

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

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

    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-allowed-list rule:

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

    Changelog

    License

    Install

    npm i stylelint-config-sugarss-recommended

    DownloadsWeekly Downloads

    74

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    12.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar