Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Add support for css modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Hagemeister committed Oct 11, 2016
1 parent 0bec4ce commit 0f56661
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
21 changes: 21 additions & 0 deletions __tests__/fixtures/valid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,24 @@ h1 {
color: blue;
}
}

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

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

.composed {
composes: base;
}

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

:global(.js) .progressive {
display: block;
}
29 changes: 28 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
module.exports = {
extends: "stylelint-config-standard",
extends: [
"stylelint-config-standard"
],
plugins: [
"stylelint-scss"
],
rules: {
// CSS Modules
"selector-pseudo-class-no-unknown": [ true, {
ignorePseudoClasses: [
"export",
"import",
"global",
"local",
],
}],
"property-no-unknown": [ true, {
ignoreProperties: [
"composes",
],
}],
"at-rule-no-unknown": [ true, {
ignoreAtRules: [
"value",
"if",
"else",
"mixin"
],
}],

// Style
"at-rule-empty-line-before": [
"always",
{
Expand Down Expand Up @@ -38,5 +64,6 @@ module.exports = {
"number-leading-zero": null,
"selector-max-compound-selectors": null,
"shorthand-property-no-redundant-values": null,
// "selector-list-comma-newline-after": null,
}
}

0 comments on commit 0f56661

Please sign in to comment.