emmercm/metalsmith-plugins

View on GitHub
packages/metalsmith-build-cache/index.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

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

metalsmith(realMetalsmith: Metalsmith, options: Options = {}): Metalsmith {
const { run } = realMetalsmith;
// @ts-expect-error Metalsmith.run()'s three different signatures makes TypeScript mad here
realMetalsmith.run = async (
inputFiles: Metalsmith.Files,
Severity: Minor
Found in packages/metalsmith-build-cache/index.ts - About 1 hr to fix

    Function run has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    realMetalsmith.run = async (
    inputFiles: Metalsmith.Files,
    argTwo: Metalsmith.Callback | Metalsmith.Plugin[] | undefined,
    argThree: Metalsmith.Callback | undefined,
    ) => {
    Severity: Minor
    Found in packages/metalsmith-build-cache/index.ts - About 1 hr to fix

      Function metalsmith has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      metalsmith(realMetalsmith: Metalsmith, options: Options = {}): Metalsmith {
      const { run } = realMetalsmith;
      // @ts-expect-error Metalsmith.run()'s three different signatures makes TypeScript mad here
      realMetalsmith.run = async (
      inputFiles: Metalsmith.Files,
      Severity: Minor
      Found in packages/metalsmith-build-cache/index.ts - About 55 mins to fix
      Category
      Status