Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix no-useless-constructor rule in TypeScript #6862

Merged
merged 1 commit into from
Apr 24, 2019

Conversation

ianschmitz
Copy link
Contributor

Fixes #6861.

@TomasHubelbauer
Copy link
Contributor

I might be reading this wrong but doesn't this just disable the rule? Will things like

constructor(props: MyProps) {
  super(props);
}

Still get reported as they IMO should?

@ianschmitz
Copy link
Contributor Author

This turns off the ESLint rule for typescript files in favor of the typescript-eslint equivalent rule

Copy link
Contributor

@mrmckeb mrmckeb left a comment

Choose a reason for hiding this comment

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

I also see:

camelcase: 'off',	
indent: 'off',

I'm OK with removing those, but just wanted to ensure that was deliberate.

@ianschmitz
Copy link
Contributor Author

@mrmckeb yes that was intentional. I originally had copied that in from the recommended preset of typescript-eslint, but we don't have either of those ESLint rules enabled so they're not needed

@ianschmitz ianschmitz merged commit 0022607 into facebook:master Apr 24, 2019
@ianschmitz ianschmitz deleted the useless-ctor-ts branch April 24, 2019 14:35
@lock lock bot locked and limited conversation to collaborators Apr 29, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-useless-constructor eslint rule with typescript false positive
5 participants