
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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@5
To use this with ESLint, use version 5. Version 6 is not compatible with ESLint.
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']);
import gulp from 'gulp';
import eslint from 'gulp-eslint';
export const lint = (
gulp.src('file.js')
.pipe(eslint())
.pipe(eslint.format('pretty'))
);
import eslintFormatterPretty from 'eslint-formatter-pretty';
export default {
entry: ['file.js'],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
formatter: eslintFormatterPretty
}
}
]
}
};
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 458,634 weekly downloads. As such, eslint-formatter-pretty popularity was classified as popular.
We found that eslint-formatter-pretty demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.