Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prettier-eslint linter doesn't work - missing binary #44

Open
kuba-orlik opened this issue Jul 11, 2020 · 6 comments
Open

prettier-eslint linter doesn't work - missing binary #44

kuba-orlik opened this issue Jul 11, 2020 · 6 comments

Comments

@kuba-orlik
Copy link
Contributor

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

@jparise
Copy link
Collaborator

jparise commented Jul 11, 2020

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:

$localBinaryPath = Filesystem::resolvePath('./node_modules/.bin/prettier-eslint');

@kuba-orlik
Copy link
Contributor Author

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 repro@1.0.0 No description
npm WARN repro@1.0.0 No repository field.

+ prettier-eslint@11.0.0
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

@gaving
Copy link

gaving commented Jan 16, 2021

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.

@jparise
Copy link
Collaborator

jparise commented Jun 9, 2021

@kuba-orlik did @gaving's suggestion help you get this sorted out?

@steverice
Copy link
Contributor

Note that since ea1b7a2 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.

@642802017
Copy link

open .arclint file
find NO.45andNO.58 row 's bin path ,open file
open terminal $ yarn install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants