Skip to content

Eslint giving error for duplicate props #10064

@mehrdad-shokri

Description

@mehrdad-shokri

This is not a bug request, but rather, it's a discussion on the reasons why you named 2 prop types of TextField almost the same with one being upper case.
According to TextField API,
TextField exposes two prop types with almost same names. InputProps and inputProps.
Currently, my Eslint gives me an error for having duplicate prop type.
Is there any reason to name 2 prop types almost the same?
Can't we rename 1 of them to something more clarifying?
This also gives headaches with linting tools.

Expected Behavior

Eslint or any other linting tool doesn't give me any duplicate error.(react/jsx-no-duplicate-props).

Current Behavior

Eslint throwing duplicate prop error.

Plugin is located here.

##Temporal solution
Yes, you can set ignoreCase to false in .eslintrc but isn't it better to name our props in a more definitive way?
Thank you.

Your Environment

Tech Version
Material-UI 1.0.0-beta30
React ^16.0.0
eslint ^4.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: text fieldChanges related to the text field.support: questionCommunity support but can be turned into an improvement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions