Showing 193 of 398 total issues
Function esprima
has 5947 lines of code (exceeds 25 allowed). Consider refactoring. Open
var esprima = createCommonjsModule(function (module, exports) {
(function webpackUniversalModuleDefinition(root, factory) {
/* istanbul ignore next */
module.exports = factory();
})(commonjsGlobal, function() {
File csp.tmpl.js
has 6946 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.cspTmpl = global.cspTmpl || {})));
}(this, (function (exports) { 'use strict';
Function Parser
has 2764 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Parser = (function () {
function Parser(code, options, delegate) {
if (options === void 0) { options = {}; }
this.config = {
range: (typeof options.range === 'boolean') && options.range,
Function Scanner
has 1052 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Scanner = (function () {
function Scanner(code, handler) {
this.source = code;
this.errorHandler = handler;
this.trackComment = false;
Function evaluateAst
has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring. Open
function evaluateAst(tree, context){
var safeFunction = FunctionFactory(context)
var primitives = Primitives(context)
- 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 JSXParser
has 470 lines of code (exceeds 25 allowed). Consider refactoring. Open
var JSXParser = (function (_super) {
__extends(JSXParser, _super);
function JSXParser(code, options, delegate) {
_super.call(this, code, options, delegate);
}
Function brackets
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
var brackets = (function (UNDEF) {
//
// Closure data
// --------------------------------------------------------------------------
//
- 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 brackets
has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring. Open
var brackets = (function (UNDEF) {
var
REGLOB = 'g',
- 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 tmpl
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
var tmpl = (function () {
//
// Closure data
// --------------------------------------------------------------------------
var _cache = {}
- 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 evaluateAst
has 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
function evaluateAst(tree, context){
var safeFunction = FunctionFactory(context);
var primitives = Primitives(context);
Function evaluateAst
has 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
function evaluateAst(tree, context){
var safeFunction = FunctionFactory(context)
var primitives = Primitives(context)
Function tmpl
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
var tmpl = (function () {
var _cache = {}
function _tmpl (str, data) {
- 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 walk
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
function walk(node){
if (!node) return
switch (node.type) {
Function walk
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
function walk(node){
if (!node) return
switch (node.type) {
Function brackets
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
var brackets = (function (UNDEF) {
//
// Closure data
// --------------------------------------------------------------------------
//
Function brackets
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
var brackets = (function (UNDEF) {
var
REGLOB = 'g',
Function brackets
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
var brackets = (function (UNDEF) {
var
REGLOB = 'g',
Function brackets
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
var brackets = (function (UNDEF) {
var
REGLOB = 'g',
Function tmpl
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
var tmpl = (function () {
//
// Closure data
// --------------------------------------------------------------------------
var _cache = {}
File index.js
has 417 lines of code (exceeds 250 allowed). Consider refactoring. Open
import InfiniteChecker from './lib/infinite-checker'
import Primitives from './lib/primitives'
import { getGlobal } from './helpers'
import esprima from 'esprima'
import hoist from 'hoister'