stylelint-config-css-modules
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -9,2 +9,10 @@ # Change Log | ||
## [4.0.0] - 2022-02-11 | ||
### Added | ||
* SCSS support trough `overrides` relying on `stylelint-scss` for: | ||
- `at-rule-no-unknown` | ||
- `function-no-unknow` | ||
See https://github.com/pascalduez/stylelint-config-css-modules/issues/6 | ||
* Now comes with `stylelint-scss` as `optionalDependency`. | ||
## [3.0.0] - 2022-02-11 | ||
@@ -65,3 +73,4 @@ ### Changed | ||
[Unreleased]: https://github.com/pascalduez/stylelint-config-css-modules/compare/3.0.0...HEAD | ||
[Unreleased]: https://github.com/pascalduez/stylelint-config-css-modules/compare/4.0.0...HEAD | ||
[4.0.0]: https://github.com/pascalduez/stylelint-config-css-modules/tags/4.0.0 | ||
[3.0.0]: https://github.com/pascalduez/stylelint-config-css-modules/tags/3.0.0 | ||
@@ -68,0 +77,0 @@ [2.3.0]: https://github.com/pascalduez/stylelint-config-css-modules/tags/2.3.0 |
22
index.js
@@ -41,2 +41,24 @@ module.exports = { | ||
}, | ||
overrides: [ | ||
{ | ||
files: '**/*.scss', | ||
rules: { | ||
'at-rule-no-unknown': null, | ||
'scss/at-rule-no-unknown': [ | ||
true, | ||
{ | ||
ignoreAtRules: ['value'], | ||
}, | ||
], | ||
'function-no-unknown': null, | ||
// https://github.com/stylelint-scss/stylelint-scss/pull/591 | ||
// 'scss/function-no-unknown': [ | ||
// true, | ||
// { | ||
// ignoreAtRules: ['global'], | ||
// }, | ||
// ], | ||
}, | ||
}, | ||
], | ||
}; |
{ | ||
"name": "stylelint-config-css-modules", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"description": "CSS modules shareable config for stylelint", | ||
@@ -32,9 +32,13 @@ "keywords": [ | ||
"devDependencies": { | ||
"ava": "^4.0.1", | ||
"stylelint": "^14.5.0", | ||
"stylelint-config-standard": "^25.0.0" | ||
"ava": "^4.1.0", | ||
"stylelint": "^14.5.3", | ||
"stylelint-config-standard": "^25.0.0", | ||
"stylelint-config-standard-scss": "^3.0.0" | ||
}, | ||
"peerDependencies": { | ||
"stylelint": "14.x" | ||
}, | ||
"optionalDependencies": { | ||
"stylelint-scss": "^4.1.0" | ||
} | ||
} |
# stylelint-config-css-modules | ||
[![npm version][npm-image]][npm-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![CI Status][ci-image]][ci-url] | ||
@@ -23,2 +23,15 @@ > CSS modules shareable config for stylelint. | ||
> `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 | ||
@@ -31,6 +44,3 @@ | ||
"stylelint-config-css-modules" | ||
], | ||
"rules": { | ||
[...] | ||
} | ||
] | ||
} | ||
@@ -73,2 +83,16 @@ ``` | ||
## SCSS | ||
Using SCSS along with configs such as [stylelint-config-standard-scss] means you | ||
should necessarily have [stylelint-scss] installed. | ||
```json | ||
{ | ||
"extends": [ | ||
"stylelint-config-standard-scss", | ||
"stylelint-config-css-modules" | ||
] | ||
} | ||
``` | ||
## Credits | ||
@@ -84,6 +108,10 @@ | ||
[npm-image]: http://img.shields.io/npm/v/stylelint-config-css-modules.svg?style=flat-square | ||
[travis-url]: https://travis-ci.org/pascalduez/stylelint-config-css-modules?branch=master | ||
[travis-image]: http://img.shields.io/travis/pascalduez/stylelint-config-css-modules.svg?style=flat-square | ||
[ci-url]: https://github.com/pascalduez/stylelint-config-css-modules/actions/workflows/ci.yml | ||
[ci-image]: https://img.shields.io/github/workflow/status/pascalduez/stylelint-config-css-modules/CI?style=flat-square | ||
[stylelint]: https://github.com/stylelint/stylelint | ||
[css modules]: https://github.com/css-modules/css-modules | ||
[stylelint-scss]: https://github.com/stylelint-scss/stylelint-config-standard-scss | ||
[stylelint-config-standard]: https://github.com/stylelint/stylelint-config-standard | ||
[css modules]: https://github.com/css-modules/css-modules | ||
[stylelint-config-standard-scss]: https://github.com/stylelint-scss/stylelint-config-standard-scss | ||
8683
63
114
2
4