LoginSignup
0
0

More than 1 year has passed since last update.

eslint 再帰ファイル検索のやり方

Last updated at Posted at 2022-12-24

eslintでカレントディレクトリ配下のすべてのjsファイルまたはmjsファイルをチェックするには以下のように指定する。

eslint '**/*.{js,mjs}'

Windowsコマンドプロンプトなら、パスを二重引用符で囲む

eslint "**/*.{js,mjs}"

ディレクトリパスを指定するなら

eslint "./src/**/*.{js,mjs}"

あるいは

eslint ./ --ext .js,.mjs
eslint ディレクトリパス --ext .js,.mjs

参考
ESLintのglobパターンがマッチしない問題の対処
Eslint glob (**) is not considering all directories recursively

0
0
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
0
0