2017-10-19 200 views
0

我正在努力让eslint第一次在我的应用中工作。我主要工作,但由于我已经开始禁用一些规则我导入我的浏览器控制台和命令行已经开始混乱了相同的警告。未找到eslint规则未找到警告消息

当我运行nodemon时,我的命令行中充满了相同的警告。 enter image description here

我也得到在浏览器控制台预期和掉毛工作以及 enter image description here

我的应用程序运行一个类似的消息。我只是想知道是否有办法来摆脱这些警告消息

这里有一些可能相关文件:

的package.json

{ 
    "name": "server", 
    "version": "1.0.0", 
    "description": "", 
    "main": "index.js", 
    "engines": { 
     "node": "8.4.0", 
     "npm": "5.3.0" 
    }, 
    "scripts": { 
     "start": "node index.js", 
     "server": "nodemon index.js", 
     "client": "npm run start --prefix client", 
     "dev": "concurrently \"npm run server\" \"npm run client\"", 
     "lint": "eslint ." 
    }, 
    "author": "", 
    "license": "ISC", 
    "dependencies": { 
     "concurrently": "^3.5.0", 
     "cookie-session": "^1.3.1", 
     "express": "^4.15.4", 
     "mongoose": "^4.11.10", 
     "nodemon": "^1.12.0", 
     "passport": "^0.4.0", 
     "passport-google-oauth20": "^1.0.0" 
    }, 
    "devDependencies": { 
     "eslint": "^4.9.0", 
     "eslint-config-airbnb": "^16.1.0", 
     "eslint-plugin-import": "^2.7.0", 
     "eslint-plugin-jsx-a11y": "^6.0.2", 
     "eslint-plugin-react": "^7.4.0" 
    } 
} 

.eslintrc

{ 
    "extends": [ 
    "airbnb" 
    ], 
    "root": true, 
    "rules": { 
    "import/prefer-default-export": "off", 
    "arrow-parens": ["error", "as-needed"], 
    "no-tabs": "off", 
    "indent": "off", 
    "function-paren-newline": "off", 
    "max-len": "off", 
    "no-console": "off", 
    "react/jsx-filename-extension": "off", 
    "react/prop-types": "off", 
    "consistent-return": "off", 
    "jsx-a11y/anchor-is-valid": "off", 
    "jsx-a11y/href-no-hash": "off" 
    } 
} 

.eslintignore

node_modules 
.gitignore 
*.md 
*.json 
config/keys.js 
client/src/registerServiceWorker.js 

谢谢

+0

读https://github.com解决/ airbnb/javascript/issues/1474? – Dane

回答

0

问题通过切换eslint-插件 - JSX-A11Y到版本5.1.1