gpt4 book ai didi

javascript - 如何忽略 tslint 的特定目录或文件?

转载 作者:IT王子 更新时间:2023-10-29 02:41:54 27 4
gpt4 key购买 nike

正在使用的 IDE 是 WebStorm 11.0.3,tslint 已配置并且可以工作,但是,它挂起,因为它试图解析大型 *.d.ts 库文件。

有没有办法忽略特定文件或目录?

最佳答案

更新tslint v5.8.0

Saugat Acharya 所述,您现在可以更新 tslint.json CLI 选项:

{
"extends": "tslint:latest",
"linterOptions": {
"exclude": [
"bin",
"lib/*generated.js"
]
}
}

更多信息 in this pull request .


此功能已通过 tslint 3.6 引入

tslint \"src/**/*.ts\" -e \"**/__test__/**\"

您现在可以添加 --exclude(或 -e)参见 PR在这里。

命令行

usage: tslint [options] file ...

Options:

-c, --config configuration file
--force return status code 0 even if there are lint errors
-h, --help display detailed help
-i, --init generate a tslint.json config file in the current working directory
-o, --out output file
-r, --rules-dir rules directory
-s, --formatters-dir formatters directory
-e, --exclude exclude globs from path expansion
-t, --format output format (prose, json, verbose, pmd, msbuild, checkstyle) [default: "prose"]
--test test that tslint produces the correct output for the specified directory
-v, --version current version

你正在考虑使用

-e, --exclude         exclude globs from path expansion

关于javascript - 如何忽略 tslint 的特定目录或文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34578677/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com