Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master into feature #1

Merged
merged 178 commits into from
Dec 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
fcff54e
Allow LHS in destructuring-assignment
alexzherdev Jun 14, 2018
b6e911b
Remove unnecessary babel-eslint
alexzherdev Jun 14, 2018
f924414
Fix static propTypes handling in no-typos
alexzherdev Jun 14, 2018
2a674b0
Merge pull request #1825 from alexzherdev/1728-destructuring-state-as…
ljharb Jun 14, 2018
d68b9e8
Remove unnecessary babel-eslint and fix typo
alexzherdev Jun 15, 2018
48e386d
Merge pull request #1827 from alexzherdev/1677-no-typos-static-proptypes
ljharb Jun 15, 2018
1ecb622
Don't depend on state parameter name in no-unused-state
alexzherdev Jun 16, 2018
b5e86bf
Added `no-unsafe` rule
sergei-startsev Jun 17, 2018
5b08a1e
Adjusted `no-unsafe` rule
sergei-startsev Jun 19, 2018
5e17159
Added missed position details for `no-unsafe`
sergei-startsev Jun 19, 2018
e41500a
Added early termination for no-unsafe, adjusted tests to support ESLint3
sergei-startsev Jun 19, 2018
0285eef
Excluded `no-unsafe` from the recommended for now to avoid breaking c…
sergei-startsev Jun 20, 2018
7869530
Merge pull request #1831 from sergei-startsev/no-unsafe-rule
ljharb Jun 21, 2018
6b179ed
fix(sort-prop-types): correct guard against falsy
ferhatelmas Jun 22, 2018
4121b59
[Tests] clean up test matrix
ljharb Jun 23, 2018
c6cc4ab
[New] Allow eslint ^5
papandreou Jun 23, 2018
8122c8b
Account for UNSAFE_ method in no-will-update-set-state
alexzherdev Jun 24, 2018
5186b16
Merge pull request #1845 from alexzherdev/1844-no-set-state-unsafe-wi…
ljharb Jun 24, 2018
93ce3c5
[Dev Deps] update `babel-eslint`
ljharb Jun 24, 2018
7c5a16f
[Deps] update `has`, `prop-types`
ljharb Jun 24, 2018
157cc93
Update CHANGELOG and bump version
ljharb Jun 25, 2018
7dce90a
Update CHANGELOG.md
alexzherdev Jun 25, 2018
2889e89
[Refactor] `no-unused-state`: combine spread visitors
ljharb Jun 25, 2018
dc59667
[Fix] support JSXText nodes alongside Literal nodes
ljharb Jun 25, 2018
6f7cf87
Account for pragma in button-has-type
alexzherdev Jun 26, 2018
f80e744
Merge pull request #1851 from alexzherdev/1847-button-has-type-pragma
ljharb Jun 26, 2018
c4cef42
For deprecated lifecycle methods, report identifier node instead of t…
jsnajdr Jun 26, 2018
a5ded4d
Add line/column checks in tests for deprecated lifecycle methods
jsnajdr Jun 26, 2018
248c2ca
Remove endLine/Column tests: not supported in ESLint 3
jsnajdr Jun 26, 2018
8738e59
Output a warning if React version is missing in settings
alexzherdev Jun 27, 2018
2f56e47
sort-comp Allow methods to belong to any matching group.
nosilleg Jun 27, 2018
20779ff
Merge pull request #1857 from alexzherdev/1789-warn-version
ljharb Jun 28, 2018
71b522a
Stop crashing on undefined or null properties
nicholas-l Jun 28, 2018
f27285f
Merge pull request #1854 from jsnajdr/lifecycle-method-node-ident
ljharb Jun 28, 2018
0b0e462
sort-comp #1858 PR amendments
nosilleg Jun 29, 2018
386efc3
Make attribute "charset" valid
silvenon Jun 29, 2018
1615ae8
Fix JSX Syntax
peter-mouland Jun 29, 2018
c3e57c7
Merge pull request #1867 from peter-mouland/patch-4
ljharb Jun 30, 2018
5709271
[New] Add ignoreDOMComponents option to jsx-no-bind
alexzherdev Jun 30, 2018
809a25d
Merge pull request #1863 from silvenon/meta-charset
ljharb Jun 30, 2018
98ce807
sort-comp #1858 PR amendments
nosilleg Jul 2, 2018
1544d84
[Tests] fix `unit-test` script
ljharb Jul 3, 2018
be2ec76
[Fix] `button-has-type`: improve error message when an identifier is …
ljharb Jul 3, 2018
23d1d7b
[Tests] fix issue from 1544d84b5ff9fa96584011b68e2466b7ebcebbd9
ljharb Jul 3, 2018
03dcaff
Revert "[Tests] fix issue from 1544d84b5ff9fa96584011b68e2466b7ebcebbd9"
ljharb Jul 3, 2018
f06362b
Revert "[Tests] fix `unit-test` script"
ljharb Jul 3, 2018
4f2ef17
[Tests] fix unit-test script for real
ljharb Jul 3, 2018
8ecc53f
`button-has-type`: fix for node 4
ljharb Jul 3, 2018
d225a11
[Tests] fixing test script one final time
ljharb Jul 3, 2018
76a4120
sort-comp #1858 PR amendments
nosilleg Jul 4, 2018
704f5d9
Merge branch 'master' into patch-1
nicholas-l Jul 4, 2018
87a0818
Add test cases
nicholas-l Jul 4, 2018
4e26092
Merge pull request #1860 from nicholas-l/patch-1
ljharb Jul 4, 2018
b1f2b6f
[Docs] add missing urls
flyerhzm Jul 6, 2018
049d95e
[jsx-sort-props] Test reservedFirst/shorthandLast
fleischie Jul 12, 2018
21faf02
[jsx-sort-props] Fix rule's behavior
fleischie Jul 12, 2018
0ebcb62
Merge pull request #1883 from fleischie/jsx-sort-props/fix-reserved-f…
ljharb Jul 16, 2018
32b751f
Merge pull request #1858 from nosilleg/1821-sort-comp-order
ljharb Jul 16, 2018
2aa0955
Fix: Handle member expressions in jsx-props-no-multi-spaces
alexzherdev Jul 20, 2018
24b1a98
Add fixer for sort-prop-types
Jul 20, 2018
a0100f3
Merge pull request #1891 from finnp/sort-prop-types-fixer
ljharb Jul 21, 2018
1a28f3f
Merge pull request #1890 from alexzherdev/1881-no-multi-spaces-undefined
ljharb Jul 21, 2018
46fc48c
Add test case for jsx-indent
alexzherdev Jul 21, 2018
9bd3456
Merge pull request #1892 from alexzherdev/1852-jsx-indent-test-case
ljharb Jul 22, 2018
6e8dadb
Rule sort-prop-types add noSortAlphabetically
christophehurpeau Jul 23, 2018
fa90fe5
Update sort-prop-types.md
christophehurpeau Jul 23, 2018
622470f
Update sort-prop-types.js
christophehurpeau Jul 23, 2018
ab4ad96
Additional test case for literals as prop keys in prop-types
alexzherdev Jul 24, 2018
4e80833
Merge pull request #1898 from alexzherdev/1299-test-case-flow-literals
ljharb Jul 24, 2018
470fdd9
[Fix] Handle inline Flow type in boolean-prop-naming
alexzherdev Jul 27, 2018
05d781b
Merge pull request #1905 from alexzherdev/1700-boolean-prop-naming-fl…
ljharb Jul 27, 2018
c0fda3f
Make Components.get ignore components with confidence = 0
alexzherdev Jul 28, 2018
8a3f932
Add tests to destructuring-assignment
alexzherdev Jul 29, 2018
efe0c0c
Merge pull request #1907 from alexzherdev/1637-destructuring-assignme…
ljharb Jul 29, 2018
4382aa5
fix: destructuring-assignment ignore class properties
Jul 30, 2018
ef36ba9
Add a helper function for determining function-like expressions
alexzherdev Aug 5, 2018
7edc982
Fix lint error
alexzherdev Aug 5, 2018
9dbb834
Merge pull request #1914 from alexzherdev/is-function-helper
ljharb Aug 5, 2018
f2fdaa3
Extract declared propTypes detection code
alexzherdev Aug 2, 2018
5b5ebfa
Made prop-types pass
alexzherdev Aug 4, 2018
50cd5a6
Clean up and code review
alexzherdev Aug 4, 2018
a466a77
Merge pull request #1909 from alexandernanberg/fix/class-property-des…
ljharb Aug 5, 2018
bc9a8ea
Update jsx-props-no-multi-spaces.md
BenRichter Aug 8, 2018
9258d79
Merge pull request #1918 from BenRichter/patch-1
ljharb Aug 8, 2018
3567c5b
[New] Add allow option to jsx-one-expression-per-line
alexzherdev Aug 11, 2018
c1c3d19
Merge pull request #1911 from alexzherdev/1674-prop-types-refactoring
ljharb Aug 13, 2018
1eccf7f
Merge pull request #1924 from alexzherdev/1775-one-expression-options
ljharb Aug 13, 2018
599c028
Update CHANGELOG and bump version
ljharb Aug 13, 2018
564107c
Merge pull request #1897 from christophehurpeau/patch-1
ljharb Aug 13, 2018
b812416
Update changelog
ferhatelmas Aug 13, 2018
8a9d938
Merge pull request #1926 from ferhatelmas/fix-changelog
ljharb Aug 13, 2018
d78819d
Fix link in changelog
alexzherdev Aug 14, 2018
a33384d
Merge pull request #1929 from alexzherdev/patch-1
ljharb Aug 14, 2018
44a3bf6
[Fix] stop crashing when assigning to propTypes
alexzherdev Aug 14, 2018
27f9e08
Merge pull request #1932 from alexzherdev/1928-fix-assignment-handling
ljharb Aug 14, 2018
fb745ab
Update CHANGELOG and bump version
ljharb Aug 14, 2018
fb5c87f
Additional tests for prop-types and no-unused-prop-types
alexzherdev Aug 5, 2018
e5bf7da
Fix lint
alexzherdev Aug 15, 2018
2d28512
Add propTypes tests
alexzherdev Aug 15, 2018
a48cc61
Fix changelog "Ignore class properties" contributor
alexandernanberg Aug 16, 2018
d7ba7c6
Merge pull request #1941 from alexandernanberg/patch-1
ljharb Aug 16, 2018
6b239a7
Merge pull request #1939 from alexzherdev/prop-types-tests
ljharb Aug 20, 2018
72a71b3
[Fix] `jsx-no-target-blank`: don’t crash when there’s no value
ljharb Aug 21, 2018
e248365
Support shorthand fragments in Components
alexzherdev Aug 22, 2018
6cf535a
`jsx-curly-brace-presence`: support shorthand fragments
alexzherdev Aug 22, 2018
74d4251
Update jsx-no-target-blank.md
brunocoelho Aug 22, 2018
b161d7a
Merge pull request #1953 from brunocoelho/patch-1
ljharb Aug 22, 2018
2165858
`jsx-curly-spacing`: support shorthand fragments
alexzherdev Aug 24, 2018
ac7f3f5
`jsx-filename-extension`: support shorthand fragments
alexzherdev Aug 24, 2018
d537c06
`jsx-max-depth`: support shorthand fragments
alexzherdev Aug 25, 2018
83eb307
`jsx-one-expression-per-line`: support shorthand fragments
alexzherdev Aug 26, 2018
bace62c
`no-unescaped-entities`: support shorthand fragments
alexzherdev Aug 27, 2018
2899e57
`jsx-wrap-multilines`: support shorthand fragments
alexzherdev Aug 27, 2018
0a68c28
Test for #1694
alexzherdev Aug 27, 2018
128b38f
`jsx-closing-tag-location`: support shorthand fragments
alexzherdev Sep 5, 2018
18898e1
`jsx-uses-react`: support shorthand fragments
alexzherdev Sep 5, 2018
dd00d8a
`jsx-indent`: support shorthand fragments
alexzherdev Sep 7, 2018
083adf8
`jsx-child-element-spacing`: support shorthand fragments
alexzherdev Sep 8, 2018
3d0580f
`jsx-no-comment-textnodes`: add tests for shorthand fragments
alexzherdev Sep 8, 2018
c1b6da0
`jsx-no-literals`: add tests for shorthand fragments
alexzherdev Sep 8, 2018
8215be3
Fix linting error
alexzherdev Sep 8, 2018
95d3c3f
Merge pull request #1956 from alexzherdev/1694-fragments
ljharb Sep 8, 2018
dc28d26
[New] Support "detect" option for React version setting
alexzherdev Sep 9, 2018
f0e2e1e
[Fix] `sort-prop-types`: fix string property order
metreniuk Sep 10, 2018
089d545
[Fix] `destructuring-assignment`: handle nested props usage
alexzherdev Sep 14, 2018
60b5642
Merge pull request #1983 from alexzherdev/1982-destructuring-class-pr…
ljharb Sep 14, 2018
51f9c6a
jsx-wrap-multilines now catches single missing newlines (#1965)
MrHen Sep 16, 2018
eae31a0
add example of complete react/jsx-no-target-blank rule
tom-nexudus Sep 18, 2018
658379a
undid editor prettifying opinions
tom-nexudus Sep 18, 2018
c885535
Fix `no-this-in-sfc` behavior for arrow functions
sergei-startsev Sep 19, 2018
1a9d54c
Fixed typo, added more tests
sergei-startsev Sep 19, 2018
ac78b51
quotes for json key, reordered information
atomcorp Sep 19, 2018
e0d5821
Add a test to cover FunctionDeclaration type as a parent scope
sergei-startsev Sep 20, 2018
a93080e
Merge pull request #1989 from sergei-startsev/fix-1967-no-this-in-sfc
ljharb Sep 20, 2018
eb69dc5
Merge pull request #1988 from atomcorp/master
ljharb Sep 20, 2018
82e4f41
Use explicit fixes for tests
MrHen Sep 20, 2018
dd6f130
Extract used prop types detection code
alexzherdev Aug 11, 2018
deae58e
Add test cases
alexzherdev Aug 19, 2018
3794588
Move used prop type flag setting to new helper
alexzherdev Aug 20, 2018
cf43b2e
Replace for..in with Array.prototype methods
alexzherdev Aug 21, 2018
fd03bd7
Filter arrays instead of if conditions
alexzherdev Sep 20, 2018
bd083bf
Merge pull request #1946 from alexzherdev/used-prop-types-refactoring
ljharb Sep 20, 2018
efb5bd7
Extract defaultProps detection code from default-props-match-prop-types
alexzherdev Aug 11, 2018
ce9ba34
Make require-default-props use defaultProps detection
alexzherdev Aug 11, 2018
b81e19a
Use object.fromentries
alexzherdev Aug 20, 2018
68d6384
Fix `no-this-in-sfc` for class properties
sergei-startsev Sep 24, 2018
6075926
Merge pull request #1942 from alexzherdev/default-props-detection
ljharb Sep 27, 2018
70155b4
Extract isRequired detection from default-props-match-prop-types
alexzherdev Aug 11, 2018
2e4f91a
Make require-default-props use isRequired detection
alexzherdev Aug 12, 2018
4d1b833
Add test for #1908
alexzherdev Aug 18, 2018
5211a2b
Add test for #1865
alexzherdev Sep 27, 2018
d8a615f
Use filter instead of if/return
alexzherdev Sep 27, 2018
9cf86d1
`display-name` docs: mention default `ignoreTranspilerName` value
OliverJAsh Sep 27, 2018
843fef9
Merge pull request #2002 from OliverJAsh/patch-1
ljharb Sep 27, 2018
08e9d0b
Extract util functions to AST utils
sergei-startsev Sep 27, 2018
7b37681
Remove redundant require('babel-eslint') from tests
sergei-startsev Sep 28, 2018
fee8c36
Remove redundant `require('babel-eslint')`
sergei-startsev Sep 28, 2018
e779b00
Minor adjustments
sergei-startsev Sep 28, 2018
aef3ee9
Merge pull request #2004 from sergei-startsev/remove-redundant-requires
ljharb Sep 28, 2018
b77be96
Merge pull request #1995 from sergei-startsev/fix-1960-no-this-in-sfc
ljharb Sep 29, 2018
d0765dd
Merge pull request #1829 from alexzherdev/1759-state-parameter-names
ljharb Oct 1, 2018
8f2663e
Merge pull request #2001 from alexzherdev/1908-required-prop-types-de…
ljharb Oct 2, 2018
eafd19d
[New] `jsx-no-literals`: print node value in warning message
jlgonzalezdev Oct 5, 2018
c2ae5d3
[Fix] `jsx-sort-comp`: Fix fixer in case of more than 10 props
tihonove Oct 8, 2018
5dddbf4
Merge pull request #2008 from jlgonzalezdev/master
ljharb Oct 11, 2018
773277d
add more escape examples
stevemao Oct 13, 2018
bc6a1ba
Merge pull request #2015 from stevemao/patch-1
ljharb Oct 14, 2018
24044e0
Merge pull request #1978 from alexzherdev/1955-react-version-detect
ljharb Oct 16, 2018
aa4c339
Use `range[1]` instead of `end`, as it has wider parser support.
Oct 24, 2018
a7cbf40
Add tests around the functionality of a parser without start/end values.
Oct 24, 2018
a92a0fb
Merge pull request #2026 from HauptmannEck/master
ljharb Oct 24, 2018
2e60d0e
[New] add rule to enforce fragment syntax
alexzherdev Sep 23, 2018
3008e85
Merge pull request #1984 from MrHen/master
ljharb Oct 31, 2018
b61ad5c
Apply allowInPropTypes option to class property
Sheile Nov 12, 2018
8671f05
Update jsx-sort-props.md
DimitarNestorov Nov 13, 2018
d027520
Merge pull request #2044 from dimitarnestorov/patch-1
ljharb Nov 13, 2018
e133f1c
Merge pull request #2040 from Sheile/fix/allow-in-proptypes
ljharb Nov 15, 2018
6d9e7bb
[Fix] ensure that react and flow versions can be numbers
ljharb Nov 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ logs
reports
build
node_modules
!tests/**/node_modules
npm-debug.log
sftp-config.json

Expand Down
30 changes: 10 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sudo: false
language: node_js
node_js:
- '10'
- '9'
- '8'
- '7'
Expand All @@ -15,36 +16,25 @@ script:
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
- 'if [ -n "${TEST-}" ]; then npm run unit-test ; fi'
env:
- TEST=true
global:
- TEST=true
matrix:
- ESLINT=5
- ESLINT=4
- ESLINT=3
after_success:
- 'if [ -n "${TEST-}" ]; then npm run coveralls ; fi'
matrix:
fast_finish: true
include:
- node_js: 'lts/*'
env: PRETEST=true
- node_js: '9'
env: TEST=true ESLINT=next
- node_js: '8'
env: TEST=true ESLINT=next
- node_js: '7'
env: TEST=true ESLINT=next
- node_js: '6'
env: TEST=true ESLINT=next
- node_js: '9'
env: TEST=true ESLINT=3
- node_js: '8'
env: TEST=true ESLINT=3
- node_js: '7'
env: TEST=true ESLINT=3
- node_js: '6'
env: TEST=true ESLINT=3
exclude:
- node_js: '5'
env: TEST=true ESLINT=3
env: ESLINT=5
- node_js: '4'
env: TEST=true ESLINT=3
env: ESLINT=5
allow_failures:
- node_js: '9'
- node_js: '7'
- node_js: '5'
- env: TEST=true ESLINT=next
96 changes: 96 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,100 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com).

