Showing 1,251 of 1,982 total issues
Function replaceExpressionWithStatements
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function replaceExpressionWithStatements(nodes: Array<Object>) {
this.resync();
const toSequenceExpression = t.toSequenceExpression(nodes, this.scope);
Function splitExportDeclaration
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function splitExportDeclaration(exportDeclaration) {
if (!exportDeclaration.isExportDeclaration()) {
throw new Error("Only export declarations can be splitted.");
}
Function UnaryExpression
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
UnaryExpression(path) {
const { node, parent } = path;
if (node.operator !== "typeof") return;
if (
Consider simplifying this complex logical expression. Open
Open
if (
// for (MEMBER of ARR)
// for (MEMBER in ARR)
parentPath.isForXStatement({ left: node }) ||
// { KEY: MEMBER } = OBJ
Function getTargets
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function getTargets(
inputTargets: InputTargets = {},
options: Object = {},
): Targets {
const targetOpts: Targets = {};
Function gatherSequenceExpressions
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function gatherSequenceExpressions(
nodes: Array<Object>,
scope: Scope,
declars: Array<Object>,
): ?Object {
Consider simplifying this complex logical expression. Open
Open
if (
nodeType === "Literal" ||
"StringLiteral" === nodeType ||
"NumericLiteral" === nodeType ||
"NullLiteral" === nodeType ||
Function ForOfStatement
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ForOfStatement(path, state) {
const right = path.get("right");
if (
right.isArrayExpression() ||
right.isGenericType("Array") ||
Consider simplifying this complex logical expression. Open
Open
if (parentPath.isMemberExpression({ object: node })) {
const grandparentPath = parentPath.parentPath;
const argsOptEligible =
!state.deopted &&
Function ReferencedIdentifier
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ReferencedIdentifier(path, state) {
const { node } = path;
// we can't guarantee the purity of arguments
if (node.name === "arguments") {
Function insertAfter
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function insertAfter(nodes) {
this._assertUnremoved();
nodes = this._verifyNodeList(nodes);
Function MetaProperty
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MetaProperty(path) {
const meta = path.get("meta");
const property = path.get("property");
const { scope } = path;
Function readRegexp
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
readRegexp(): void {
const start = this.state.pos;
let escaped, inClass;
for (;;) {
if (this.state.pos >= this.length) {
Function isNodesEquivalent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function isNodesEquivalent(a: any, b: any): boolean {
if (
typeof a !== "object" ||
typeof b !== "object" ||
a == null ||
Function rewriteLiveReferences
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function rewriteLiveReferences(
programPath: NodePath,
metadata: ModuleMetadata,
) {
const imported = new Map();
Function buildPrivateMethodDeclaration
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildPrivateMethodDeclaration(prop, privateNamesMap, loose = false) {
const privateName = privateNamesMap.get(prop.node.key.id.name);
const {
id,
methodId,
Function normalizeOptions
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function normalizeOptions(opts: Options) {
validateTopLevelOptions(opts);
const useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);
Function getScopeInformation
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getScopeInformation(fnPath) {
const thisPaths = [];
const argumentsPaths = [];
const newTargetPaths = [];
const superProps = [];
Function tsParseDeclaration
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tsParseDeclaration(
node: any,
value: string,
next: boolean,
): ?N.Declaration {
Function parseForStatement
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseForStatement(node: N.Node): N.ForLike {
this.next();
this.state.labels.push(loopLabel);
let awaitAt = -1;