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: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ayan4m1/yeoman-stylelint
- Owner: ayan4m1
- License: mit
- Created: 2019-03-09T04:14:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-08T22:14:27.000Z (11 months ago)
- Last Synced: 2024-10-30T22:58:31.053Z (about 2 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.