Npm package to work with Grunt which validate files with ESLint.
Questions tagged [grunt-eslint]
12 questions
50
votes
11 answers
"No ESLint configuration found" error
Recently, we've upgraded to ESLint 3.0.0 and started to receive the following message running the grunt eslint task:
> $ grunt eslint
Running "eslint:files" (eslint) task
Warning: No ESLint configuration found. Use --force to continue.
Here is the…

alecxe
- 462,703
- 120
- 1,088
- 1,195
17
votes
3 answers
Grunt-eslint & enabling `--fix` flag to auto fix violations
I know eslint CLI itself has a --fix flag, but I can't tell from the documentation how to use this via eslintConfig (in package.json) or in the grunt-eslint configuration in my Gruntfile.
I have the following config in package.json:
"env": {
…

Alex
- 8,093
- 6
- 49
- 79
7
votes
2 answers
ESLint no output
I'm trying to get started using ESLint from this tutorial: https://davidwalsh.name/eslint
I've copied the example file. When I run eslint uploader.js in its directory, nothing happens - there is a line break, and then the prompt returns. No output…

Ben
- 54,723
- 49
- 178
- 224
6
votes
3 answers
Error : No ESLint configuration found
Can't get ESLint recognize and running using Gulp. Code for gulpfile.js is:
"use strict";
var gulp = require('gulp');
var connect = require('gulp-connect'); //Runs a local dev server
var open = require('gulp-open'); //Open a URL in a web…

Brian L.
- 81
- 1
- 1
- 5
5
votes
1 answer
grunt-contrib-watch does not work with eslint to watch only changed file sets
I can't seem to get ESLint to run only on changed files using grunt-contrib-watch.
I was able to do it with JSHint.
Any help to get ESLint doing the same would be greatly appreciated.

Sev
- 15,401
- 9
- 56
- 75
3
votes
2 answers
Suppress a specific ESLint warning: File ignored by default
Hopefully this is a reasonable question but it's possible I'm misunderstanding something. I get this warning raised on 9 seemingly random .js files in my project's node_modules dependency directory when I run ESLint from grunt. For…

JHS
- 1,423
- 17
- 29
3
votes
1 answer
How to have gruntjs skip eslint task if no files are found?
I'm using grunt with the grunt-eslint plugin. This is part of a larger grunt task that first finds changed files and does various tasks with them. If there aren't any JS files changed (for example if I just change a CSS file) the whole task aborts…

Marc Stober
- 10,237
- 3
- 26
- 31
2
votes
1 answer
.eslintignore not working in sibling directory
I'm having trouble getting grunt-eslint to pick up an .eslintignore file.
My setup is rather atypical in that I'm running the task on files in sibling directories rather than in the working directory itself.
grunt.initConfig({
eslint: {
…

Julian Laval
- 1,210
- 4
- 17
- 34
1
vote
1 answer
Eslint cache persisting across branches?
It may not be the eslint cache.
I am working in a project that is using a custom eslint plugin that is referenced in the package.json locally (not published on npm).
"special-eslint-plugin": "file:special-eslint-plugin-directory"
But then I am…

coelacanth7 A
- 21
- 1
- 1
- 4
1
vote
1 answer
custom rule checking source code
I am making a custom rule with ESLint.
Basically:
module.exports = function (context) {
var file = context.getSource();
var fileName = context.getFilename();
var lines = file.split(/\n/);
lines.forEach(function(line, i){
//…

Sergio
- 28,539
- 11
- 85
- 132
0
votes
2 answers
Grunt - grunt-eslint does not start task
I've set up the grunt-eslint in my gruntfile.js, but when I run the "grunt eslint", nothing happens. The task looks like it would start but just stands still even after 15min.
All my other tasks works just fine, all except eslint which shows no…

Kelsner
- 59
- 2
- 9
0
votes
1 answer
Make grunt-eslint use globally installed eslint plugin
Calling grunt-eslint causes a Cannot find module 'eslint-plugin-react' error that doesn't happen when calling eslint directly from the command line.
I have eslint-plugin-react installed globally.
Is there an easy way to make grunt eslint behave the…

Carles Andres
- 1,761
- 1
- 15
- 22