2016-11-10 8 views
2

私はを使用します。ESLintgulp-eslintです。 Angular2アノテーションのリンタールールを有効にする方法はありますか?ESLint - Angular2アノテーション

@Component({ 
    selector: 'example', 
    styleUrls: ['app.css'], 
    templateUrl: 'app.html', //Linter should warn cause the semicolon 
}) 
//Linter should warn in case of a blank line between componente and class 

export class App { 

} 

答えて

1

eslint-plugin-angularを使用すると、ESLintの角度固有のルールを取得できます。そこから、まだ存在しない特定のルールが必要な場合は、それらをプラグインに追加することができます。

plugins: 
    - angular 

rules: 
    # Whichever rules you like 

globals: 
    angular: true 

settings: 
    angular: 2