   :config
   (setq js2-skip-preprocessor-directives t
         js2-highlight-external-variables nil
-        js2-mode-show-parse-errors nil
-        js2-strict-trailing-comma-warning nil)
+        js2-mode-show-parse-errors nil)
 
   (add-hook! 'js2-mode-hook
     #'(flycheck-mode highlight-indentation-mode rainbow-delimiters-mode))

  (set! :editorconfig :add '(js2-mode js2-basic-offset js-switch-indent-offset))

  ;; Favor local eslint over global, if available
  (defun +javascript|init-flycheck-elint ()
    (when (derived-mode-p 'js-mode)
      (when-let ((eslint (expand-file-name "node_modules/eslint/bin/eslint.js"
                                           (doom-project-root)))
                 (exists-p (file-exists-p eslint))
                 (executable-p (file-executable-p eslint)))
        (setq-local flycheck-javascript-eslint-executable eslint))))
  (add-hook 'flycheck-mode-hook #'+javascript|init-flycheck-elint)

  (sp-with-modes '(js2-mode rjsx-mode)
    (sp-local-pair "/* " " */" :post-handlers '(("| " "SPC"))))

(def-project-mode! +javascript-npm-mode
  :modes (html-mode css-mode web-mode js2-mode markdown-mode)
  :files "package.json")

(def-project-mode! +javascript-eslintd-fix-mode
  :modes (+javascript-npm-mode))

(def-project-mode! +javascript-lb6-mode
  :modes (web-mode js2-mode nxml-mode markdown-mode)
