arcanist-linters
arcanist-linters copied to clipboard
prettier-eslint linter doesn't work - missing binary
I'm running arc lint
with this config:
{
"linters": {
"prettier-eslint": {
"type": "prettier-eslint",
"bin": "./node_modules/.bin/prettier-eslint",
"include": ["(\\.ts$)", "(\\.css$)"]
}
}
}
arc lint
shows this error:
Exception
Error in parsing '.arclint' file, in key 'bin' for linter 'prettier-eslint'.
None of the configured binaries can be located.
(Run with `--trace` for a full exception trace.)
I've already installed prettier-eslint
inside the repo
Does it work if you don't use the bin
configuration key? It looks like we have some custom path resolution stuff in there, but it defaults to ./node_modules/.bin/prettier-eslint
:
https://github.com/pinterest/arcanist-linters/blob/d6a2d851d455ca9600ee5dacdce1e3a94c54b6a9/src/PrettierESLintLinter.php#L76
The problem seems to be that prettier-eslint
does not register a binary:
[kuba@laptop repro]$ npm install --save-dev prettier-eslint
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
+ [email protected]
added 163 packages from 101 contributors and audited 163 packages in 10.121s
18 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
[kuba@laptop repro]$ ls node_modules/.bin
acorn eslint esparse esvalidate js-yaml mkdirp prettier rimraf semver tsc tsserver which
Not sure if this is still relevant but you're probably looking for this cli package instead: https://github.com/prettier/prettier-eslint-cli
Recently burned by the same thing elsewhere.
@kuba-orlik did @gaving's suggestion help you get this sorted out?
Note that since ea1b7a2564c0d38e72612261787498f678c94d03 the linter should properly detect and suggest the right package to install if it's missing. It's likely you don't need to specify a custom bin
path.
open .arclint file find NO.45andNO.58 row 's bin path ,open file open terminal $ yarn install