Raynos / tsdocstandard

Standard but also use TypeScript on JS files with jsdoc.
MIT License
32 stars 2 forks source link

Questions #6

Open tinchoz49 opened 4 years ago

tinchoz49 commented 4 years ago

Hey @Raynos

First I want to share with you how I was using tsdocstandard. Maybe you can take something for the documentation.

In a clean project I installed tsdocstandard local using an alias: npm install -D standard@npm:tsdocstandard

By doing this I can use tsdocstandard with vscode-standard and it works very well.

My questions are:

  1. I have some client projects using semistandard, how can I use tsdocstandard + semistandard?
  2. Do you know if there is a way to not having to define a tsconfig.json? Like having a default tsconfig.json with { "allowJs": true,"checkJs": true }.
Raynos commented 4 years ago

I believe ts supports jsconfig.json aswell.

You need to configure typescript and you need to run tsc && tsdocstandard together.

The linter won’t work if then typescript checker fails.

Raynos commented 4 years ago

As for semistandard. I can look into allowing rule overwrites like standardx

Raynos commented 4 years ago

I added a usage section ( https://github.com/Raynos/tsdocstandard#usage ).

tinchoz49 commented 4 years ago

Thanks, I was thinking on work in a PR to add the support for semistandard. I don't know yet if it should be through a flag or maybe by detecting semistandard installed locally?

Raynos commented 4 years ago

adding a --semi flag seems pretty straight forward. ( https://github.com/standard/eslint-config-semistandard/blob/master/.eslintrc.js )

It looks like it's literally two eslint rules. setting those two rules programatically should be fine.

tinchoz49 commented 4 years ago

It looks like it's literally two eslint rules. setting those two rules programatically should be fine.

That's right