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

(types): enforce stricter typings #475

Merged
merged 1 commit into from
Feb 2, 2020
Merged

Conversation

agilgur5
Copy link
Collaborator

  • noUnusedParameters, noImplicitReturns, and noFallthroughCasesInSwitch

    • improve typings for 1 unused parameter and 1 implicit return
  • also remove noImplicitAny as that's redundant with strict: true

This is the same level of strictness as in the templates and I believe the highest level of strictness (I use the same level in my own libraries too).

The description of noImplicitReturns is a bit different from the name, not sure if it would've helped with something like #371 or not.

- noUnusedParameters, noImplicitReturns, and noFallthroughCasesInSwitch
  - improve typings for 1 unused parameter and 1 implicit return

- also remove noImplicitAny as that's redundant with strict: true
@@ -14,7 +14,7 @@ export async function createEslintConfig({
pkg,
rootDir,
writeFile,
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig']> {
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig'] | void> {
Copy link
Collaborator Author

@agilgur5 agilgur5 Jan 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I typed it as void as well because it seems intentional that when --writeFile succeeds, it doesn't return config (because it does return config when it errors/the catch case), but I'm not sure if that actually is intentional.

Maybe it makes sense to return config in all cases? Idk, I don't normally touch much code outside of tsdx build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants