[英]How to get ESLint to only process .ts files?
I want ESLint skip processing.js files and only deal with.ts files.我希望 ESLint 跳过 processing.js 文件,只处理.ts 文件。
To that end, I created .eslintignore
and added:为此,我创建了
.eslintignore
并添加了:
*.js
**/*.js
However, it seems like ESLint ignores this file.然而,似乎 ESLint 忽略了这个文件。 Am I missing something simple here?
我在这里错过了一些简单的东西吗?
Assuming all the other typescript-eslint config is configured, you have to explicitly tell ESLint you want to include those file extensions:假设所有其他 typescript-eslint 配置都已配置,您必须明确告诉 ESLint 您要包含这些文件扩展名:
eslint <path to files> --ext ts
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.