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

ESLint rule for PropTypes capitalization. #3329

Closed
pferreir opened this issue Apr 25, 2018 · 1 comment · May be fixed by import-js/eslint-plugin-import#1143
Closed

ESLint rule for PropTypes capitalization. #3329

pferreir opened this issue Apr 25, 2018 · 1 comment · May be fixed by import-js/eslint-plugin-import#1143
Assignees
Projects

Comments

@pferreir
Copy link
Member

No description provided.

@pferreir pferreir created this issue from a note in Release 2.2 (To do) Apr 25, 2018
@mic4ael mic4ael self-assigned this Apr 25, 2018
@ThiefMaster
Copy link
Member

ThiefMaster commented Jun 14, 2018

This should be done in a generic way and contributed as a new rule to eslint-plugin-import.

In the rule config you would specify a mapping dict between modules and the expected name for the default export. In this case it would be {'prop-types': 'PropTypes'}

A second step would be adding an automated fixer to the rule as well, to rename incorrectly-named imports.

@mic4ael mic4ael moved this from To do to In progress in Release 2.2 Jul 19, 2018
@pferreir pferreir moved this from In progress to Awaiting Merge in Release 2.2 Oct 23, 2018
mic4ael added a commit to mic4ael/eslint-plugin-import that referenced this issue Oct 26, 2018
Release 2.2 automation moved this from Awaiting Merge to Done Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release 2.2
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants