Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
83
rated 0 times [  84] [ 1]  / answers: 1 / hits: 137753  / 8 Years ago, sun, july 3, 2016, 12:00:00

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 grunt-eslint configuration:



var lintTargets = [
<%= app.src %>/**/*/!(*test|swfobject)+(.js),
test/e2e/**/*/*.js,
!test/e2e/db/models/*.js
];
module.exports.tasks = {
eslint: {
files: {
options: {
config: 'eslint.json',
fix: true,
rulesdir: ['eslint_rules']
},
src: lintTargets
}
}
};


What should we do to fix the error?


More From » gruntjs

 Answers
77

Try to swap config with configFile. Then :




  1. Create eslint.json file and

  2. Point the right location of it (relative to Gruntfile.js file)

  3. Place some configuration in that file (eslint.json), i.e.:



.



{
rules: {
eqeqeq: off,
curly: warn,
quotes: [warn, double]
}
}


for more examples, go here.


[#61529] Thursday, June 30, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lawrencem

Total Points: 153
Total Questions: 102
Total Answers: 98

Location: Mauritania
Member since Sun, Oct 17, 2021
3 Years ago
;