2017-10-23 3 views
0

私はstandardJS(eslint)を使用しています。この行のために私は理解していないparsing error: Unexpected token = (null)を得るか:eslint/standardは構文エラーを返します

static displayName = `WithData(${getComponentDisplayName(ComposedComponent)})` 

私は任意の設定を追加する必要がありますか?私はちょうど私のpackage.jsonでこれを使用しています:

"standard": { 
    "env": [ 
    "mocha" 
    ], 
    "global": [ 
    "React" 
    ] 
} 
+0

WithDataヘルパー関数WithDataは大文字で始まりますか? –

+0

これが問題であるかどうかわかりませんが、 '' 'の代わりに' \ ''がほとんど見えません。 –

+0

このクラスは 'class'内にありますか?クラスレベルのフィールドはまだ含まれていないので、おそらく 'displayName' [メソッドになる](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static)を期待しています言語。彼らは現在、「ステージ3」[プロポーザル](https://github.com/tc39/proposals#active-proposals)です。 –

答えて

0

私はstandardJSため"parser": "babel-eslint"オプションを追加しました。

関連する問題