Showing 286 of 880 total issues
File ReactErrorBoundaries-test.internal.js
has 1807 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
let PropTypes;
let React;
let ReactDOM;
File ReactCompositeComponent-test.js
has 1427 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
let ChildUpdates;
let MorphingComponent;
let React;
File ReactDOMInput-test.js
has 1377 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
const emptyFunction = function(){}
File ReactChildren-test.js
has 1127 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
describe("ReactChildren", () => {
let React;
File ReactUpdates-test.js
has 1106 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
let React;
let ReactDOM;
File ReactComponentLifeCycle-test.js
has 969 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
let React;
let ReactDOM;
let ReactTestUtils;
File ReactDOMFiber-test.js
has 945 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
const React = require('react');
const ReactDOM = require('react-dom');
const ReactTestUtils = require('test-utils');
File ReactMultiChildReconcile-test.js
has 734 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const React = require('react');
const ReactDOM = require('react-dom');
const stripEmptyValues = function(obj) {
const ret = {};
Function resolve
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
Open
function resolve(child, context) {
while (isValidElement(child)) {
// Safe because we just checked it's an element.
let element = child;
let Component = element.type;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File ReactDOMSelect-test.js
has 589 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
File createReactClassIntegration-test.js
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
let PropTypes;
let React;
let ReactDOM;
File index.js
has 563 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');
let React;
let ReactDOM;
let ReactDOMServer;
File ReactComponent-test.js
has 546 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
let React;
let ReactDOM;
let ReactDOMServer;
Function exports
has 216 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(initModules) {
let ReactDOM;
let ReactDOMServer;
function resetModules() {
File ReactES6Class-test.js
has 514 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
let PropTypes;
let React;
let ReactDOM;
describe('ReactES6Class', () => {
File index.jsx
has 486 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable jsx-a11y/anchor-has-content */
import { miniCreateClass, getWindow } from "react-core/util";
import {
startsWith,
File ReactProxy.js
has 483 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* by 司徒正美 Copyright 2018-05-15
* IE9+
*/
File Renderer.js
has 464 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
File ReactMount-test.js
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
let React;
Function findCatchComponent
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
Open
function findCatchComponent(fiber, names, hook) {
let instance,
name,
topFiber = fiber,
retry,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"