tslint 5.20.0 can't read `tslint.yml` in project directory

Created on 23 Oct 2019  路  6Comments  路  Source: palantir/tslint

Bug Report

  • __TSLint version__: 5.20.0
  • __TypeScript version__: 3.5.2
  • __Running TSLint via__: CLI

Issue Description

tslint version 5.20.0 fails to read config from tslint.yml in project directory when linting whole project itself or any of its files. Downgrading to version 5.18.0 solves the issue

Actual behavior

~/app/client> ./node_modules/tslint/bin/tslint --project ./
Failed to load ~/app/client/tslint.yml: Cannot convert undefined or null to object

Expected behavior

~/app/client> ./node_modules/tslint/bin/tslint --project ./

ERROR: ~/app/client/src/pages/ts-analysis/components/Charts/ChartCard/index.tsx:46:21 - Multiline JS expressions inside JSX are forbidden
Needs More Info

Most helpful comment

Will do than soon

Ahhh... I can not reproduce with fresh install... Which sounds great, but annoying also :D

I'll try to diff dependencies version of current project (there are 3 of them affected with this issue) and freshly installed one and give my feedback soon

All 6 comments

Thanks for posting an issue @geraldus! I'm not able to reproduce any issues this tslint.yml:

---
rules:
  prefer-readonly: true
...

Could you please post a full reproduction that demonstrates the issue, such as a link to a GitHub repository? It'll be hard to help without that.

Thanks for posting an issue @geraldus! I'm not able to reproduce any issues this tslint.yml:

---
rules:
  prefer-readonly: true
...

Could you please post a full reproduction that demonstrates the issue, such as a link to a GitHub repository? It'll be hard to help without that.

I've just upgraded whole project (running yarn upgrade), issue persists. In my case the project is UMI JS project. If I restrict tslint version to 0.5.18 it works fine, otherwise fails with error mentioned above

@geraldus

Could you please post a full reproduction that demonstrates the issue, such as a link to a GitHub repository? It'll be hard to help without that.

@geraldus

Could you please post a full reproduction that demonstrates the issue, such as a link to a GitHub repository? It'll be hard to help without that.

Will do than soon

Will do than soon

Ahhh... I can not reproduce with fresh install... Which sounds great, but annoying also :D

I'll try to diff dependencies version of current project (there are 3 of them affected with this issue) and freshly installed one and give my feedback soon

馃 Beep boop! 馃憠 TSLint is deprecated 馃憟 and you should switch to typescript-eslint! 馃

馃敀 This issue is being locked to prevent further unnecessary discussions. Thank you! 馃憢

Was this page helpful?
0 / 5 - 0 ratings