2016-06-28 5 views
1

erstreckt Ich habe folgendes .eslintrc und wenn ich mein Projekt mit dem aribnb Flusen und/oder airplus Erweiterungen, bekomme ich folgende Fehlermeldung:.eslintrc wirft Fehler bei airbnb Config

// .eslintrc 
{ 
    "parser": "babel-eslint", 
    "rules": { 
    "id-length": 0, 
    "indent": [ 
     2, 
     2, 
     { 
     "SwitchCase": 1 
     } 
    ], 
    "quotes": [ 
     2, 
     "single" 
    ], 
    "linebreak-style": [ 
     2, 
     "unix" 
    ], 
    "semi": [ 
     2, 
     "always" 
    ], 
    "no-duplicate-case": 1, 
    "no-else-return": 0, 
    "react/sort-comp": [ 
     1, 
     {} 
    ], 
    "no-undef": 1, 
    "no-unused-vars": [ 
     1, 
     { 
     "args": "none", 
     "argsIgnorePattern": "store|action|next" 
     } 
    ], 
    "object-curly-spacing": [ 
     1, 
     "always" 
    ], 
    "react/no-did-mount-set-state": [ 
     1 
    ] 
    }, 
    "env": { 
    "es6": true, 
    "node": true, 
    "browser": true 
    }, 
    "globals": { 
    "_": true, 
    "__ENV__": true 
    }, 
    "extends": [ 
    "airbnb", 
    "airplus" 
    ], 
    "ecmaFeatures": { 
    "jsx": true, 
    "experimentalObjectRestSpread": true 
    }, 
    "plugins": [ 
    "react" 
    ] 
} 

... und den Fehler :

> esw webpack src tools 

.../node_modules/eslint-config-airbnb/rules/react.js: 
    Configuration for rule "react/display-name" is invalid: 
    Value "data["0"].acceptTranspilerName" has additional properties. 

Referenced from: airbnb 
Referenced from: airplus 
Referenced from: /.../.eslintrc 
Error: /.../node_modules/eslint-config-airbnb/rules/react.js: 
    Configuration for rule "react/display-name" is invalid: 
    Value "data["0"].acceptTranspilerName" has additional properties. 

Referenced from: airbnb 
Referenced from: airplus 
Referenced from: .../.eslintrc 
    at validateRuleOptions (.../node_modules/eslint/lib/config/config-validator.js:116:15) 
    at .../node_modules/eslint/lib/config/config-validator.js:163:13 
    ... 

Antwort

0

versuchen Sie, "react/display-name": [0, { "ignoreTranspilerName": true }],

0
npm install 
npm info "[email protected]" peerDependencies 
npm install -g install-peerdeps 
install-peerdeps --dev eslint-config-airbnb-base 

"extends" hinzufügen: "airbnb-base" in die .eslintrc-Datei. Schließlich wurden erfolgreich eslint-config-airbnb-base und seine PeerDeps installiert.

Issue Snap Shot Here