22
12

More than 5 years have passed since last update.

ESLint v6.2.0

Last updated at Posted at 2019-08-20

v6.1.0 | 次 v6.3.0

ESLint 6.2.0 がリリースされました。

お盆休み中に ESTree 仕様が更新されたので、BigInt と Dynamic Imports 構文をサポートしました。

既知の問題:

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

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

🚀 本体への機能追加

BigInt と Dynamic Imports をサポートしました。

これらを利用するには、env.es2020 設定と、(デフォルトのパーサーでは) parserOptions.ecmaVersion 設定を指定します。

.eslintrc.json
{
    "parserOptions": {
        "ecmaVersion": 2020
    },
    "env": {
        "es2020": true
    }
}
  • parserOptions.ecmaVersion 設定により、新しい構文 (import("source")100n) が有効になります。
  • env.es2020 設定により、新しいグローバル変数 (BigInt, BigInt64Array, BigUint64Array) が有効になります。

設定ファイルに noInlineConfig プロパティが追加されました。

🔖 RFC 22, #12091

.eslintrc.json
{
    "noInlineConfig": true
}

この設定は --no-inline-config CLI オプションとほぼ同等です。今まで CLI でしか指定できなかったものが設定ファイルでも指定できるようになりました。

💡 新しいルール

function-call-argument-newline

関数呼び出しの各実引数の間に改行を入れるかどうかを矯正するスタイル ルールが追加されました。

/* eslint function-call-argument-newline: [error, consistent] */

//✘ BAD
foo(a, b,
    c);

//✔ GOOD
foo(a, b, c);
foo(
    a,
    b,
    c
);

Online Demo

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

特になし。

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

特になし。

⚠️ 非推奨になったルール

特になし。

22
12
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
22
12