mAAdhaTTah/brookjs

View on GitHub

Showing 36 of 74 total issues

Function reducer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export const reducer: EddyReducer<State, Action> = (
state = initialState('/', null),
action,
) => {
switch (action.type) {
Severity: Minor
Found in packages/brookjs-cli/src/commands/TestCommand/Lint/reducer.tsx - About 35 mins to fix

Function View has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const View: React.FC<State> = ({ status, paths, results, error }) => {
switch (status) {
case 'init':
case 'globbing':
case 'formatting':
Severity: Minor
Found in packages/brookjs-cli/src/commands/FormatCommand/index.tsx - About 35 mins to fix

Function reducer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export const reducer: EddyReducer<State, Action> = (
state = initialState('/', null),
action,
) => {
switch (action.type) {
Severity: Minor
Found in packages/brookjs-cli/src/commands/TestCommand/Check/reducer.tsx - About 35 mins to fix

Function runCommands has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const runCommands = <A extends Action>(
run: ResultRight<A>[],
dispatch: (action: A) => A,
) => {
for (const cmd of run) {
Severity: Minor
Found in packages/brookjs-eddy/src/eddy.ts - About 35 mins to fix

Avoid too many return statements within this function.
Open

return false;
Severity: Major
Found in rollup.config.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

    return state;
    Severity: Major
    Found in packages/brookjs-cli/src/commands/NewCommand/reducer.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

      return (
      <BuildErrors watch={!!props.watch} errors={[...errors, ...warnings]} />
      );
      Severity: Major
      Found in packages/brookjs-cli/src/commands/BuildCommand/View.tsx - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

        return null;
        Severity: Major
        Found in packages/brookjs-cli/src/commands/StartCommand/index.tsx - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

          return {
          ...state,
          step: 'complete',
          result: action.payload.result,
          };
          Severity: Major
          Found in packages/brookjs-cli/src/commands/NewCommand/reducer.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

            return {
            ...state,
            step: 'error',
            error: action.payload.error,
            };
            Severity: Major
            Found in packages/brookjs-cli/src/commands/NewCommand/reducer.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

              return externalModules.includes(packageName);
              Severity: Major
              Found in rollup.config.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                return <Built results={props.results!} watch={!!props.watch} />;
                Severity: Major
                Found in packages/brookjs-cli/src/commands/BuildCommand/View.tsx - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                  return {
                  ...state,
                  step: 'cancelled',
                  };
                  Severity: Major
                  Found in packages/brookjs-cli/src/commands/NewCommand/reducer.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                    return state;
                    Severity: Major
                    Found in packages/brookjs-cli/src/commands/NewCommand/reducer.ts - About 30 mins to fix

                      Function View has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      }> = props => {
                      if (props.rc == null) {
                      return <RCNotLoaded />;
                      }
                       
                       
                      Severity: Minor
                      Found in packages/brookjs-cli/src/commands/BuildCommand/View.tsx - About 25 mins to fix

                      Function jestPlugin has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export const jestPlugin = ({
                      Kefir,
                      }: {
                      Kefir: typeof import('kefir').default;
                      }): Helpers => {
                      Severity: Minor
                      Found in packages/brookjs-desalinate/src/jestPlugin.tsx - About 25 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language