Skip to content

(types): enforce stricter typings#475

Merged
swyxio merged 1 commit intojaredpalmer:masterfrom
agilgur5:type-reqs
Feb 2, 2020
Merged

(types): enforce stricter typings#475
swyxio merged 1 commit intojaredpalmer:masterfrom
agilgur5:type-reqs

Conversation

@agilgur5
Copy link
Copy Markdown
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
Comment thread src/createEslintConfig.ts
rootDir,
writeFile,
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig']> {
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig'] | void> {
Copy link
Copy Markdown
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