fix(format): prettier-*: 'void-variable unless' error
Also short-circuits the condition with
apheleia-formatters-respect-indent-level, if it's been disabled.
Amend: c0a1b9efc9
Ref: #7998
This commit is contained in:
parent
ddfb0cc3cc
commit
50adaa9e48
1 changed files with 15 additions and 14 deletions
|
@ -89,17 +89,18 @@ This is controlled by `+format-on-save-disabled-modes'."
|
||||||
(setf (alist-get formatter apheleia-formatters)
|
(setf (alist-get formatter apheleia-formatters)
|
||||||
(append (delete '(apheleia-formatters-js-indent "--use-tabs" "--tab-width")
|
(append (delete '(apheleia-formatters-js-indent "--use-tabs" "--tab-width")
|
||||||
(alist-get formatter apheleia-formatters))
|
(alist-get formatter apheleia-formatters))
|
||||||
'(unless (or (cl-loop for file
|
'((when apheleia-formatters-respect-indent-level
|
||||||
in '(".prettierrc"
|
(unless (or (cl-loop for file
|
||||||
".prettierrc.json"
|
in '(".prettierrc"
|
||||||
".prettierrc.yml"
|
".prettierrc.json"
|
||||||
".prettierrc.yaml"
|
".prettierrc.yml"
|
||||||
".prettierrc.json5"
|
".prettierrc.yaml"
|
||||||
".prettierrc.js" "prettier.config.js"
|
".prettierrc.json5"
|
||||||
".prettierrc.mjs" "prettier.config.mjs"
|
".prettierrc.js" "prettier.config.js"
|
||||||
".prettierrc.cjs" "prettier.config.cjs"
|
".prettierrc.mjs" "prettier.config.mjs"
|
||||||
".prettierrc.toml")
|
".prettierrc.cjs" "prettier.config.cjs"
|
||||||
if (locate-dominating-file default-directory file)
|
".prettierrc.toml")
|
||||||
return t)
|
if (locate-dominating-file default-directory file)
|
||||||
(assq 'prettier (+javascript-npm-conf)))
|
return t)
|
||||||
(apheleia-formatters-indent "--use-tabs" "--tab-width"))))))
|
(assq 'prettier (+javascript-npm-conf)))
|
||||||
|
(apheleia-formatters-indent "--use-tabs" "--tab-width"))))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue