フォルダーの特定のルールを無効にする方法はありますか? たとえば、フォルダー内のすべてのテスト ファイルに必須の JSDoc コメントを含めたくないのですが、test
これを行う方法はありますか?
ベストアンサー1
eslint ルールから一部のフォルダーを無視するには、ルート ディレクトリにファイルを作成し.eslintignore
、そこに省略するフォルダーへのパスを追加します ( の場合と同じ方法.gitignore
)。
ESLintのドキュメントからの例を以下に示します。ファイルとディレクトリを無視する:
# path/to/project/root/.eslintignore
# /node_modules/* and /bower_components/* in the project root are ignored by default
# Ignore built files except build/index.js
build/*
!build/index.js