Skip to content

update the npm install docs to not use node_modules/.bin #1245

@Pomax

Description

@Pomax

Regardless of whether you've installed the CLI locally or globally, once you've installed it you can run it using npx, which much like npm comes with Node.js and performs automatic module directory resolution, which means that you just run npx quick-lint-js rather than trying to guess at which node_modules directory you need to reach into (because npx works irrespective of whether you're in your project's root dir, or any nested dir inside of that).

So:

  GNU/Linux and  macOS with npm

    npm install quick-lint-js --save-dev --save-exact
    npx quick-lint-js --help

 GNU/Linux and  macOS with yarn

    yarn add quick-lint-js --dev --exact
    npx quick-lint-js --help

 Windows with npm

    npm install quick-lint-js --save-dev --save-exact
    npx quick-lint-js.cmd --help

 Windows with yarn

    yarn add quick-lint-js --dev --exact
    npx quick-lint-js.cmd --help

Although given that the run command is identical for all of those, it probably makes sense to take it out of those install instructions, and instead give it its own "and then run it with" section that's OS agnostic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions