Showing 14 of 49 total issues
Function actions
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
actions: data => {
// Generate index.js and index.test.js
var componentTemplate; // eslint-disable-line no-var
switch (data.type) {
Function mainFolderListItems
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const mainFolderListItems = params => {
const getLiProps = nested => ({
classes: {
root: `${params.classes.liRoot} ${nested && params.classes.liNested}`,
button: params.classes.liButton,
Function actions
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
actions: () => {
const actions = [];
actions.push({
type: 'modify',
path: '../../app/i18n.js',
Function actions
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
actions: data => {
// Generate index.js and index.test.js
let componentTemplate;
switch (data.type) {
Function injectSagaFactory
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function injectSagaFactory(store, isValid) {
return function injectSaga(key, descriptor = {}, args) {
if (!isValid) checkStore(store);
const newDescriptor = {
...descriptor,
- 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
Function extractFromFile
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const extractFromFile = fileName => {
return readFile(fileName)
.then(code => {
// Use babel plugin to extract instances where react-intl is used
const { metadata: result } = transform(code, { presets, plugins });
- 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
Function mapPageReducer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mapPageReducer(state = initialState, action) {
switch (action.type) {
case GET_INITIAL_LOCATION:
return state.set('loading', true);
case SET_INITIAL_LOCATION:
Function renderMarkers
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderMarkers(people, history) {
return Object.keys(people).map(key => (
<Marker
key={key}
position={people[key].location}
Function ejectSagaFactory
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function ejectSagaFactory(store, isValid) {
return function ejectSaga(key) {
if (!isValid) checkStore(store);
checkKey(key);
if (Reflect.has(store.injectedSagas, key)) {
- 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
Function renderVisits
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderVisits(visits) {
const { order, orderBy, handleRequestSort, classes } = this.props;
const { page, rowsPerPage } = this.props;
return (
<div className={classes.tableWrapper}>
Function injectSagaFactory
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function injectSagaFactory(store, isValid) {
return function injectSaga(key, descriptor = {}, args) {
if (!isValid) checkStore(store);
const newDescriptor = {
...descriptor,
Function renderToolbar
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderToolbar() {
const { classes, open, handleDrawerOpen, token } = this.props;
return (
<Toolbar disableGutters={!open}>
{token && (
Function dependencyHandlers
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dependencyHandlers() {
// Don't do anything during the DLL Build step - process.env.BUILDING_DLL
// Don't do anything if package.json does not have a dllPlugin property - !dllPlugin
// Code splitting now included by default in Webpack 4 - !dllPlugin
if (process.env.BUILDING_DLL || !dllPlugin) {
Function dependencyHandlers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function dependencyHandlers() {
// Don't do anything during the DLL Build step - process.env.BUILDING_DLL
// Don't do anything if package.json does not have a dllPlugin property - !dllPlugin
// Code splitting now included by default in Webpack 4 - !dllPlugin
if (process.env.BUILDING_DLL || !dllPlugin) {
- 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"