Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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 206,851 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.