Skip to content

A shareable stylelint config object that enforces Mooore Digital css rules

License

Notifications You must be signed in to change notification settings

mooore-digital/stylelint-config

Repository files navigation

Mooore stylelint-config

NPM version

A sharable stylelint config object that enforces Mooore Digital css rules.

Installation

npm install @mooore/stylelint-config --save-dev

Usage

If you've installed @mooore/stylelint-config, just set your stylelint config to:

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

Extending

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

{
  "extends": "@mooore/stylelint-config",
  "rules": {
    "rule-empty-line-before": [
        "always-multi-line", {
            "except": ["first-nested"],
            "ignore": ["after-comment"]
        }
    ],
  }
}

Extensions

We offer special rules for the following frameworks;

  • SCSS "@mooore/stylelint-config/scss",
  • Magento (LESS) "@mooore/stylelint-config/luma",
  • Magento (SCSS) "@mooore/stylelint-config/snowdog",
  • Magento (Hyva) "@mooore/stylelint-config/hyva",

Simply add the last part to your extends option, to use the specific rules.

Rules

The Mooore style-config is based on the @fylgja/stylelint-config And most rules are set there.

We only optimized it to match our Magento environments.

To checkout our rules see each config file.

License

MIT © Mooore Digital