-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[New]
sort-prop-types
: give errors on TS types
- Loading branch information
Showing
4 changed files
with
178 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,8 @@ class Component extends React.Component { | |
"ignoreCase": <boolean>, | ||
"requiredFirst": <boolean>, | ||
"sortShapeProp": <boolean>, | ||
"noSortAlphabetically": <boolean> | ||
"noSortAlphabetically": <boolean>, | ||
"checkTypes": <boolean> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ljharb
Member
|
||
}] | ||
... | ||
``` | ||
|
@@ -170,6 +171,10 @@ var Component = createReactClass({ | |
}); | ||
``` | ||
|
||
### `checkTypes` | ||
|
||
When `true`, the sorting of prop type definitions are checked. | ||
|
||
## When Not To Use It | ||
|
||
This rule is a formatting preference and not following it won't negatively affect the quality of your code. If alphabetizing props declarations isn't a part of your coding standards, then you can leave this rule off. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello there, was it ever released?
I was misled by the documentation mentioning this option and saying that TS types are supported. While in reality, it's impossible to use this option yet.
Using
"eslint-plugin-react": "7.33.2",
cc @akulsr0