@zeix/stylelint-config

1.0.0-beta.8 • Public • Published

@zeix/stylelint-config

Zeix Stylelint config optimized for SCSS and Prettier.

To see the rules that this config uses, please read the config itself.

Installation

npm i @zeix/stylelint-config --save-dev

Usage

Create a stylelint.config.js file and add an extends key.

module.exports = {
  extends: ["@zeix/stylelint-config"],
};

Documentation for the extends option

Extending the config

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

For example, to turn off the scss/at-if-no-null rule:

module.exports = {
  extends: ["@zeix/stylelint-config"],
  rules: {
    "scss/at-if-no-null": null,
  },
};

BEM

Projects using the BEM methodology may add the following rule to check selectors accordingly:

module.exports = {
  extends: ["@zeix/stylelint-config"],
  rules: {
    "selector-class-pattern": [
      "^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:\\[.+\\])?$",
      {
        resolveNestedSelectors: true,
      },
    ],
  },
};

Readme

Keywords

Package Sidebar

Install

npm i @zeix/stylelint-config

Weekly Downloads

1

Version

1.0.0-beta.8

License

MIT

Unpacked Size

9.96 kB

Total Files

4

Last publish

Collaborators

  • zeix.com
  • marcelbuehrig