cahilfoley/utils

View on GitHub

Showing 18 of 18 total issues

Function clone has a Cognitive Complexity of 11 (exceeds 10 allowed). Consider refactoring.
Open

export default function clone(original: any, options: CloneOptions = {}): any {
  let output

  // Can't clone functions, only copy if the flag is set
  if (typeof original === 'function') output = options.copyFunctions ? original : {}
Severity: Minor
Found in src/accessors/clone.ts - About 25 mins to fix

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

Insert
Open

  testRegex: '/src/.*\\.(test|spec)?\\.(ts|tsx)$',
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

}
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open


Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  testEnvironment: 'node',
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  testPathIgnorePatterns: ['/node_modules/', '/.temp/', '/dist/'],
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  transform: {
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  collectCoverage: true,
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  coverageDirectory: './.temp/coverage',
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Require statement not part of import statement.
Open

const { name } = require('./package')
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

module.exports = {
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  name,
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

const { name } = require('./package')
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert ,␍
Open

    '^.+\\.ts?$': 'ts-jest'
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  },
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert ,␍
Open

  verbose: true
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert
Open

  collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/node_modules/**', '!**/index.ts'],
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Severity
Category
Status
Source
Language