Showing 1,251 of 1,982 total issues

Function replaceExpressionWithStatements has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function replaceExpressionWithStatements(nodes: Array<Object>) {
  this.resync();

  const toSequenceExpression = t.toSequenceExpression(nodes, this.scope);

Severity: Major
Found in packages/babel-traverse/src/path/replacement.js - About 2 hrs to fix

    Function splitExportDeclaration has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function splitExportDeclaration(exportDeclaration) {
      if (!exportDeclaration.isExportDeclaration()) {
        throw new Error("Only export declarations can be splitted.");
      }
    
    
    Severity: Major
    Found in packages/babel-helper-split-export-declaration/src/index.js - About 2 hrs to fix

      Function UnaryExpression has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            UnaryExpression(path) {
              const { node, parent } = path;
              if (node.operator !== "typeof") return;
      
              if (
      Severity: Minor
      Found in packages/babel-plugin-transform-typeof-symbol/src/index.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

            if (
              // for (MEMBER of ARR)
              // for (MEMBER in ARR)
              parentPath.isForXStatement({ left: node }) ||
              // { KEY: MEMBER } = OBJ
        Severity: Critical
        Found in packages/babel-helper-member-expression-to-functions/src/index.js - About 2 hrs to fix

          Function getTargets has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function getTargets(
            inputTargets: InputTargets = {},
            options: Object = {},
          ): Targets {
            const targetOpts: Targets = {};
          Severity: Minor
          Found in packages/babel-helper-compilation-targets/src/index.js - About 2 hrs to fix

            Function gatherSequenceExpressions has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function gatherSequenceExpressions(
              nodes: Array<Object>,
              scope: Scope,
              declars: Array<Object>,
            ): ?Object {
            Severity: Minor
            Found in packages/babel-types/src/converters/gatherSequenceExpressions.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                if (
                  nodeType === "Literal" ||
                  "StringLiteral" === nodeType ||
                  "NumericLiteral" === nodeType ||
                  "NullLiteral" === nodeType ||
              Severity: Critical
              Found in packages/babel-types/src/validators/generated/index.js - About 2 hrs to fix

                Function ForOfStatement has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      ForOfStatement(path, state) {
                        const right = path.get("right");
                        if (
                          right.isArrayExpression() ||
                          right.isGenericType("Array") ||
                Severity: Minor
                Found in packages/babel-plugin-transform-for-of/src/index.js - About 2 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                        if (parentPath.isMemberExpression({ object: node })) {
                          const grandparentPath = parentPath.parentPath;
                  
                          const argsOptEligible =
                            !state.deopted &&
                  Severity: Critical
                  Found in packages/babel-plugin-transform-parameters/src/rest.js - About 2 hrs to fix

                    Function ReferencedIdentifier has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      ReferencedIdentifier(path, state) {
                        const { node } = path;
                    
                        // we can't guarantee the purity of arguments
                        if (node.name === "arguments") {
                    Severity: Minor
                    Found in packages/babel-plugin-transform-parameters/src/rest.js - About 2 hrs to fix

                      Function insertAfter has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function insertAfter(nodes) {
                        this._assertUnremoved();
                      
                        nodes = this._verifyNodeList(nodes);
                      
                      
                      Severity: Minor
                      Found in packages/babel-traverse/src/path/modification.js - About 2 hrs to fix

                        Function MetaProperty has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              MetaProperty(path) {
                                const meta = path.get("meta");
                                const property = path.get("property");
                                const { scope } = path;
                        
                        
                        Severity: Minor
                        Found in packages/babel-plugin-transform-new-target/src/index.js - About 2 hrs to fix

                          Function readRegexp has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            readRegexp(): void {
                              const start = this.state.pos;
                              let escaped, inClass;
                              for (;;) {
                                if (this.state.pos >= this.length) {
                          Severity: Minor
                          Found in packages/babel-parser/src/tokenizer/index.js - About 1 hr to fix

                            Function isNodesEquivalent has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function isNodesEquivalent(a: any, b: any): boolean {
                              if (
                                typeof a !== "object" ||
                                typeof b !== "object" ||
                                a == null ||
                            Severity: Minor
                            Found in packages/babel-types/src/validators/isNodesEquivalent.js - About 1 hr to fix

                              Function rewriteLiveReferences has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              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

                                function buildPrivateMethodDeclaration(prop, privateNamesMap, loose = false) {
                                  const privateName = privateNamesMap.get(prop.node.key.id.name);
                                  const {
                                    id,
                                    methodId,
                                Severity: Minor
                                Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 hr to fix

                                  Function normalizeOptions has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function normalizeOptions(opts: Options) {
                                    validateTopLevelOptions(opts);
                                  
                                    const useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);
                                  
                                  
                                  Severity: Minor
                                  Found in packages/babel-preset-env/src/normalize-options.js - About 1 hr to fix

                                    Function getScopeInformation has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function getScopeInformation(fnPath) {
                                      const thisPaths = [];
                                      const argumentsPaths = [];
                                      const newTargetPaths = [];
                                      const superProps = [];
                                    Severity: Minor
                                    Found in packages/babel-traverse/src/path/conversion.js - About 1 hr to fix

                                      Function tsParseDeclaration has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          tsParseDeclaration(
                                            node: any,
                                            value: string,
                                            next: boolean,
                                          ): ?N.Declaration {
                                      Severity: Minor
                                      Found in packages/babel-parser/src/plugins/typescript/index.js - About 1 hr to fix

                                        Function parseForStatement has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          parseForStatement(node: N.Node): N.ForLike {
                                            this.next();
                                            this.state.labels.push(loopLabel);
                                        
                                            let awaitAt = -1;
                                        Severity: Minor
                                        Found in packages/babel-parser/src/parser/statement.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language