stylelint-config-css-modules
CSS modules shareable config for stylelint
Last updated 8 years ago by pascalduez .
Unlicense · Repository · Bugs · Original npm · Tarball · package.json
$ npm install stylelint-config-css-modules 
SYNC missed versions from official npm registry.

stylelint-config-css-modules

npm version CI 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
pnpm install stylelint-config-css-modules --save-dev
# or
yarn add stylelint-config-css-modules --dev

stylelint-config-css-modules comes with stylelint-scss as optionalDependencies, if you're not using SCSS and want to strip it from your node_modules just:

npm install stylelint-config-css-modules --save-dev --no-optional
# or
pnpm install stylelint-config-css-modules --save-dev --no-optional
# or
yarn add stylelint-config-css-modules --dev --ignore-optional

Usage

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

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;
}

SCSS

Using SCSS along with configs such as stylelint-config-standard-scss means you should necessarily have stylelint-scss installed.

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

Credits

Licence

stylelint-config-css-modules is unlicensed.

Current Tags

  • 4.4.0                                ...           latest (a year ago)

18 Versions

  • 4.4.0                                ...           a year ago
  • 4.3.0                                ...           a year ago
  • 4.2.0                                ...           2 years ago
  • 4.1.0                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 2.2.0                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.5.0                                ...           5 years ago
  • 1.4.0                                ...           6 years ago
  • 1.3.0                                ...           6 years ago
  • 1.2.0                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.0                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE