Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including stylelint-config-css-modules with all npm packages installed. Try it out:

require("stylelint/package.json"); // stylelint is a peer dependency. var stylelintConfigCssModules = require("stylelint-config-css-modules")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

stylelint-config-css-modules v2.2.0

CSS modules shareable config for stylelint

stylelint-config-css-modules

npm version Build Status

CSS modules shareable config for stylelint.

Tweaks stylelint rules to accept css modules specific syntax.
This is useful as an override of pre-defined rules, for instance the stylelint-config-standard.

Installation

npm install stylelint-config-css-modules --save-dev

or

yarn add stylelint-config-css-modules --dev

Usage

{
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-css-modules"
  ],
  "rules": {
    [...]
  }
}

Examples

@value colors: './colors.css';
@value primary, secondary from colors;

.base {
  content: 'base';
  color: primary;
}

.composed {
  composes: base;
}

.composedWith {
  compose-with: base;
}

.flexible {
  composes: flex from './utils.css';
  flex-direction: column;
}

:global(.js) .progressive {
  display: block;
}

:export {
  black: #000;
  white: #111;
}

Credits

Licence

stylelint-config-css-modules is unlicensed.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free