LoginSignup
2
1

More than 5 years have passed since last update.

ESLint v5.7.0

Last updated at Posted at 2018-10-14

v5.6.0 | 次 v5.8.0

ESLint 5.7.0 がリリースされました。
小さな機能追加とバグ修正が行われました。

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

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

🚀 本体への機能追加

特になし。

💡 新しいルール

特になし。

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

#10783: camelcase allow

特定のパターンに合致する名前を許可するオプションが追加されました。

「原則的にキャメルケースを使うが、特定のライブラリが要求する非キャメルケースの名前を許可したい」場合に使います。

/*eslint camelcase: [error, { allow: ["^UNSAFE_"] }] */

//✘ BAD
const obj1 = { foo_bar: 1 }

//✔ GOOD
const obj2 = { UNSAFE_foo: 1 }

Open demo

#10916: padding-line-between-statements iife

IIFE イディオムの前後の空白行について設定するためのオプションが追加されました。

/*eslint padding-line-between-statements: [
  error,
  { blankLine: "always", prev: "iife", next: "*" }
] */

//✘ BAD
{
  (function() {
    // do something.
  })()
  foo()
}
//✔ GOOD
{
  (function() {
    // do something.
  })()

  foo()
}

Open demo

#10925: no-tabs allowIndentationTabs

行頭のタブ文字を許可するオプションが追加されました。

/*eslint no-tabs: [error, { allowIndentationTabs: true }] */

//✘ BAD
const a =   "← tab"

//✔ GOOD
{
    const b = "← tab at the start of this line"
}

Open demo

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

特になし。

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

特になし。

2
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
2
1