After setting up Eslint, I encountered some errors that I couldn't quite figure out.
When running
meteor npm run lint
, an error was thrown after completing the linting process. To fix this issue, I added the exit 0 attribute to gracefully exit the Eslint process by modifying my package.json as follows:"lint": "eslint .;exit 0",
I attempted to make Eslint ignore imports from Meteor using the eslint-plugin-meteor and turning on import resolver meteor, but it didn't seem to work. So, I had to silence the errors in the .eslintrc file while waiting for a resolution to the problem. The specific error message featured these lines: 1:1 error 'meteor' should be listed in the project's dependencies. Run 'npm i -S meteor' to add it 1:24 error Unable to resolve path to module 'meteor/meteor'
Below you can see snippets from my package.json and .eslintrc files:
Package.json excerpt -
{
"name": "carecity",
"private": true,
...
}
.eslintrc excerpt -
{
"extends": "airbnb",
"rules": {
"react/require-extension": "off",
"import/no-extraneous-dependencies": "off"
},
"settings": {
"import/core-modules": [ "meteor/meteor" ]
}
}