Showing 570 of 905 total issues
Function 4
has 333 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],4:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
Function 21
has 331 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./map-generator":19,"./parse":22,"./result":27,"./stringify":31,"./warn-once":34,"_process":36}],21:[function(require,module,exports){
'use strict'
let { isClean, my } = require('./symbols')
let CssSyntaxError = require('./css-syntax-error')
Function plugin
has 319 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function plugin(options, Parser) {
const acorn = Parser.acorn || require("acorn");
const acornJsx = getJsxTokens(acorn);
const tt = acorn.tokTypes;
const tok = acornJsx.tokTypes;
Function 102
has 318 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],102:[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
Function Parser
has 310 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Parser = /** @class */ (function () {
function Parser(cbs, options) {
if (options === void 0) { options = {}; }
var _a, _b, _c, _d, _e;
this.options = options;
Function 30
has 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./container":11,"./list":18}],30:[function(require,module,exports){
'use strict'
const DEFAULT_RAW = {
after: '\n',
Function 19
has 297 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],19:[function(require,module,exports){
(function (Buffer){(function (){
'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
Function 2
has 297 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],2:[function(require,module,exports){
(function (setImmediate){(function (){
'use strict';
/**
Function read_expr_item
has 292 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
,read_expr_item: function() {
if (this.token === '@')
return this.node('silent')(this.next().read_expr());
if (this.token === '+')
Function 111
has 276 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],111:[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
Function 116
has 272 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],116:[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
Function 115
has 263 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],115:[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
Function 98
has 261 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],98:[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
Function 2
has 255 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./xhtml":2,"acorn":3}],2:[function(require,module,exports){
module.exports = {
quot: '\u0022',
amp: '&',
apos: '\u0027',
Function 33
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],33:[function(require,module,exports){
'use strict'
const SINGLE_QUOTE = "'".charCodeAt(0)
const DOUBLE_QUOTE = '"'.charCodeAt(0)
Function 2
has 229 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],2:[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://gla*yzzle.com
Function 16
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./at-rule":9,"./comment":10,"./declaration":13,"./input":16,"./previous-map":25,"./root":28,"./rule":29}],16:[function(require,module,exports){
'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { fileURLToPath, pathToFileURL } = require('url')
Function JSParser
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
Open
define(function JSParser(require, exports, module) {
"use strict";
var espree = require("thirdparty/espree");
- 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
File promise.js
has 511 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**!
* Promise Polyfill version 8.3.0
* (browserified with Browserify version 17.0.0)
*
* MIT License
Function tokenizer
has 205 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function tokenizer(input, options = {}) {
let css = input.css.valueOf()
let ignore = options.ignoreErrors
let code, next, quote, content, escape