I’m thinking eslint shouldn’t give errors when following the guide, eg after creating a new default app. Or to be more precise – I was expecting it not to give errors, and it did.
Eg running:
meteor create myapp
meteor npm install
meteor npm install --save-dev eslint eslint-plugin-react eslint-plugin-meteor eslint-config-airbnb
and populating scripts
and eslintConfig
as above in package.json
, then "meteor npm run lint"
gave me:
> myapp@ lint /opt/www/sites/me/myapp
> eslint .
/opt/www/sites/me/myapp/client/main.js
1:26 error Unable to resolve path to module 'meteor/templating' import/no-unresolved
2:29 error Unable to resolve path to module 'meteor/reactive-var' import/no-unresolved
18:25 error Invalid parameter name, use "templateInstance" instead meteor/eventmap-params
/opt/www/sites/me/myapp/server/main.js
1:24 error Unable to resolve path to module 'meteor/meteor' import/no-unresolved
✖ 4 problems (4 errors, 0 warnings)
I eventually made it quiet with rules
in package.json
:
"rules": {
"meteor/eventmap-params": [
2, { "templateInstanceParamName": "instance" }
],
"import/no-unresolved": [
2, { "ignore": ["^meteor/"] }
]
}
Should that be included or noted?