Skip to content

Commit

Permalink
fix: remove outdated stylelint types (#254)
Browse files Browse the repository at this point in the history
The `@types/stylelint` package is for Stylelint 13. Stylelint 14
includes type declarations already.

The issue with installing this dependency in a project that uses
Stylelint 14+ is that it includes outdated "postcss" (v7) dependency
that might cause issues in the host project.
  • Loading branch information
rchl committed Jan 10, 2022
1 parent 85befc0 commit 69f33bf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 138 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ npm install stylelint-webpack-plugin@2 --save-dev
npm install stylelint --save-dev
```

**Note**: If you are using Stylelint 13 rather than 14+, you might also need to install `@types/stylelint` as a dev dependency if getting stylelint related type errors.

## Usage

In your webpack configuration:
Expand Down
175 changes: 39 additions & 136 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@
"webpack": "^4.0.0 || ^5.0.0"
},
"dependencies": {
"@types/stylelint": "^13.13.3",
"arrify": "^2.0.1",
"jest-worker": "^27.3.1",
"globby": "^11.0.4",
"jest-worker": "^27.3.1",
"micromatch": "^4.0.4",
"normalize-path": "^3.0.0",
"schema-utils": "^3.1.1"
Expand Down

0 comments on commit 69f33bf

Please sign in to comment.