Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit edc3e68

Browse files
author
Mike Nikles
authored
Merge pull request #119 from mobify/add-sort-prop-types-rule
Enable sort-prop-types rule.
2 parents 094635d + c031fd0 commit edc3e68

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
2.5.2
2+
- Add a React rule to make sure propTypes are ordered, required ones declared first and callbacks (e.g. onChange) declared last.
23
- Update ES6 indent rule on switch statements
34
- Add ignore patterns for unused vars/args to the React configuration
45
- Ignore non-JS files and node_modules in the ES6 import module

es6/mobify-es6-react.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ rules:
2525
react/no-string-refs: error
2626
react/prefer-es6-class: error
2727
react/prefer-stateless-function: error
28+
react/sort-prop-types:
29+
- error
30+
- callbacksLast: true
31+
requiredFirst: true
2832

2933
# JSX formatting preferences
3034
react/self-closing-comp: error

0 commit comments

Comments
 (0)