Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stylelint-config-css-modules

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-config-css-modules

CSS modules shareable config for stylelint

  • 4.3.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

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

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.

Keywords

FAQs

Package last updated on 19 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc