Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
grunt-eslint
Advanced tools
Validate files with ESLint
npm install --save-dev grunt-eslint
require('load-grunt-tasks')(grunt);
grunt.initConfig({
eslint: {
target: ['file.js']
}
});
grunt.registerTask('default', ['eslint']);
const noAlertRule = require('./conf/rules/no-alert');
grunt.initConfig({
eslint: {
options: {
overrideConfigFile: 'conf/eslint.js',
plugins: {
noAlertRule
}
},
target: ['file.js']
}
});
grunt.initConfig({
eslint: {
options: {
format: './node_modules/eslint-tap/index.js'
},
target: ['file.js']
}
});
See the ESLint options.
In addition the following options are supported:
Type: string
Default: 'stylish'
The name of a built-in formatter or path to a custom one.
Some formatters you might find useful: eslint-json, eslint-tap.
Type: string
Default: ''
Output the report to a file.
Type: boolean
Default: false
Report errors only.
Type: number
Default: -1
(Means no limit)
The nmber of warnings to trigger non-zero exit code.
Type: boolean
Default: true
Fail the build if ESLint found any errors.
FAQs
Validate files with ESLint
The npm package grunt-eslint receives a total of 90,604 weekly downloads. As such, grunt-eslint popularity was classified as popular.
We found that grunt-eslint 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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.