
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
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']
}
});
const js = require('@eslint/js');
grunt.initConfig({
eslint: {
options: {
extends: [js.configs.recommended]
},
target: ['file.js']
}
});
grunt.initConfig({
eslint: {
options: {
format: './node_modules/eslint-tap/index.js'
},
target: ['file.js']
}
});
grunt.initConfig({
eslint: {
options: {
outputFile: 'eslint-results.xml',
format: 'checkstyle'
},
target: ['file.js']
}
});
This will output in checkstyle format to both the console and eslint-results.xml. To suppress console output and only write to the file, add silent: true.
grunt.initConfig({
eslint: {
options: {
flags: ['v10_config_lookup_from_file']
},
target: ['../project1/scripts/**/*.js']
}
});
See the ESLint options.
In addition the following options are supported:
Type: array | object
Requires ESLint 9.22+
Shareable configs to extend.
Type: array
Feauture flags to pass to ESLint.
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. When specified, the report is written to both the console and the file unless silent is true.
Type: boolean
Default: false
Report errors only.
Type: boolean
Default: false
Suppress console output. When used with outputFile, only writes to the file.
Type: number
Default: -1 (Means no limit)
The number 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 133,061 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.