main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
441 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @fileoverview Prevent usage of setState in componentWillUpdate
|
---|
3 | * @author Yannick Croissant
|
---|
4 | */
|
---|
5 |
|
---|
6 | 'use strict';
|
---|
7 |
|
---|
8 | const makeNoMethodSetStateRule = require('../util/makeNoMethodSetStateRule');
|
---|
9 | const testReactVersion = require('../util/version').testReactVersion;
|
---|
10 |
|
---|
11 | /** @type {import('eslint').Rule.RuleModule} */
|
---|
12 | module.exports = makeNoMethodSetStateRule(
|
---|
13 | 'componentWillUpdate',
|
---|
14 | (context) => testReactVersion(context, '>= 16.3.0')
|
---|
15 | );
|
---|
Note:
See
TracBrowser
for help on using the repository browser.