Skip to content

Commit

Permalink
✨ add more modules
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tokyo committed Jan 27, 2023
1 parent 42a6df6 commit a3b1e05
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ To see the rules that this config uses, please read the [config itself](./index.

<!-- prettier-ignore -->
```css
@import "x";
@import "y";
@import "./x";
@import "./y";

/**
* Multi-line comment
Expand Down Expand Up @@ -91,7 +91,7 @@ To see the rules that this config uses, please read the [config itself](./index.
/* Flush nested single line comment */
.selector::after {
content: "";
background-image: url("x.svg");
background-image: url("./x.svg");
}
}

Expand Down
3 changes: 3 additions & 0 deletions __tests__/_y.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.y {
display: none;
}
5 changes: 2 additions & 3 deletions __tests__/valid.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "x";
@import "y";
@import "./x";

/**
* Multi-line comment
Expand Down Expand Up @@ -69,7 +68,7 @@
/* Flush nested single line comment */
.selector::after {
content: "→";
background-image: url("x.svg");
background-image: url("./x.svg");
}
}

Expand Down
4 changes: 2 additions & 2 deletions __tests__/valid.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import 'x';
@import '_y';
@import './x';
@import './_y';

$color-black: #000000;

Expand Down
3 changes: 3 additions & 0 deletions __tests__/x.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.x {
display: none;
}
3 changes: 3 additions & 0 deletions __tests__/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
'stylelint-config-standard-scss',
'stylelint-config-prettier',
],
plugins: ['stylelint-order'],
plugins: ['stylelint-high-performance-animation', 'stylelint-images', 'stylelint-order'],
/**
* Global Rules
*
Expand All @@ -20,11 +20,15 @@ module.exports = {
/* CSS */
/** use long to match JS */
'color-hex-length': 'long',
/** images */
'images/broken': true,
// /** allow us to go as precise as needed */
// 'number-max-precision': null,
/** properties order */
'order/properties-order': propertyOrder,
/** allow us to go as precise as needed */
'number-max-precision': null,
/** eg: composes - scss */
/** now low performance animation properties */
'plugin/no-low-performance-animation-properties': true,
/** eg: composes - css modules */
'property-no-unknown': [
true,
{
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-config-standard-scss": "^6.1.0",
"stylelint-high-performance-animation": "^1.7.0",
"stylelint-images": "^2.0.1",
"stylelint-order": "^6.0.1"
},
"devDependencies": {
Expand All @@ -99,6 +101,10 @@
"stylelint-config-prettier": ">=9",
"stylelint-config-standard": ">=29",
"stylelint-config-standard-scss": ">=6",
"stylelint-css-modules": ">=1",
"stylelint-high-performance-animation": ">=1",
"stylelint-images": ">=2",
"stylelint-no-unresolved-module": ">=2",
"stylelint-order": ">=6"
}
}
Loading

0 comments on commit a3b1e05

Please sign in to comment.