File tree Expand file tree Collapse file tree
packages/eslint-config-airbnb/rules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ module.exports = {
4848 // Prevent usage of setState in componentDidUpdate
4949 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
5050 'react/no-did-update-set-state' : [ 2 , 'allow-in-func' ] ,
51+ // Prevent usage of isMounted
52+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
53+ 'react/no-is-mounted' : 2 ,
5154 // Prevent multiple component definition per file
5255 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
5356 'react/no-multi-comp' : 2 ,
Original file line number Diff line number Diff line change 1515 1 . [ Tags] ( #tags )
1616 1 . [ Methods] ( #methods )
1717 1 . [ Ordering] ( #ordering )
18+ 1 . [ ` isMounted ` ] ( #ismounted )
1819
1920## Basic Rules
2021
334335
335336 eslint rules: [`react/sort-comp`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md).
336337
338+ ## `isMounted`
339+
340+ [`isMounted` is an anti-pattern][anti-pattern], is not available when using ES6 classes, and is on its way to being officially deprecated. Its use should be avoided.
341+
342+ [anti-pattern]: https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html
343+
344+ eslint rules: [`react/no-is-mounted`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md).
345+
337346**[⬆ back to top](#table-of-contents)**
You can’t perform that action at this time.
0 commit comments