## [7.11.1] - 2018-08-14
### Fixed
* stop crashing when assigning to propTypes ([#1932][], @alexzherdev)

### Changed
* Fix changelog links ([#1926][], @ferhatelmas)
* Fix changelog links ([#1929][], @alexzherdev)

[#1932]: https://github.com/yannickcr/eslint-plugin-react/pull/1932
[#1929]: https://github.com/yannickcr/eslint-plugin-react/pull/1929
[#1926]: https://github.com/yannickcr/eslint-plugin-react/pull/1926

## [7.11.0] - 2018-08-13
### Added
* [`jsx-one-expression-per-line`][]: add "allow" option ([#1924][], @alexzherdev)
* [`sort-prop-types`][]: add autofix ([#1891][], @finnp)
* [`jsx-no-bind`][]: Add ignoreDOMComponents option ([#1868][], @alexzherdev)
* Output a warning if React version is missing in settings ([#1857][], @alexzherdev)

### Fixed
* [`destructuring-assignment`][]: Ignore class properties ([#1909][], @alexandernanberg)
* [`destructuring-assignment`][], component detection: ignore components with confidence = 0 ([#1907][], @alexzherdev)
* [`boolean-prop-naming`][]: Handle inline Flow type ([#1905][], @alexzherdev)
* [`jsx-props-no-multi-spaces`][]: Handle member expressions ([#1890][], @alexzherdev)
* [`sort-comp`][]: Allow methods to belong to any matching group ([#1858][], @nosilleg)
* [`jsx-sort-props`][]: Fix `reservedFirst` ([#1883][], @fleischie)
* [`prop-types`][]: (flow) Stop crashing on undefined or null properties ([#1860][], @nicholas-l)
* [`no-unknown-property`][]: Make attribute "charset" valid ([#1863][], @silvenon)
* [`no-deprecated`][]: report identifier AST node instead of the class node ([#1854][], @jsnajdr)
* [`button-has-type`][]: Account for pragma ([#1851][], @alexzherdev)
* [`button-has-type`][]: improve error message when an identifier is used as the value ([#1874][], @ljharb)
* support JSXText nodes alongside Literal nodes (@ljharb)

### Changed
* Extract propTypes detection code ([#1911][], @alexzherdev)
* Fix broken links in changelog ([#1849][], @alexzherdev)
* [`no-unused-state`][]: combine spread visitors (@ljharb)
* [`jsx-one-expression-per-line`][]: Fix JSX Syntax in docs ([#1867][], @peter-mouland)
* [`jsx-max-depth`][], [`jsx-sort-default-props`][]: add missing docs urls ([#1880][], @flyerhzm)
* [`jsx-indent`][]: add test cases ([#1892][], @alexzherdev)
* [`prop-types`][]: add test cases ([#1898][], @alexzherdev)
* Add a helper function for determining function-like expressions ([#1914][], @alexzherdev)
* [`jsx-props-no-multi-spaces`][]: update docs ([#1918][], @BenRichter)

[#1924]: https://github.com/yannickcr/eslint-plugin-react/pull/1924
[#1918]: https://github.com/yannickcr/eslint-plugin-react/pull/1918
[#1914]: https://github.com/yannickcr/eslint-plugin-react/pull/1914
[#1911]: https://github.com/yannickcr/eslint-plugin-react/pull/1911
[#1909]: https://github.com/yannickcr/eslint-plugin-react/pull/1909
[#1907]: https://github.com/yannickcr/eslint-plugin-react/pull/1907
[#1905]: https://github.com/yannickcr/eslint-plugin-react/pull/1905
[#1898]: https://github.com/yannickcr/eslint-plugin-react/pull/1898
[#1892]: https://github.com/yannickcr/eslint-plugin-react/pull/1892
[#1891]: https://github.com/yannickcr/eslint-plugin-react/pull/1891
[#1890]: https://github.com/yannickcr/eslint-plugin-react/pull/1890
[#1883]: https://github.com/yannickcr/eslint-plugin-react/pull/1883
[#1880]: https://github.com/yannickcr/eslint-plugin-react/pull/1880
[#1874]: https://github.com/yannickcr/eslint-plugin-react/issues/1874
[#1868]: https://github.com/yannickcr/eslint-plugin-react/pull/1868
[#1867]: https://github.com/yannickcr/eslint-plugin-react/pull/1867
[#1863]: https://github.com/yannickcr/eslint-plugin-react/pull/1863
[#1860]: https://github.com/yannickcr/eslint-plugin-react/pull/1860
[#1858]: https://github.com/yannickcr/eslint-plugin-react/pull/1858
[#1857]: https://github.com/yannickcr/eslint-plugin-react/pull/1857
[#1854]: https://github.com/yannickcr/eslint-plugin-react/pull/1854
[#1851]: https://github.com/yannickcr/eslint-plugin-react/pull/1851
[#1849]: https://github.com/yannickcr/eslint-plugin-react/pull/1849

## [7.10.0] - 2018-06-24
### Added
* Allow eslint ^5 ([#1843][] @papandreou, @ljharb)
* [`no-unsafe`][] rule ([#1831][], [#1830][] @sergei-startsev)
* [`no-will-update-set-state`][]: Account for `UNSAFE_` methods ([#1845][], [#1844][] @alexzherdev)

### Fixed
* [`no-typos`][]: Fix static propTypes handling ([#1827][], [#1677][] @alexzherdev)
* [`destructuring-assignment`][]: Allow LHS ([#1825][], [#1728][] @alexzherdev)
* [`no-unused-prop-types`][]: Fix crash when encountering mixed union and intersection flow types ([#1806][] @yannickcr)

### Changed
* Typo fixes in [`jsx-no-target-blank`][] ([#1805][] @ferhatelmas))

[#1845]: https://github.com/yannickcr/eslint-plugin-react/pull/1845
[#1844]: https://github.com/yannickcr/eslint-plugin-react/issues/1844
[#1843]: https://github.com/yannickcr/eslint-plugin-react/pull/1843
[#1831]: https://github.com/yannickcr/eslint-plugin-react/pull/1831
[#1830]: https://github.com/yannickcr/eslint-plugin-react/issues/1830
[#1827]: https://github.com/yannickcr/eslint-plugin-react/pull/1827
[#1825]: https://github.com/yannickcr/eslint-plugin-react/pull/1825
[#1806]: https://github.com/yannickcr/eslint-plugin-react/issues/1806
[#1805]: https://github.com/yannickcr/eslint-plugin-react/pull/1805
[#1728]: https://github.com/yannickcr/eslint-plugin-react/issues/1728
[#1677]: https://github.com/yannickcr/eslint-plugin-react/issues/1677

## [7.9.1] - 2018-06-03
* Nothing was fixed; this is a republish with some updated deps. ([#1804][] @ljharb)

Expand Down Expand Up @@ -106,6 +200,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
[#1670]: https://github.com/yannickcr/eslint-plugin-react/pull/1670
[#1669]: https://github.com/yannickcr/eslint-plugin-react/pull/1669
[#1666]: https://github.com/yannickcr/eslint-plugin-react/pull/1666
[#1665]: https://github.com/yannickcr/eslint-plugin-react/pull/1665
[#1655]: https://github.com/yannickcr/eslint-plugin-react/pull/1655
[#1610]: https://github.com/yannickcr/eslint-plugin-react/pull/1610
[#1414]: https://github.com/yannickcr/eslint-plugin-react/pull/1414
Expand Down Expand Up @@ -2235,3 +2330,4 @@ If you're still not using React 15 you can keep the old behavior by setting the
[`jsx-sort-default-props`]: docs/rules/jsx-sort-default-props.md
[`jsx-max-depth`]: docs/rules/jsx-max-depth.md
[`jsx-props-no-multi-spaces`]: docs/rules/jsx-props-no-multi-spaces.md
[`no-unsafe`]: docs/rules/no-unsafe.md
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Enable the rules that you would like to use.
* [react/no-this-in-sfc](docs/rules/no-this-in-sfc.md): Prevent using `this` in stateless functional components
* [react/no-unescaped-entities](docs/rules/no-unescaped-entities.md): Prevent invalid characters from appearing in markup
* [react/no-unknown-property](docs/rules/no-unknown-property.md): Prevent usage of unknown DOM property (fixable)
* [react/no-unsafe](docs/rules/no-unsafe.md): Prevent usage of `UNSAFE_` methods
* [react/no-unused-prop-types](docs/rules/no-unused-prop-types.md): Prevent definitions of unused prop types
* [react/no-unused-state](docs/rules/no-unused-state.md): Prevent definitions of unused state properties
* [react/no-will-update-set-state](docs/rules/no-will-update-set-state.md): Prevent usage of `setState` in `componentWillUpdate`
Expand Down Expand Up @@ -157,6 +158,7 @@ Enable the rules that you would like to use.
* [react/jsx-no-undef](docs/rules/jsx-no-undef.md): Disallow undeclared variables in JSX
* [react/jsx-one-expression-per-line](docs/rules/jsx-one-expression-per-line.md): Limit to one expression per line in JSX
* [react/jsx-curly-brace-presence](docs/rules/jsx-curly-brace-presence.md): Enforce curly braces or disallow unnecessary curly braces in JSX
* [react/jsx-fragments](docs/rules/jsx-fragments.md): Enforce shorthand or standard form for React fragments
* [react/jsx-pascal-case](docs/rules/jsx-pascal-case.md): Enforce PascalCase for user-defined JSX components
* [react/jsx-props-no-multi-spaces](docs/rules/jsx-props-no-multi-spaces.md): Disallow multiple spaces between inline JSX props (fixable)
* [react/jsx-sort-default-props](docs/rules/jsx-sort-default-props.md): Enforce default props alphabetical sorting
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ matrix:
- nodejs_version: "9"
- nodejs_version: "7"
- nodejs_version: "5"
- nodejs_version: "4"

platform:
- x86
Expand Down
21 changes: 21 additions & 0 deletions docs/rules/destructuring-assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,24 @@ const Foo = class extends React.PureComponent {
return <div>{this.state.title}</div>;
}
};
```

## Rule Options

```js
...
"react/destructuring-assignment": [<enabled>, "always", { "ignoreClassFields": <boolean> }]
...
```

### `ignoreClassFields`

When `true` the rule will ignore class field declarations.

The following patterns are then considered okay and do not cause warnings:

```jsx
class Foo extends React.PureComponent {
bar = this.props.bar
}
```
2 changes: 1 addition & 1 deletion docs/rules/display-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var Hello = createReactClass({
...
```

### `ignoreTranspilerName`
### `ignoreTranspilerName` (default: `false`)

When `true` the rule will ignore the name set by the transpiler and require a `displayName` property in this case.

Expand Down
57 changes: 57 additions & 0 deletions docs/rules/jsx-fragments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Enforce shorthand or standard form for React fragments (react/jsx-fragments)

In JSX, a React fragment is created either with `<React.Fragment>...</React.Fragment>`, or, using the shorthand syntax, `<>...</>`. This rule allows you to enforce one way or the other.

Support for fragments was added in React v16.2, so the rule will warn on either of these forms if an older React version is specified in [shared settings][shared_settings].

## Rule Options

```js
...
"react/jsx-fragments": [<enabled>, <mode>]
...
```

### `syntax` mode

This is the default mode. It will enforce the shorthand syntax for React fragments, with one exception. [Keys or attributes are not supported by the shorthand syntax][short_syntax], so the rule will not warn on standard-form fragments that use those.

The following pattern is considered a warning:

```jsx
<React.Fragment><Foo /></React.Fragment>
```

The following patterns are **not** considered warnings:

```jsx
<><Foo /></>
```

```jsx
<React.Fragment key="key"><Foo /></React.Fragment>
```

### `element` mode

This mode enforces the standard form for React fragments.

The following pattern is considered a warning:

```jsx
<><Foo /></>
```

The following patterns are **not** considered warnings:

```jsx
<React.Fragment><Foo /></React.Fragment>
```

```jsx
<React.Fragment key="key"><Foo /></React.Fragment>
```

[fragments]: https://reactjs.org/docs/fragments.html
[shared_settings]: /README.md#configuration
[short_syntax]: https://reactjs.org/docs/fragments.html#short-syntax
27 changes: 19 additions & 8 deletions docs/rules/jsx-no-bind.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,70 @@ A `bind` call or [arrow function](https://developer.mozilla.org/en-US/docs/Web/J
The following patterns are considered warnings:

```jsx
<div onClick={this._handleClick.bind(this)}></div>
<Foo onClick={this._handleClick.bind(this)}></Foo>
```
```jsx
<div onClick={() => console.log('Hello!')}></div>
<Foo onClick={() => console.log('Hello!')}></Foo>
```

The following patterns are **not** considered warnings:
```jsx
<div onClick={this._handleClick}></div>
<Foo onClick={this._handleClick}></Foo>
```

## Rule Options

```js
"react/jsx-no-bind": [<enabled>, {
"ignoreDOMComponents": <boolean> || false,
"ignoreRefs": <boolean> || false,
"allowArrowFunctions": <boolean> || false,
"allowFunctions": <boolean> || false,
"allowBind": <boolean> || false
}]
```

### `ignoreDOMComponents`

When `true` the following are **not** considered warnings:

```jsx
<div onClick={this._handleClick.bind(this) />
<span onClick={() => console.log("Hello!")} />
<button onClick={function() { alert("1337") }} />
```

### `ignoreRefs`

When `true` the following are **not** considered warnings:

```jsx
<div ref={c => this._div = c} />
<div ref={this._refCallback.bind(this)} />
<Foo ref={c => this._div = c} />
<Foo ref={this._refCallback.bind(this)} />
```

### `allowArrowFunctions`

When `true` the following is **not** considered a warning:

```jsx
<div onClick={() => alert("1337")} />
<Foo onClick={() => alert("1337")} />
```

### `allowFunctions`

When `true` the following is not considered a warning:

```jsx
<div onClick={function () { alert("1337") }} />
<Foo onClick={function () { alert("1337") }} />
```

### `allowBind`

When `true` the following is **not** considered a warning:

```jsx
<div onClick={this._handleClick.bind(this)} />
<Foo onClick={this._handleClick.bind(this)} />
```

## Protips
Expand Down
Loading