gerard2p/node-mce

View on GitHub

Showing 4 of 15 total issues

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

async function createProjectExtructure(application: string, opt: Parsed<typeof options>) {
    let {author} = opt
    await spin('Creating Files', async () => {
        // istanbul ignore else
        if(author === 'GIT_OR_NPM_USER') {
Severity: Minor
Found in src/commands/new.ts - About 2 hrs to fix

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

    export function SyncFiles(patterns: string[], outDir = './lib') {
        const localPackage = new PackageJSON(callerPath('package.json'))
        const bins = Object.keys(localPackage.bin).map(bin => localPackage.bin[bin]).map(bin => `${sync(bin)}:.`)
        patterns = [
            'templates/**/*:.',
    Severity: Minor
    Found in src/commands/build/sync.ts - About 1 hr to fix

      Function UseSourceMaps has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export async function UseSourceMaps(error: Error) {
          const showInternal = process.env.MCE_TRACE_SHOWINTERNAL === 'true'
          const showMCE = process.env.MCE_TRACE_SHOWMCE === 'true'
          const stack = error.stack.split('\n')
          const parsed = stack.filter(line => {
      Severity: Minor
      Found in src/@utils/user-sourcemaps.ts - About 1 hr to fix

        Function detectChanges has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function detectChanges(outDir: string, baseDir: string) {
            sourcesTo.clear()
            const {program: {fileInfos}} = JSON.parse(readFileSync('./incremental.tsbuildinfo', 'utf-8')) as { program: { fileInfos: fileInfos}}
            const preCompiled = Object.keys(fileInfos).filter(f => !f.includes('node_modules'))
            const compiled = preCompiled.map(o => {
        Severity: Minor
        Found in src/commands/build/incremental.ts - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language