Showing 50 of 537 total issues
File moysklad.js
has 1165 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 52:
/***/ ((module) => {
Function 91
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module) => {
"use strict";
Function 656
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
Function fetchUrl
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = async function fetchUrl(url, options = {}) {
const requestId = ++globalRequestId
have.strict(arguments, { url: 'url', options: 'opt Object' })
- 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 579
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
Function 138
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
/*
* moysklad
Function fetchUrl
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = async function fetchUrl(url, options = {}) {
const requestId = ++globalRequestId
have.strict(arguments, { url: 'url', options: 'opt Object' })
Function fetchUrl
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = async function fetchUrl(url, options = {}) {
const requestId = ++globalRequestId
have.strict(arguments, { url: 'url', options: 'opt Object' })
Function showErrors
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function showErrors() {
//#region (1) MoyskladError
try {
await ms.GET('entity/product', {
filter: 123
Function 658
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module) => {
"use strict";
Function ensureArgs
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ensureArgs (args, schema, matchers, strict) {
var ensureResults = []
var parsedArgs = {}
var argIndex = 0
var argsKeys = []
Function 467
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
Function ensure
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ensure (matchers, argName, argType, value, check) {
var memberType = null
var valid = true
var reason = null
var match = null
Function buildFilter
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function buildFilter(filter) {
if (!isPlainObject(filter)) {
throw new MoyskladError('Поле filter должно быть объектом')
}
Function buildFilter
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function buildFilter(filter) {
if (!isPlainObject(filter)) {
throw new MoyskladError('Поле filter должно быть объектом')
}
Function 60
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
'use srict'
const { MoyskladError } = __webpack_require__(658)
Function getFilterParts
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getFilterParts(path, value) {
const pathLen = path.length
const curKey = pathLen ? path[pathLen - 1] : null
switch (true) {
Function getFilterParts
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getFilterParts(path, value) {
const pathLen = path.length
const curKey = pathLen ? path[pathLen - 1] : null
switch (true) {
Function getFilterParts
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
function getFilterParts(path, value) {
const pathLen = path.length
const curKey = pathLen ? path[pathLen - 1] : null
switch (true) {
- 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 565
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ ((module) => {
"use strict";