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

feat: add require-inexact-type rule #408

Merged
merged 2 commits into from
Jun 10, 2019
Merged

feat: add require-inexact-type rule #408

merged 2 commits into from
Jun 10, 2019

Conversation

goodmind
Copy link
Contributor

@goodmind goodmind commented Jun 10, 2019

Duplicate of same lint in new Flow version
This syntax exists from Flow v0.84

@gajus gajus merged commit ab62a49 into gajus:master Jun 10, 2019
@gajus
Copy link
Owner

gajus commented Jun 10, 2019

🎉 This PR is included in version 3.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Jun 10, 2019
@mrtnzlml
Copy link
Contributor

Hi @goodmind! I tried this new lint rule on our monorepo and seems like it reports few false positives. For example, have a look at this file:

// @flow strict

export interface ILogger {
  log(...message: $ReadOnlyArray<string>): void;
  warn(...message: $ReadOnlyArray<string>): void;
  error(...message: $ReadOnlyArray<string>): void;
}

It reports the following error:

  3:26  error  Type must be explicit inexact  flowtype/require-inexact-type

It doesn't sound right (fails for basically every interface). Is it a bug or problem in our code? I see this case is not covered in your tests and I am not sure how should I fix it. Thanks for checking it.

@goodmind
Copy link
Contributor Author

@mrtnzlml fixed

adeira-github-bot pushed a commit to kiwicom/eslint-config-kiwicom that referenced this pull request Jun 10, 2019
I had to wait a little bit because of this issue: gajus/eslint-plugin-flowtype#408 (comment) (fixed here: gajus/eslint-plugin-flowtype#409).

Implicit inexact objects are now officially disabled in Universe.

kiwicom-source-id: 9eda5b44be7928d6b4ff505b5e447b8c75dbda1b
adeira-github-bot pushed a commit to kiwicom/relay that referenced this pull request Jun 10, 2019
I had to wait a little bit because of this issue: gajus/eslint-plugin-flowtype#408 (comment) (fixed here: gajus/eslint-plugin-flowtype#409).

Implicit inexact objects are now officially disabled in Universe.

kiwicom-source-id: 9eda5b44be7928d6b4ff505b5e447b8c75dbda1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants