aws cdk - Github 超级 linter - Typescript 标准 linting 出错
我将 Super Linter 从版本 4.9.0 升级到了版本 5.0.0。自那以后,TS 标准代码检查失败。它在处理的每个文件上都会打印以下错误消息:
------
ts-standard: Standard for TypeScript! (https://github.com/standard/ts-standard)
/tmp/lint/bin/super-linter-ts-trouble.ts:0:0: Parsing error: ESLint was configured to run on `<tsconfigRootDir>/bin/super-linter-ts-trouble.ts` using `parserOptions.project`: /action/lib/.automation/tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file (null)
------
引用的网址上的提示对我不起作用。可以通过以下步骤重现错误:
git init
cdk init app --language=typescript
git add -A
git commit -m 'initial commit'
docker run -e RUN_LOCAL=true -e VALIDATE_TYPESCRIPT_STANDARD=true -v .:/tmp/lint github/super-linter:v5.0.0
如果你运行版本为 4.9.0 的 linter,它会报错,但文件仍会被处理:
docker run -e RUN_LOCAL=true -e VALIDATE_TYPESCRIPT_STANDARD=true -v .:/tmp/lint github/super-linter:v4.9.0
你对这个问题有任何想法,甚至解决方案吗?提前感谢