Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-eslint

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-eslint

Validate files with ESLint

  • 25.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40K
decreased by-59.18%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-eslint

Validate files with ESLint

Install

npm install --save-dev grunt-eslint

Usage

require('load-grunt-tasks')(grunt);

grunt.initConfig({
	eslint: {
		target: ['file.js']
	}
});

grunt.registerTask('default', ['eslint']);

Examples

Custom config and rules

const noAlertRule = require('./conf/rules/no-alert');

grunt.initConfig({
	eslint: {
		options: {
			overrideConfigFile: 'conf/eslint.js',
			plugins: {
				noAlertRule
			}
		},
		target: ['file.js']
	}
});

Custom formatter

grunt.initConfig({
	eslint: {
		options: {
			format: './node_modules/eslint-tap/index.js'
		},
		target: ['file.js']
	}
});

Options

See the ESLint options.

In addition the following options are supported:

format

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.

outputFile

Type: string
Default: ''

Output the report to a file.

quiet

Type: boolean
Default: false

Report errors only.

maxWarnings

Type: number
Default: -1 (Means no limit)

The nmber of warnings to trigger non-zero exit code.

failOnError

Type: boolean
Default: true

Fail the build if ESLint found any errors.

Keywords

FAQs

Package last updated on 11 Apr 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc