Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/no-set-state.js
rd565449 r0c6b92a 39 39 * Checks if the component is valid 40 40 * @param {Object} component The component to process 41 * @returns { Boolean} True if the component is valid, false if not.41 * @returns {boolean} True if the component is valid, false if not. 42 42 */ 43 43 function isValid(component) { 44 return Boolean(component && !component.useSetState);44 return !!component && !component.useSetState; 45 45 } 46 46 … … 50 50 */ 51 51 function reportSetStateUsages(component) { 52 let setStateUsage;53 52 for (let i = 0, j = component.setStateUsages.length; i < j; i++) { 54 setStateUsage = component.setStateUsages[i];53 const setStateUsage = component.setStateUsages[i]; 55 54 report(context, messages.noSetState, 'noSetState', { 56 55 node: setStateUsage,
Note:
See TracChangeset
for help on using the changeset viewer.