Showing 1,982 of 1,982 total issues

Function _methodHead has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function _methodHead(node: Object) {
  const kind = node.kind;
  const key = node.key;

  if (kind === "get" || kind === "set") {
Severity: Minor
Found in packages/babel-generator/src/generators/methods.js - About 1 hr to fix

    Function getTokenType has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function getTokenType(match) {
      const [offset, text] = match.slice(-2);
      const token = matchToToken(match);
    
      if (token.type === "name") {
    Severity: Minor
    Found in packages/babel-highlight/src/index.js - About 1 hr to fix

      Function TupleExpression has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function TupleExpression(node: Object) {
        const elems = node.elements;
        const len = elems.length;
      
        let startToken;
      Severity: Minor
      Found in packages/babel-generator/src/generators/types.js - About 1 hr to fix

        Function VariableDeclaration has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function VariableDeclaration(node: Object, parent: Object) {
          if (node.declare) {
            // TS
            this.word("declare");
            this.space();
        Severity: Minor
        Found in packages/babel-generator/src/generators/statements.js - About 1 hr to fix

          Function resolveRootMode has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function* resolveRootMode(
            rootDir: string,
            rootMode: RootMode,
          ): Handler<string> {
            switch (rootMode) {
          Severity: Minor
          Found in packages/babel-core/src/config/partial.js - About 1 hr to fix

            Function isExecutionUncertain has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function isExecutionUncertain(type, key) {
              switch (type) {
                // a && FOO
                // a || FOO
                case "LogicalExpression":
            Severity: Minor
            Found in packages/babel-traverse/src/path/introspection.js - About 1 hr to fix

              Function default has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function () {
                return {
                  name: "regenerator-usage",
                  pre() {
                    this.usesRegenerator = false;
              Severity: Minor
              Found in packages/babel-preset-env/src/polyfills/regenerator/usage-plugin.js - About 1 hr to fix

                Function rename has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  rename(block?) {
                    const { binding, oldName, newName } = this;
                    const { scope, path } = binding;
                
                    const parentDeclar = path.find(
                Severity: Minor
                Found in packages/babel-traverse/src/scope/lib/renamer.js - About 1 hr to fix

                  Function getThisBinding has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function getThisBinding(thisEnvFn, inConstructor) {
                    return getBinding(thisEnvFn, "this", thisBinding => {
                      if (!inConstructor || !hasSuperClass(thisEnvFn)) return t.thisExpression();
                  
                      const supers = new WeakSet();
                  Severity: Minor
                  Found in packages/babel-traverse/src/path/conversion.js - About 1 hr to fix

                    Function _verifyNodeList has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function _verifyNodeList(nodes) {
                      if (!nodes) {
                        return [];
                      }
                    
                    
                    Severity: Minor
                    Found in packages/babel-traverse/src/path/modification.js - About 1 hr to fix

                      Function getAttachmentPath has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        getAttachmentPath() {
                          let path = this._getAttachmentPath();
                          if (!path) return;
                      
                          let targetScope = path.scope;
                      Severity: Minor
                      Found in packages/babel-traverse/src/path/lib/hoister.js - About 1 hr to fix

                        Function checkConstants has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          checkConstants() {
                            const scope = this.scope;
                            const state = this.state;
                        
                            for (const name of Object.keys(scope.bindings)) {
                        Severity: Minor
                        Found in packages/babel-plugin-transform-block-scoping/src/index.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      } else if (
                                        stmt.isTSTypeAliasDeclaration() ||
                                        stmt.isTSDeclareFunction() ||
                                        stmt.isTSInterfaceDeclaration() ||
                                        stmt.isClassDeclaration({ declare: true }) ||
                          Severity: Major
                          Found in packages/babel-plugin-transform-typescript/src/index.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                  if (
                                    (node.type === "ImportDeclaration" &&
                                      (node.importKind === "type" || node.importKind === "typeof")) ||
                                    (node.type === "ExportNamedDeclaration" &&
                                      node.exportKind === "type") ||
                            Severity: Major
                            Found in packages/babel-parser/src/plugins/flow.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                  if (
                                    (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) ||
                                    (hasNamespace && parseAfterNamespace && !hasSpecifiers)
                                  ) {
                                    throw this.unexpected(null, tt.braceL);
                              Severity: Major
                              Found in packages/babel-parser/src/parser/statement.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                          if (
                                            (result.type === "ExportNamedDeclaration" &&
                                              (!result.exportKind || result.exportKind === "value")) ||
                                            (result.type === "ExportAllDeclaration" &&
                                              (!result.exportKind || result.exportKind === "value")) ||
                                Severity: Major
                                Found in packages/babel-parser/src/parser/statement.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                    if (
                                      nodeType === "Terminatorless" ||
                                      "BreakStatement" === nodeType ||
                                      "ContinueStatement" === nodeType ||
                                      "ReturnStatement" === nodeType ||
                                  Severity: Major
                                  Found in packages/babel-types/src/validators/generated/index.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                      if (
                                        nodeType === "ModuleSpecifier" ||
                                        "ExportSpecifier" === nodeType ||
                                        "ImportDefaultSpecifier" === nodeType ||
                                        "ImportNamespaceSpecifier" === nodeType ||
                                    Severity: Major
                                    Found in packages/babel-types/src/validators/generated/index.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                        if (
                                          nodeType === "FunctionParent" ||
                                          "FunctionDeclaration" === nodeType ||
                                          "FunctionExpression" === nodeType ||
                                          "ObjectMethod" === nodeType ||
                                      Severity: Major
                                      Found in packages/babel-types/src/validators/generated/index.js - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                          if (
                                            nodeType === "Function" ||
                                            "FunctionDeclaration" === nodeType ||
                                            "FunctionExpression" === nodeType ||
                                            "ObjectMethod" === nodeType ||
                                        Severity: Major
                                        Found in packages/babel-types/src/validators/generated/index.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language