-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TYPESCRIPT_STANDARD seems to use the vanilla js-standard instead of their recommended ts-standard, causing false positives etc #2736
Comments
It probably changed since the creation of MegaLinter :) Would you like to make the upgrade PR ? It's probably just cli_executable to force to |
Yes, standard created a sublinter-project for the TS-variant due to the differences since then, https://github.com/standard/ts-standard. . So, started looking at it. it will have to be treated as a new linter basically (as that what it really is TYPESCRIPT_TS_STANDARD should be the natural convention for that take. |
Alrigthee, I had a go, see the pr. Should be a start at least!:) |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
@janderssonse can we close the issue now ts-standard is here ? :) |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
Plz reopen the issue if you think it deserves to be :) |
Describe the bug
When enablling standard linter with typescript, megalinter seems to use the vanilla js(standard) flavour instead of their ts-standard flavour. This will work partially but have bugs for TS-linting, like false positives for no-unused-vars and other rules.
To Reproduce
Have a look in the https://standardjs.com/index.html#typescript which recommends the ts-standard, and then in the megalinter docker image which installs standard https://github.com/oxsecurity/megalinter/blob/f27a593354d8787fe2b130fe292f87a55c964088/linters/typescript_standard/Dockerfile#LL90C6-L90C6
For real life test of one these errors with megalinter, create a ts-project, an enum and use the enum variables in other imported classes. Lint with TYPESCRIPT_STANDARD, some things will work but you will get linting errors, as standard can't handle these /ts-standard can).
Expected behavior
When enabling TYPESCRIPT_STANDARD ts-standard will be used.
The text was updated successfully, but these errors were encountered: