Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Add typedef rule #13

Merged
merged 2 commits into from Jan 26, 2019
Merged

Add typedef rule #13

merged 2 commits into from Jan 26, 2019

Conversation

sindresorhus
Copy link
Owner

@sindresorhus sindresorhus commented Jan 21, 2019

@sindresorhus
Copy link
Owner Author

@SamVerschueren What do you think about this rule? I kinda like having to be explicit about types, but I noticed it caused as lot of violations in Ow.

@SamVerschueren
Copy link
Contributor

I'm +1 on this. I sometimes write a complex function but end up returning different types which would've been caught by this.

I noticed it caused as lot of violations in Ow.

We should fix it :)

It feels moot having to specify the type when the type is already clear from the context.
@sindresorhus
Copy link
Owner Author

I dropped variable-declaration. It's just too annoying. It requires changing const x = 'foo'; to const x: string = 'foo';, which is totally meaningless.

@sindresorhus sindresorhus merged commit a7d6b43 into master Jan 26, 2019
@sindresorhus sindresorhus deleted the typedef branch January 26, 2019 11:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants