Showing 193 of 398 total issues
Function _skipRegex
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _skipRegex (code, start) {
// `exec()` will extract from the slash to the end of line and the
// chained `match()` will match the possible regex.
var re = /.*/g
Function _wrapExpr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _wrapExpr (expr, asText, key) {
var tb;
expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
if (mvar) {
Function scanIdentifier
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Scanner.prototype.scanIdentifier = function () {
var type;
var start = this.index;
// Backslash (U+005C) starts an escaped character.
var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier();
Function scanBinaryLiteral
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Scanner.prototype.scanBinaryLiteral = function (start) {
var number = '';
var ch;
while (!this.eof()) {
ch = this.source[this.index];
Function parseArrayInitializer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseArrayInitializer = function () {
var node = this.createNode();
var elements = [];
this.expect('[');
while (!this.match(']')) {
Function parseSwitchStatement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseSwitchStatement = function () {
var node = this.createNode();
this.expectKeyword('switch');
this.expect('(');
var discriminant = this.parseExpression();
Function parseDirectivePrologues
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseDirectivePrologues = function () {
var firstRestricted = null;
var body = [];
while (true) {
var token = this.lookahead;
Function checkPatternParam
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.checkPatternParam = function (options, param) {
switch (param.type) {
case syntax_1.Syntax.Identifier:
this.validateParam(options, param, param.name);
break;
Function _wrapExpr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _wrapExpr (expr, asText, key) {
var tb
expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
if (mvar) {
Function _wrapExpr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _wrapExpr (expr, asText, key) {
var tb
expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
if (mvar) {
Function _wrapExpr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _wrapExpr (expr, asText, key) {
var tb
expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
if (mvar) {
Consider simplifying this complex logical expression. Open
Open
if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {
var value = this.scanner.source[this.scanner.index++];
return {
type: token_1.Token.Punctuator,
value: value,
Consider simplifying this complex logical expression. Open
Open
if (this.match('+') || this.match('-') || this.match('~') || this.match('!') ||
this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) {
var node = this.startNode(this.lookahead);
var token = this.nextToken();
expr = this.inheritCoverGrammar(this.parseUnaryExpression);
Avoid deeply nested control flow statements. Open
Open
if (arrow) {
break;
}
Avoid deeply nested control flow statements. Open
Open
if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
}
Avoid deeply nested control flow statements. Open
Open
if (ch === '\r' && this.source[this.index] === '\n') {
++this.index;
}
Avoid deeply nested control flow statements. Open
Open
if (this.trackComment) {
comments = comments.concat(comment);
}
Avoid deeply nested control flow statements. Open
Open
if (this.scanner.isStrictModeReservedWord(id.name)) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
}
Avoid deeply nested control flow statements. Open
Open
while (--pos >= 0 && RE_VN_CHAR.test(code[pos]));
Avoid deeply nested control flow statements. Open
Open
if (ch === '\r' && this.source[this.index] === '\n') {
++this.index;
}