2016-11-27 12 views
1

私はウォルマートの新しいReactフレームワークElectrodeを使い始めました。Eslintの設定で `rule for definition 'のファイル名が表示されています/ match-regex' was not found`エラー

私はeslintを設定しようとしているので、同様にウォルマートの糸くずの設定を拡張しようとしている:

https://github.com/walmartlabs/eslint-config-walmart

ここ.eslintrcが

{ 
    "parser": "babel-eslint", 
    "ecmaFeatures": { 
     "jsx": true 
    }, 
    "env": { 
     "es6": true 
    }, 
    "extends": "walmart/configurations/es6-react-test", 
    "rules": { 
     "indent": ["error", 2] 
    } 
} 

とpackage.json

"devDependencies": { 
    "babel-eslint": "^7.1.1", 
    "electrode-archetype-react-app-dev": "^1.0.0", 
    "eslint": "^2.10.2", 
    "eslint-plugin-filenames": "^1.0.0", 
    "eslint-plugin-react": "^5.1.1", 
    "gulp": "^3.9.1" 
    }, 
です

しかし、私はエラーまたは。私はeslint-plugin-filenamesをインストールしましたが、他にも私はconfgureする必要がありますか?

file: 'file:///foo/client/components/home.jsx' 
severity: 'Error' 
message: 'Definition for rule 'filenames/match-regex' was not found (filenames/match-regex)' 
at: '1,1' 
source: 'eslint' 
+2

はデフォルトeslint設定が(反応)clientのデフォルトeslint設定を無効にするたとえばElectrode docs

を参照して上書き/設定するために、私は以下のスニペットとclientフォルダ内の.eslintecファイルを、作成しました'.eslintrc':' "plugins":[ "ファイル名" ]に ' – Aurora0001

答えて

0

パッケージをアップグレードしてみてください。新しいバージョンではこのような問題はありません。

--- 
extends: 
    - "../../node_modules/electrode-archetype-react-app-dev/config/eslint/.eslintrc-react" 
    - "eslint:recommended" 

parser: 
    "babel-eslint" 

rules: 
    quotes: 
    - 2 
    - "single" 
関連する問題