Showing 193 of 398 total issues
Function parseFunctionExpression
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseFunctionExpression = function () {
var node = this.createNode();
this.expectKeyword('function');
var isGenerator = this.match('*');
if (isGenerator) {
Function parseFunctionDeclaration
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) {
var node = this.createNode();
this.expectKeyword('function');
var isGenerator = this.match('*');
if (isGenerator) {
Function reinterpretAsCoverFormalsList
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.reinterpretAsCoverFormalsList = function (expr) {
var params = [expr];
var options;
switch (expr.type) {
case syntax_1.Syntax.Identifier:
Function parseLeftHandSideExpressionAllowCall
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseLeftHandSideExpressionAllowCall = function () {
var startToken = this.lookahead;
var previousAllowIn = this.context.allowIn;
this.context.allowIn = true;
var expr;
Function scanXHTMLEntity
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
JSXParser.prototype.scanXHTMLEntity = function (quote) {
var result = '&';
var valid = true;
var terminated = false;
var numeric = false;
Function parseImportDeclaration
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseImportDeclaration = function () {
if (this.context.inFunctionBody) {
this.throwError(messages_1.Messages.IllegalImportDeclaration);
}
var node = this.createNode();
Function parseBinaryExpression
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseBinaryExpression = function () {
var startToken = this.lookahead;
var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
var token = this.lookahead;
var prec = this.binaryPrecedence(token);
Function scanRegExpBody
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Scanner.prototype.scanRegExpBody = function () {
var ch = this.source[this.index];
assert_1.assert(ch === '/', 'Regular expression literal must start with a slash');
var str = this.source[this.index++];
var classMarker = false;
Function scanRegExpFlags
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Scanner.prototype.scanRegExpFlags = function () {
var str = '';
var flags = '';
while (!this.eof()) {
var ch = this.source[this.index];
Function parse
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parse(code, options, delegate) {
var commentHandler = null;
var proxyDelegate = function (node, metadata) {
if (delegate) {
delegate(node, metadata);
Function _parseExpr
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _parseExpr (expr, asText, qstr) {
expr = expr
.replace(/\s+/g, ' ').trim()
.replace(/\ ?([[\({},?\.:])\ ?/g, '$1');
Function _parseExpr
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _parseExpr (expr, asText, qstr) {
expr = expr
.replace(/\s+/g, ' ').trim()
.replace(/\ ?([[\({},?\.:])\ ?/g, '$1')
Function _parseExpr
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _parseExpr (expr, asText, qstr) {
// Non-empty quoted strings and literal regexes are hidden at this point.
//
// Now, this function converts whitespace into compacted spaces and trims
Function _parseExpr
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _parseExpr (expr, asText, qstr) {
expr = expr
.replace(/\s+/g, ' ').trim()
.replace(/\ ?([[\({},?\.:])\ ?/g, '$1')
Function parseStatementListItem
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseStatementListItem = function () {
var statement = null;
this.context.isAssignmentTarget = true;
this.context.isBindingElement = true;
if (this.lookahead.type === token_1.Token.Keyword) {
Function lex
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Scanner.prototype.lex = function () {
if (this.eof()) {
return {
type: token_1.Token.EOF,
lineNumber: this.lineNumber,
Function unexpectedTokenError
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.unexpectedTokenError = function (token, message) {
var msg = message || messages_1.Messages.UnexpectedToken;
var value;
if (token) {
if (!message) {
Function parseUpdateExpression
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.parseUpdateExpression = function () {
var expr;
var startToken = this.lookahead;
if (this.match('++') || this.match('--')) {
var node = this.startNode(startToken);
Function nextJSXText
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
JSXParser.prototype.nextJSXText = function () {
this.startMarker.index = this.scanner.index;
this.startMarker.lineNumber = this.scanner.lineNumber;
this.startMarker.lineStart = this.scanner.lineStart;
var start = this.scanner.index;
Function collectComments
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.collectComments = function () {
if (!this.config.comment) {
this.scanner.scanComments();
}
else {