我只是在Atom.io中为我的项目设置了ESlint,它适用于所有情况,例如代码指南和静态代码错误。但是我在第一个行的所有文件中出现了这些错误:
ESLint Error meteor/audit-argument-checks Definition for rule 'meteor/audit-argument-checks' was not foundat line 1 col 1 ESLint Error meteor/no-session Definition for rule 'meteor/no-session' was not foundat line 1 col 1 ESLint Error meteor/no-template-lifecycle-assignments Definition for rule 'meteor/no-template-lifecycle-assignments' was not foundat line 1 col 1 ESLint Error meteor/no-zero-timeout Definition for rule 'meteor/no-zero-timeout' was not foundat line 1 col 1 ESLint Error meteor/eventmap-params Definition for rule 'meteor/eventmap-params' was not foundat line 1 col 1 ESLint Error meteor/template-names Definition for rule 'meteor/template-names' was not foundat line 1 col 1
我的第一行是:
//First line of code
import { Meteor } from 'meteor/meteor';
但是我写的并不重要,错误总是一样的。我忘记了什么吗?我需要手动定义这些规则吗?
我的.eslint.rc是这样的:
module.exports = {
"plugins": ["meteor"],
"extends": [
"plugin:meteor/recommended",
"eslint:recommended",
],
"env": {
"es6": true,
"browser": true,
"node": true,
"meteor": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"installedESLint": true,
"settings": {
"import/resolver": "meteor"
},
"rules": {
"max-len": 0,
"no-underscore-dangle": 0,
}
};