Skip to content

Commit 7b3438c

Browse files
committed
feat: make stylelint a peer dependency
BREAKING CHANGE: stylelint is not installed with the package anymore and must be installed seperately
1 parent fe089b8 commit 7b3438c

File tree

3 files changed

+602
-230
lines changed

3 files changed

+602
-230
lines changed

README.md

+9-17
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323

2424
### Install
2525

26-
Install `jest`_(it needs Jest 21+)_ and `jest-runner-stylelint`
26+
Install `jest`_(it needs Jest 21+)_, `jest-runner-stylelint`, and `stylelint`
2727

2828
```bash
29-
yarn add --dev jest jest-runner-stylelint
29+
npm install --save-dev jest jest-runner-stylelint stylelint
3030

31-
# or with NPM
31+
# or with yarn
3232

33-
npm install --save-dev jest jest-runner-stylelint
33+
yarn add --dev jest jest-runner-stylelint stylelint
3434
```
3535

3636
### Add it to your Jest config
@@ -41,12 +41,8 @@ In your `package.json`
4141
{
4242
"jest": {
4343
"runner": "jest-runner-stylelint",
44-
"moduleFileExtensions": [
45-
"css"
46-
],
47-
"testMatch": [
48-
"**/*.css"
49-
]
44+
"moduleFileExtensions": ["css"],
45+
"testMatch": ["**/*.css"]
5046
}
5147
}
5248
```
@@ -56,17 +52,13 @@ Or in `jest.config.js`
5652
```js
5753
module.exports = {
5854
runner: "jest-runner-stylelint",
59-
moduleFileExtensions: [
60-
"css"
61-
],
62-
testMatch: [
63-
"**/*.css"
64-
]
55+
moduleFileExtensions: ["css"],
56+
testMatch: ["**/*.css"]
6557
};
6658
```
6759

6860
### Run Jest
6961

7062
```bash
71-
yarn jest
63+
npx jest
7264
```

0 commit comments

Comments
 (0)