mountain-pass/addressr

View on GitHub
deploy/create-deployment-archive.js

Summary

Maintainability
A
0 mins
Test Coverage

Found fs.writeFileSync with non literal argument at index 0
Open

    fs.writeFileSync(filepath, JSON.stringify(newPackageJson, null, 2))
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'unicorn/prevent-abbreviations' was not found.
Open

#!/usr/bin/env node
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'unicorn/no-null' was not found.
Open

#!/usr/bin/env node
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert ;
Open

const fs = require('fs')
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ··const·{·name,·version,·description,·author,·contributors,·engines,·keywords,·license,·private:·privateKey,·repository,·bugs,·homepage with const·{⏎····name,⏎····version,⏎····description,⏎····author,⏎····contributors,⏎····engines,⏎····keywords,⏎····license,⏎····private:·privateKey,⏎····repository,⏎····bugs,⏎····homepage,⏎·
Open

    const { name, version, description, author, contributors, engines, keywords, license, private: privateKey, repository, bugs, homepage } = context;
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········"name" with ····name
Open

        "name": `${name}-deployment`,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Delete ····
Open

        author,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Delete ····
Open

        engines,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'unicorn/no-process-exit' was not found.
Open

#!/usr/bin/env node
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ····"scripts" with scripts
Open

        "scripts": {
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ····} with ··};
Open

    }
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Delete ····
Open

        version,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········ with ····
Open

        bugs,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········ with ····
Open

        license,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········ with ····
Open

        homepage,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ······"start":·"addressr-server-2" with start:·'addressr-server-2',
Open

            "start": "addressr-server-2"
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········ with ····
Open

        },
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

This file needs no shebang.
Open

const fs = require('fs')
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ····fs.writeFileSync(filepath,·JSON.stringify(newPackageJson,·null,·2)) with ··fs.writeFileSync(filepath,·JSON.stringify(newPackageJson,·null,·2));
Open

    fs.writeFileSync(filepath, JSON.stringify(newPackageJson, null, 2))
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ····createPackageJson(packageJson,·${deploymentDir}/package.json) with ··createPackageJson(packageJson,·${deploymentDir}/package.json);
Open

    createPackageJson(packageJson, `${deploymentDir}/package.json`)
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Delete ····
Open

        description,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ············[name]:·version with ······[name]:·version,
Open

            [name]: version
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ··shell.mkdir('-p',·deploymentDir) with shell.mkdir('-p',·deploymentDir);
Open

    shell.mkdir('-p', deploymentDir)
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········ with ····
Open

        contributors,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ············ with ······
Open

            // TODO: see if we can use the context.main as the start script
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ····await·zip(${deploymentDir}/${archiveName}-deployment-${packageJson.version}.zip) with ··await·zip(⏎····${deploymentDir}/,⏎····${archiveName}-deployment-${packageJson.version}.zip⏎··);
Open

    await zip(`${deploymentDir}/`, `${archiveName}-deployment-${packageJson.version}.zip`)
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert ;
Open

const packageJson = require('../package.json')
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ····"dependencies" with dependencies
Open

        "dependencies": {
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ····const·archiveName·=·packageJson.name.replace('@',·'').replace('/',·'-') with ··const·archiveName·=·packageJson.name.replace('@',·'').replace('/',·'-');
Open

    const archiveName = packageJson.name.replace('@', '').replace('/', '-')
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Insert ;⏎
Open

createDeploymentArchive('./deployment')
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Delete ····
Open

        keywords,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Delete ····
Open

        repository,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Delete ··
Open

    const newPackageJson = {
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'unicorn/filename-case' was not found.
Open

#!/usr/bin/env node
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········ with ····
Open

        private: privateKey,
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Replace ········ with ····
Open

        },
Severity: Minor
Found in deploy/create-deployment-archive.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

There are no issues that match your filters.

Category
Status