fix(format): void-function +javascript-npm-conf error
Amend: c0a1b9efc9
Close: #8005
This commit is contained in:
parent
bf330b405d
commit
67e5dda526
1 changed files with 5 additions and 1 deletions
|
@ -102,5 +102,9 @@ This is controlled by `+format-on-save-disabled-modes'."
|
||||||
".prettierrc.toml")
|
".prettierrc.toml")
|
||||||
if (locate-dominating-file default-directory file)
|
if (locate-dominating-file default-directory file)
|
||||||
return t)
|
return t)
|
||||||
(assq 'prettier (+javascript-npm-conf)))
|
(when-let ((pkg (locate-dominating-file default-directory "package.json")))
|
||||||
|
(require 'json)
|
||||||
|
(let ((json-key-type 'alist))
|
||||||
|
(assq 'prettier
|
||||||
|
(json-read-file (expand-file-name "package.json" pkg))))))
|
||||||
(apheleia-formatters-indent "--use-tabs" "--tab-width"))))))))
|
(apheleia-formatters-indent "--use-tabs" "--tab-width"))))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue