eslint-formatter-pretty
Pretty ESLint formatter
Last updated a month ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-formatter-pretty 
SYNC missed versions from official npm registry.

eslint-formatter-pretty Build Status

Pretty formatter for ESLint

Highlights

  • Pretty output.
  • Sorts results by severity.
  • Stylizes inline codeblocks in messages.
  • Command-click a rule ID to open its docs.
  • Command-click a header to reveal the first error in your editor. (iTerm-only)

Install

$ npm install --save-dev eslint-formatter-pretty

Usage

XO

Nothing to do. It's the default formatter.

ESLint CLI

$ eslint --format=pretty file.js

grunt-eslint

grunt.initConfig({
	eslint: {
		target: ['file.js'].
		options: {
			format: 'pretty'
		}
	}
});

grunt.loadNpmTasks('grunt-eslint');
grunt.registerTask('default', ['eslint']);

gulp-eslint

const gulp = require('gulp');
const eslint = require('gulp-eslint');

gulp.task('lint', () =>
	gulp.src('file.js')
		.pipe(eslint())
		.pipe(eslint.format('pretty'))
);

eslint-loader (webpack)

module.exports = {
	entry: ['file.js'],
	module: {
		rules: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				loader: 'eslint-loader',
				options: {
					formatter: require('eslint-formatter-pretty')
				}
			}
		]
	}
};

Tips

In iTerm, <kbd>Command</kbd>-click the filename header to open the file in your editor.

In terminals with support for hyperlinks, <kbd>Command</kbd>-click the rule ID to open its docs.

Current Tags

  • 4.0.0                                ...           latest (a month ago)

18 Versions

  • 4.0.0                                ...           a month ago
  • 3.0.1                                ...           8 months ago
  • 3.0.0                                ...           8 months ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 1.3.0                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 918
This Week 3,793
This Month 29,445
Last Day 2,875
Last Week 16,157
Last Month 56,969
Dependencies (7)
Dev Dependencies (3)
Dependents (117)

Copyright 2014 - 2016 © taobao.org |