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

Fix no-useless-constructor rule in TypeScript #6862

Merged
merged 1 commit into from Apr 24, 2019

Conversation

@ianschmitz
Copy link
Collaborator

commented Apr 23, 2019

Fixes #6861.

@TomasHubelbauer

This comment has been minimized.

Copy link

commented Apr 23, 2019

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

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 23, 2019

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

@iansu

iansu approved these changes Apr 23, 2019

@mrmckeb
Copy link
Collaborator

left a comment

I also see:

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

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

@ianschmitz

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 24, 2019

@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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
netlify/create-react-app/deploy-preview Docs deploy preview succeeded
Details

@ianschmitz ianschmitz deleted the ianschmitz:useless-ctor-ts branch Apr 24, 2019

@lock lock bot locked and limited conversation to collaborators Apr 29, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.