Showing 37 of 225 total issues
File SKILL_TREE_DATA.js
has 1093 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export default [
{
id: 1,
title: 'HTML',
description: 'Internet主要由从服务器通过HTTP协议向浏览器发送的HTML文档组成。HTML被用来结构化信息——例如标题、段落和列表等等,也可用来在一定程度上描述文档的外观和语义。',
Function getHtml
has 501 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static getHtml(html) {
if (html) {
return (`
<!DOCTYPE html>
<html lang="en">
File index.js
has 526 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
import { View, TouchableOpacity } from 'react-native';
import { Actions, Scene } from 'react-native-router-flux';
import { Icon } from 'react-native-elements';
File HtmlHelper.js
has 506 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class HtmlHelper {
static getHtml(html) {
if (html) {
return (`
<!DOCTYPE html>
Function render
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const bsdProjects = [{
name: 'React Native',
link: 'https://github.com/facebook/react-native',
}];
File BOOKS.js
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const BOOKS = {};
BOOKS['zh-cn'] = {
analytics: [
{
File ALGORITHMS_CATEGORY.js
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const ALGORITHMS_CATEGORY = [
{
list: [
{
Function render
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { algorithmInfo, code, trace } = this.state;
let source;
if (__DEV__) {
source = require('./algorithm-webview/index.html');
File styles.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Platform, Dimensions } from 'react-native';
import Fonts from './fonts';
import Colors from './colors';
import Size from './sizes';
launch
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
const launch = {
roadmapList: () => {
Actions.roadmapList();
},
roadmapDetail: (caption, content) => {
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const homeView = (
<View style={{ paddingBottom: 20 }}>
<GrowthImageCard
imageUrl={require('../../../assets/growth-ui/img/home-5.jpg')}
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const skillData = filter(SKILL_TREE_DATA, { id: this.props.skillId })[0];
let skillLinkList = null;
if (skillData.links) {
skillLinkList = (<View>
Function default
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function (html, done) {
// var startTime = new Date().getTime()
const rootStack = [{
name: 'div',
Function track
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
const track = store => next => (action) => {
// Track each screen view to Redux
// - Requires that each Scene in RNRF have a 'analyticsDesc' prop
switch (action.type) {
case 'REACT_NATIVE_ROUTER_FLUX_FOCUS' :
- 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 TODO_LISTS.js
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const TODO_LISTS = {};
TODO_LISTS['zh-cn'] = {
hello: {
name: '入门',
File AlgorithmDetailView.js
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable import/no-dynamic-require,global-require,no-undef */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
StyleSheet, View, ScrollView, TouchableOpacity, Dimensions, WebView, Platform,
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const bookHtml = `
<p>
本书是我在编程生涯初期的一些体会,它更像是一本关于Web开发的索引书籍,但其实这些索引正是我读了大量书籍后,自己对精髓之处进行的理解加工。在这本书里,你会看到我对很多知识点进行了概括,并以实战的方式将一个个知识点连接到一起。</p>
<p>在最开始的时候,我曾经想将书名命名为实习记。后来又觉得虽然这是在我实习期间学到的知识,但其实很多内容在其他公司是学不到的。因此,在电子书里将其命名为Growth,它不仅是在让读者增长,也在让我自己增长。</p>
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { loading } = this.state;
if (loading) {
return (<View
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const hasDownloaded = this.state.hasDownloaded;
const questions = this.state.questions;
if (!hasDownloaded || !questions) {
Function renderElement
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderElement(topic) {
let sticky = <View />;
if (topic.attributes.isSticky) {
sticky = (<View
style={{