https://github.com/mondeja/pre-commit-stylelint
Stylelint hook for pre-commit
https://github.com/mondeja/pre-commit-stylelint
Last synced: 8 months ago
JSON representation
Stylelint hook for pre-commit
- Host: GitHub
- URL: https://github.com/mondeja/pre-commit-stylelint
- Owner: mondeja
- Created: 2021-06-07T13:19:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-07T13:20:11.000Z (over 4 years ago)
- Last Synced: 2025-02-13T20:17:54.624Z (8 months ago)
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
stylelint mirror
================Mirror of [stylelint][stylelint-link] package for [pre-commit][pre-commit-link].
### Using stylelint with pre-commit
Add this to your `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/mondeja/pre-commit-stylelint
rev: '' # Use the sha / tag you want to point at
hooks:
- id: stylelint
```When using plugins with [stylelint][stylelint-link] you'll need to declare them
under `additional_dependencies`. For example:```yaml
- repo: https://github.com/mondeja/pre-commit-stylelint
rev: '' # Use the sha / tag you want to point at
hooks:
- id: stylelint
additional_dependencies:
- stylelint-config-standard@21.0.0
- stylelint-scss@3.19.0
```By default only `*.js` files are taken into consideration. If you want to use
[stylelint][stylelint-link] on TypeScript codebases you need to start from this
template:```yaml
- repo: https://github.com/mondeja/pre-commit-stylelint
rev: '' # Use the sha / tag you want to point at
hooks:
- id: stylelint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
```[stylelint-link]: https://github.com/stylelint/stylelint
[pre-commit-link]: https://github.com/pre-commit/pre-commit