"No ESLint configuration found" error
Solution 1
Try to swap config
with configFile
. Then :
- Create
eslint.json
file and - Point the right location of it (relative to
Gruntfile.js
file) - Place some configuration in that file (
eslint.json
), i.e.:
.
{
"rules": {
"eqeqeq": "off",
"curly": "warn",
"quotes": ["warn", "double"]
}
}
for more examples, go here.
Solution 2
The error you are facing is because your configuration is not present. To configure the eslint type
eslint --init
then configure as your requirement.
then execute the project again.
Solution 3
I've had the same error. It seems to need configuration.
Go to your project root & run in terminal
./node_modules/.bin/eslint --init
Solution 4
I hade the same problem with Gulp and running "gulp-eslint": "^3.0.1" version. I had to rename config: to configFile in Gulp task
.pipe(lint({configFile: 'eslint.json'}))
Solution 5
For those having the same problem, this is how we've fixed it.
Following the Requiring Configuration to Run migration procedure, we had to rename eslint.json
to .eslintrc.json
which is one of the default ESLint config file names now.
We've also removed the config
grunt-eslint option.
alecxe
"I am a soldier, at war with entropy itself" I am a Software Developer and generalist who is in love with the Python language and community. I greatly value clean and maintainable code, great software, but I know when I need to be a perfectionist and when it stands in a way of product delivery. I like to break things, to find new ways to break things, to solve hard problems, to put things under test and stress, and to have my mind blown by an interesting question. Some of my interests: Learning, Productivity, AI, Space Exploration, Internet of Things. "If you change the way you look at things, the things you look at change." - Wayne Dyer If you are looking for a different way to say "Thank you": Amazon wish list Pragmatic wish list Today I left my phone at home And went down to the sea. The sand was soft, the ocean glass, But I was still just me. Then pelicans in threes and fours, Glided by like dinosaurs, An otter basked upon its back, And dived to find another snack. The sun corpuscular and bright, Cast down a piercing shaft, And conjured an inspiring sight On glinting, bobbing craft. Two mermaids rose up from the reef, Out of the breaking waves. Their siren song was opium grief, Their faces from the grave. The mermaids asked a princely kiss To free them from their spell. I said to try a poet’s bliss. They shrugged and bid farewell. The sun grew dark and sinister, In unscheduled eclipse. As two eight-headed aliens Descended in their ships. They said the World was nice enough But didn’t like our star. And asked the way to Betelgeuse, If it wouldn’t be too far. Two whales breached far out to sea, And flew up to the sky, The crowd was busy frolicking, And didn’t ask me why. Today I left my phone at home, On the worst day, you’ll agree. If only I had pictures, If only you could see. Not everything was really there, I’m happy to confess, But I still have the memories, Worth more than tweets and stress. Today I left my phone at home, I had no shakes or sorrow. If that is what my mind can do, It stays at home tomorrow. Gavin Miller
Updated on April 07, 2020Comments
-
alecxe about 4 years
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?
-
alecxe almost 8 yearsYeah,
configFile
worked as well. Looks like we were usingconfig
which did not have any effect, but worked since eslint 2 searched for it by default. Now that we've migrated to eslint 3 and the default config filenames changed, eslint does not find the config automatically and this reveals that we should have usedconfigFile
from the beginning. This is the theory I have now. Thanks! -
Arkadiusz Lendzian almost 8 yearsYou're welcome. I just tackled the configuration recently, so avoided legacy problems.