pinterest / arcanist-linters

A collection of custom Arcanist linters
Apache License 2.0
62 stars 45 forks source link

Specify a different npm package name from node binary #53

Closed steverice closed 3 years ago

steverice commented 3 years ago

Not all npm packages use the same name for their main binary as the name of the package in the npm repository.

This change separates these configs so they can be different, but assumes they are the same as default behavior.

The result is that the OpenAPI linter now provides correct install instructions when it is missing:

Some linters failed:
    - ArcanistMissingLinterException: Unable to locate binary "lint-openapi" to run linter OpenApiLinter. You may need to install the binary, or adjust your linter configuration.
      TO INSTALL:
      [lint-openapi globally] run: `npm install --global ibm-openapi-validator`
      [lint-openapi locally] run either: `npm install --save-dev ibm-openapi-validator` OR `yarn add --dev ibm-openapi-validator`