3
1

More than 5 years have passed since last update.

ESLint v4.16.0

Last updated at Posted at 2018-01-20

v4.15.0 | 次 v4.17.0

ESLint 4.16.0 がリリースされました。
小さな機能追加とバグ修正が含まれています。

質問やバグ報告等ありましたら、お気軽にこちらまでお寄せください。

🏢 日本語 Issue 管理リポジトリ
👫 日本語サポート チャット
🏢 本家リポジトリ
👫 本家サポート チャット

🚀 本体への機能追加

特になし。

💡 新しいルール

特になし。

🔧 オプションが追加されたルール

#9570: object-property-newline allowAllPropertiesOnSameLine

既存の allowMultiplePropertiesPerLine オプションは allowAllPropertiesOnSameLine に名前変更されました。古い allowMultiplePropertiesPerLine は引き続き利用可能ですが、将来的に削除される予定です。

名前変更の理由は、古い名前が実際の動作を表しておらず混乱の元になっていたからです。

#9591: comma-style exceptions.NewExpression

new 演算子による関数呼び出しでもカンマの位置をチェックするためのオプションが追加されました。

/*eslint comma-style: [error, last, { exceptions: { NewExpression: false }}] */

//✘ BAD
new Foo(a
       ,b
       ,c)

Open online demo

:thinking: :thought_balloon: 次のメジャーリリースでデフォルト false になると思われます。

✒️ eslint --fix をサポートしたルール

#9831: valid-jsdoc

preferpreferType オプションについて、自動修正をサポートしました。

/*eslint valid-jsdoc: [error, {
    prefer: {
        return: returns
    },
    preferType: {
        Number: number
    }
}] */

/**
 * @param {number} a An augend value.
 * @param {Number} b An addend value.
 * @return {number} the sum of `a` and `b`.
 */
function add(a, b) {
    return a + b
}

// ↓↓↓↓ 自動修正 ↓↓↓↓ //

/**
 * @param {number} a An augend value.
 * @param {number} b An addend value.
 * @returns {number} the sum of `a` and `b`.
 */
function add(a, b) {
    return a + b
}

Open online demo

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1