oxsecurity / megalinter

šŸ¦™ MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
https://megalinter.io
GNU Affero General Public License v3.0
1.95k stars 237 forks source link

Can only use standard as linter for typescript #2044

Closed KiritoStorm closed 2 years ago

KiritoStorm commented 2 years ago

Describe the bug Can't use any other linter for TypeScript then standard.

To Reproduce Here is my startup command from a batch script:

docker run --rm -it -v %dir%:/workdir ^
           -e DEFAULT_WORKSPACE=/workdir ^
           -e ENABLE=TYPESCRIPT,CSS ^
           -e ENABLE_LINTERS=TYPESCRIPT_ES,CSS_STYLELINT ^
           -e DISABLE_LINTERS=CSS_SCSS_LINT ^
             oxsecurity/megalinter-javascript

Expected behavior With this command I would expect that I can run the TYPESCRIPT_ES linter, but instead it runs standard. When I remove the enable/language options, it doesn't lint Typescript at all, same thing happens with TYPESCRIPT_PRETTIER.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context I like standard, but the problem with standard is you can't adjust the rules, that's the whole sense about it. There are 2 things that my team want's differently:

So the idea was to use ESLint with modified standard rules.

Other ideas:

Any ideas what would make the most sense in combination with MegaLinter?

KiritoStorm commented 2 years ago

I realized the problem was that I forgot to copy the config files.

nvuillam commented 2 years ago

All good ? :)

KiritoStorm commented 2 years ago

Yes, all good. :) I was just a bit confused how I should use MegaLinter in combination with the mentioned linters.

It would be cool to have a bit more options in TypeScript, everything is JavaScript based:

Here is an example what you can do with TypeScript ESLint (.eslintrc.js), that has worked for me.

nvuillam commented 2 years ago

Typescript Eslint is already supported by MegaLinter :)

https://oxsecurity.github.io/megalinter/latest/descriptors/typescript_eslint/

KiritoStorm commented 2 years ago

Okay, it's a bit confusing because it looks exactly the same like the JavaScript ESLint side, but it's a different project site.

So it would be helpful in my opinion to adjust the documentation. :)

nvuillam commented 2 years ago

This is the same eslint than for javascript, with typescript targetted eslint plugins :)

KiritoStorm commented 2 years ago

Alright so it's pretty similar to the TypeScript ESLint project, sorry I'm a bit confused. šŸ˜…

nvuillam commented 2 years ago

It is not similar, it is the same: https://typescript-eslint.io/ is the project for eslint plugins made just for typescript ^^

nvuillam commented 2 years ago

If you check the installation instructions, it starts with eslint :)

https://typescript-eslint.io/docs/

KiritoStorm commented 2 years ago

Alright, thank you :)