prettier / prettier-emacs

Minor mode to format JS code on file save
http://jlongster.com/A-Prettier-Formatter
372 stars 53 forks source link

No files matching the pattern were found: "false". #70

Open thewebmasterp opened 2 years ago

thewebmasterp commented 2 years ago
prettier -v
2.5.1

My prettier emacs config:

(require 'prettier-js)
(setq prettier-js-args '(
                         "--trailing-comma" "es5"
                         "--tab-width" "2"
                         "--use-tabs" "true"
                         "--no-semi" "false"
                         "--single-quote" "true"
                         "--no-bracket-spacing" "true"
                         "--bracket-same-line" "true"
                         "--arrow-parens" "avoid" 
))
(add-hook 'js2-mode-hook 'prettier-js-mode)
(add-hook 'web-mode-hook 'prettier-js-mode)

Then, when I save a js file, I get the following errors:

prettier errors:
[warn] --jsx-bracket-same-line is deprecated.
[warn] Ignored unknown option --stdin.
[error] No files matching the pattern were found: "false".
[error] No files matching the pattern were found: "true".

The first warning is understandable. But those two last errors?

I found two solutions:

The first one is to comment out those two lines:

;;"--no-semi" "false"
;;"--no-bracket-spacing" "true"

The second solution is to just downgrade the version of prettier. (I chose the 1.13.1 and it worked like charm). For now will just keep the version downgraded, but decided to report the bugs.

hsheikhali1 commented 2 years ago

I'm also running into this issue :/ any updates on this bug?

olymk2 commented 1 year ago

Just hit this, seems like this PR https://github.com/prettier/prettier-emacs/pull/69 will fix it anything stopping this being merged ?