UNPKG

eslint-plugin-reblend

Version:

Reblend specific linting rules for ESLint

38 lines (23 loc) • 879 B
# Disallow duplicate properties in JSX (`reblend/jsx-no-duplicate-props`) šŸ’¼ This rule is enabled in the ā˜‘ļø `recommended` [config](https://github.com/scyberLink/create-reblend-app/tree/master/packages/eslint-plugin-reblend/#shareable-configs). <!-- end auto-generated rule header --> Creating JSX elements with duplicate props can cause unexpected behavior in your application. ## Rule Details Examples of **incorrect** code for this rule: ```jsx <Hello name="John" name="John" /> ``` Examples of **correct** code for this rule: ```jsx <Hello firstname="John" lastname="Doe" /> ``` ## Rule Options ```js ... "reblend/jsx-no-duplicate-props": [<enabled>, { "ignoreCase": <boolean> }] ... ``` ### `ignoreCase` When `true` the rule ignores the case of the props. Default to `false`. ## When Not To Use It If you are not using JSX then you can disable this rule.