Showing 7 of 26 total issues
Function writing
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
writing() {
let source, target;
this._copyTpl('package.json', 'package.json');
- 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 writing
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
writing() {
let source, target;
this._copyTpl('package.json', 'package.json');
Function resource
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
const resource = global.caches.match(request).then(response => {
if (response) {
if (DEBUG) {
console.log(`[SW] fetch URL ${requestUrl.href} from cache`);
}
Function cssLoaders
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.cssLoaders = function (options) {
options = options || {};
const cssLoader = {
loader: 'css-loader',
Function writing
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
writing() {
let source, target;
const componentName = this.props.componentName;
Function writing
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
writing() {
let source, target;
const componentName = this.props.componentName;
- 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 exports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
const warnings = [];
for (let index = 0; index < versionRequirements.length; index++) {
const mod = versionRequirements[index];
- 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"