Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrcgrtz/stylelint-formatter-pretty
✨ A pretty Stylelint formatter.
https://github.com/mrcgrtz/stylelint-formatter-pretty
css formatter lint linting reporter stylelint stylelint-formatter validate
Last synced: 3 days ago
JSON representation
✨ A pretty Stylelint formatter.
- Host: GitHub
- URL: https://github.com/mrcgrtz/stylelint-formatter-pretty
- Owner: mrcgrtz
- License: mit
- Created: 2017-04-15T15:39:56.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T14:32:46.000Z (17 days ago)
- Last Synced: 2025-02-14T22:08:50.424Z (5 days ago)
- Topics: css, formatter, lint, linting, reporter, stylelint, stylelint-formatter, validate
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/stylelint-formatter-pretty
- Size: 2.72 MB
- Stars: 32
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# stylelint-formatter-pretty
> A pretty formatter for [Stylelint](https://stylelint.io/)
[](https://github.com/mrcgrtz/stylelint-formatter-pretty/actions/workflows/test.yml)
[](https://coveralls.io/github/mrcgrtz/stylelint-formatter-pretty?branch=main)
[](https://packagephobia.now.sh/result?p=stylelint-formatter-pretty)
[](https://github.com/xojs/xo)
[](https://github.com/mrcgrtz/stylelint-formatter-pretty/blob/main/LICENSE.md)
## Install
Using [npm](https://www.npmjs.com/get-npm):
```bash
npm install --save-dev stylelint-formatter-pretty
```Using [yarn](https://yarnpkg.com/):
```bash
yarn add stylelint-formatter-pretty --dev
```## Usage
### Stylelint CLI
```bash
stylelint file.css --custom-formatter stylelint-formatter-pretty
```### [grunt-stylelint](https://github.com/wikimedia/grunt-stylelint)
```js
import stylelintFormatter from 'stylelint-formatter-pretty';grunt.initConfig({
stylelint: {
options: {
formatter: stylelintFormatter
},
all: ['css/**/*.css']
}
});grunt.loadNpmTasks('grunt-stylelint');
grunt.registerTask('default', ['stylelint']);
```### [gulp-stylelint](https://github.com/olegskl/gulp-stylelint)
```js
import gulp from 'gulp';
import stylelint from 'gulp-stylelint';
import stylelintFormatter from 'stylelint-formatter-pretty';gulp.task('lint', () =>
gulp.src('file.css')
.pipe(stylelint({
reporters: [ {
formatter: stylelintFormatter,
console: true
} ]
}));
);
```### [Webpack](https://github.com/JaKXz/stylelint-webpack-plugin)
```js
import styleLintPlugin from 'stylelint-webpack-plugin';
import stylelintFormatter from 'stylelint-formatter-pretty';module.exports = {
// ...
plugins: [
new styleLintPlugin({
formatter: stylelintFormatter
}),
],
// ...
}
```## Tips
In iTerm, Command+Click the filename header to open the file in your editor.
In [terminals with support for hyperlinks](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#supporting-apps), Command+Click the rule ID to open its documentation.
## Related
* [eslint-formatter-pretty](https://github.com/sindresorhus/eslint-formatter-pretty) – a pretty ESLint formatter
## License
MIT © [Sindre Sorhus](https://sindresorhus.com/), [Marc Görtz](https://marcgoertz.de/)