Skip to content

Commit

Permalink
Surround sort-default-props keywords with backticks and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
fsmaia authored and b0gok committed Jan 11, 2018
1 parent 6fdefcf commit 5770c72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/rules/jsx-sort-default-props.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Enforce propTypes declarations alphabetical sorting (react/jsx-sort-default-props)
# Enforce defaultProps declarations alphabetical sorting (react/jsx-sort-default-props)

Some developers prefer to sort propTypes declarations alphabetically to be able to find necessary declaration easier at the later time. Others feel that it adds complexity and becomes burden to maintain.
Some developers prefer to sort `defaultProps` declarations alphabetically to be able to find necessary declarations easier at a later time. Others feel that it adds complexity and becomes a burden to maintain.

## Rule Details

This rule checks all components and verifies that all defaultProps declarations are sorted alphabetically. A spread attribute resets the verification. The default configuration of the rule is case-sensitive.
This rule checks all components and verifies that all `defaultProps` declarations are sorted alphabetically. A spread attribute resets the verification. The default configuration of the rule is case-sensitive.

The following patterns are considered warnings:

Expand Down Expand Up @@ -94,4 +94,4 @@ When `true` the rule ignores the case-sensitivity of the declarations order.

## When not to use

This rule is a formatting preference and not following it won't negatively affect the quality of your code. If alphabetizing defaultProps declarations isn't a part of your coding standards, then you can leave this rule off.
This rule is a formatting preference and not following it won't negatively affect the quality of your code. If alphabetizing `defaultProps` declarations isn't a part of your coding standards, then you can leave this rule off.

0 comments on commit 5770c72

Please sign in to comment.