Fix obsolete (when|if)-let messages in Emacs 26
This commit is contained in:
parent
e168118243
commit
76a4ae459d
40 changed files with 110 additions and 103 deletions
|
@ -10,14 +10,14 @@ ignore the cache."
|
|||
(or (and (not refresh-p)
|
||||
(gethash project-root +javascript-npm-conf))
|
||||
(let ((package-file (expand-file-name "package.json" project-root)))
|
||||
(when-let (json (and (file-exists-p package-file)
|
||||
(json-read-file package-file)))
|
||||
(when-let* ((json (and (file-exists-p package-file)
|
||||
(json-read-file package-file))))
|
||||
(puthash project-root json +javascript-npm-conf))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +javascript-npm-dep-p (packages &optional project-root refresh-p)
|
||||
(when-let (data (and (bound-and-true-p +javascript-npm-mode)
|
||||
(+javascript-npm-conf project-root refresh-p)))
|
||||
(when-let* ((data (and (bound-and-true-p +javascript-npm-mode)
|
||||
(+javascript-npm-conf project-root refresh-p))))
|
||||
(let ((deps (append (cdr (assq 'dependencies data))
|
||||
(cdr (assq 'devDependencies data)))))
|
||||
(cond ((listp packages)
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
(defun +javascript|init-flycheck-eslint ()
|
||||
"Favor local eslint over global installs and configure flycheck for eslint."
|
||||
(when (derived-mode-p 'js-mode)
|
||||
(when-let ((exec-path (list (doom-project-expand "node_modules/.bin")))
|
||||
(eslint (executable-find "eslint")))
|
||||
(when-let* (((exec-path (list (doom-project-expand "node_modules/.bin")))
|
||||
(eslint (executable-find "eslint"))))
|
||||
(setq-local flycheck-javascript-eslint-executable eslint))
|
||||
(when (flycheck-find-checker-executable 'javascript-eslint)
|
||||
;; Flycheck has it's own trailing command and semicolon warning that was
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue