Skip to content
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

Making ts-standard easier to use #102

Closed
theoludwig opened this issue Nov 11, 2020 · 4 comments · Fixed by #254
Closed

Making ts-standard easier to use #102

theoludwig opened this issue Nov 11, 2020 · 4 comments · Fixed by #254
Labels
enhancement New feature or request

Comments

@theoludwig
Copy link
Member

theoludwig commented Nov 11, 2020

I was going through the issues of standard in the original repo, and I saw that issue : standard/standard#1356

What problem do you want to solve?

I feel like ts-standard should follow the principles/rules as close as possible of standard.

What do you think is the correct solution to this problem?

  • Build in snazzy so users can do ts-standard --report=snazzy and get pretty output maybe we can add package.json options as well.
    Also, in the standard issue, they're talking about standard-json and standard-tap.

  • Build-in prettier would be awesome, maybe if we do ts-standard --format, it automatically runs prettier + ts-standard --fix.
    prettier also runs in .md, .json, .yaml, .css files etc. not only in .js or .ts

    I see that this project is using this script in package.json :
    "lint": "prettier --write '**/*.{ts*,js*,yml}' && bin/cmd.js --fix && tsc --noEmit"

    and this prettier configuration :

    "prettier": {
      "singleQuote": true,
      "semi": false
    }

    What if we would not need to do all these configurations ourselves and ts-standard will do it for us ?

Are you willing to submit a pull request to implement this change?

Yes of couse!

@theoludwig theoludwig added the enhancement New feature or request label Nov 19, 2020
@theoludwig
Copy link
Member Author

Any thoughts ? @toddbluhm

@toddbluhm
Copy link
Collaborator

@divlo Thanks for the feedback. Initially, my goal for this package was to mimick standard as close as possible and keep feature parity with standard. However, your right, it looks like @feross is trying to improve the ease of use of standard

I'd say go for it! It might be cool to have this package be a test-bed for new standard features.

Make sure all new features are behind some sort of flag and opt-in only. All existing standard flags should continue to perform exactly like the regular standard that way we maintain full parity/backward compatibility with it.

@theoludwig
Copy link
Member Author

theoludwig commented Nov 20, 2020

Alright, I will try to open a pull request to add the --format flag to the CLI. 👍

I just cloned the repo but when I run npm run lint, I've got errors thrown by tsc --noEmit command, so I will first open a PR (see #104) to update dependencies and try to fix this issue, maybe once this is fixed, we could release the v10 release (also there is no standard organization on npm) before adding --format flag.

@feross
Copy link
Member

feross commented Nov 23, 2020

also there is no standard organization on npm

Our organization on npm is called standardjs because standard is being used by someone with private packages.

If you're keen to work on these issues, I'd love to solve it in standard-engine (where that makes sense) so that all downstream packages like standard, semistandard, ts-standard, etc. benefit and maybe we can close standard/standard#1356 at the same time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants