Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayan4m1/yeoman-stylelint
https://github.com/ayan4m1/yeoman-stylelint
library nodejs stylelint transform-stream yeoman
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ayan4m1/yeoman-stylelint
- Owner: ayan4m1
- License: mit
- Created: 2019-03-09T04:14:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-08T22:14:27.000Z (8 months ago)
- Last Synced: 2024-06-16T15:41:15.887Z (3 months ago)
- Topics: library, nodejs, stylelint, transform-stream, yeoman
- Language: JavaScript
- Homepage:
- Size: 101 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yeoman-stylelint
This package seeks to solve a single problem. Using [gulp-stylelint](https://github.com/olegskl/gulp-stylelint) as a Yeoman transform stream causes a crash if there are any conflicts during the Yeoman run. I want to pre-lint my SCSS so that it doesn't come out of the tin broken.
## usage
First, require/import the module:
```js
const stylelint = require('yeoman-stylelint');import stylelint from 'yeoman-stylelint';
```Then, in your generator constructor, add something similar to:
```js
this.registerTransformStream(
gulpIf(
/\.scss$/,
stylelint({ configFile: path.join(__dirname, '..', '.stylelintrc' }))
)
);
```Now, all `.scss` files that are written by Yeoman will be preprocessed with stylelint, automatically fixing what it can.