Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
eslint-formatter-pretty
Advanced tools
eslint-formatter-pretty is an npm package that provides a user-friendly, visually appealing formatter for ESLint. It enhances the readability of ESLint output by organizing and styling the information in a more digestible format.
Pretty Formatting
This feature allows you to use the 'pretty' formatter in your ESLint configuration. It formats the ESLint output in a visually appealing way, making it easier to read and understand.
module.exports = {
"extends": "eslint:recommended",
"formatter": "pretty"
};
eslint-formatter-friendly is another formatter for ESLint that focuses on providing a more readable and user-friendly output. It highlights errors and warnings in a clear and concise manner, similar to eslint-formatter-pretty.
eslint-formatter-codeframe is a formatter that uses Babel's code frame to display ESLint results. It provides a detailed and structured output, showing the exact location of errors and warnings in the code, which can be very helpful for debugging.
eslint-formatter-table formats ESLint results into a table format. This can be useful for quickly scanning through errors and warnings, as the tabular format organizes the information in a structured way, making it easy to spot issues.
Pretty formatter for ESLint
npm install --save-dev eslint-formatter-pretty
Nothing to do. It's the default formatter.
eslint --format=pretty file.js
grunt.initConfig({
eslint: {
target: ['file.js'].
options: {
format: 'pretty'
}
}
});
grunt.loadNpmTasks('grunt-eslint');
grunt.registerTask('default', ['eslint']);
const gulp = require('gulp');
const eslint = require('gulp-eslint');
gulp.task('lint', () =>
gulp.src('file.js')
.pipe(eslint())
.pipe(eslint.format('pretty'))
);
module.exports = {
entry: ['file.js'],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
formatter: require('eslint-formatter-pretty')
}
}
]
}
};
In iTerm, Command-click the filename header to open the file in your editor.
In terminals with support for hyperlinks, Command-click the rule ID to open its docs.
FAQs
Pretty ESLint formatter
The npm package eslint-formatter-pretty receives a total of 293,657 weekly downloads. As such, eslint-formatter-pretty popularity was classified as popular.
We found that eslint-formatter-pretty demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.