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 : {}
- Read upRead up
- Create a ticketCreate a ticket
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
verbose: true
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
name,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
},
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
testPathIgnorePatterns: ['/node_modules/', '/.temp/', '/dist/'],
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
const { name } = require('./package')
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
testRegex: '/src/.*\\.(test|spec)?\\.(ts|tsx)$',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/node_modules/**', '!**/index.ts'],
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
module.exports = {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
transform: {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ,␍
Open
'^.+\\.ts?$': 'ts-jest'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
coverageDirectory: './.temp/coverage',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
testEnvironment: 'node',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Require statement not part of import statement. Open
const { name } = require('./package')
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Insert ␍
Open
collectCoverage: true,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/