简体   繁体   中英

Linting errors in js2-mode that seem to *not* be coming from flycheck?

I'm using emacs with the Spacemacs configuration (javascript layer enabled, syntax-checking not enabled). When in js2-mode I am finding that the wrong linting is happening (ie I have a .eslintrc file at my project root and its config is being ignored - running eslint from the cli gives me zero errors but errors appear in-buffer).

cli的eslint显示没有错误

I'm a bit at a loss at this point on what could even be generating these linting errors. As far as I know, they must be coming from flycheck (I note this line in the javascript layer code even though flycheck isn't mentioned in the docs nor can I find where its invoked from). However, I can swear that flycheck isn't on. I am quite sure of this because

  • I've tried manually toggling off flycheck-mode through the interactive minibuffer
  • I've run describe-mode and ensured that there's no mention of flycheck, linting, or syntax checking
  • flycheck-verify-setup reports Flycheck Mode is disabled.
  • I've added a hook (add-hook 'flycheck-mode-hook (lambda () (message "entered flycheck mode"))) that never gets triggered

So where could these errors in my buffer possibly be coming from?.

关于缺少半冒号和逗号结尾的Eslint错误

错误显示在minibuffer中

Here is a .spacemacs excerpt

 dotspacemacs-configuration-layers
 '(
     ;; ----------------------------------------------------------------
     ;; Example of useful layers you may want to use right away.
     ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
     ;; <M-m f e R> (Emacs style) to install them.
     ;; ----------------------------------------------------------------
     javascript
     html
     helm
     auto-completion
     git
     better-defaults
     colors
     ;; emacs-lisp
     markdown
     clojure
     ;; org
     ;; (shell :variables shell-default-position 'bottom)
     ;; spell-checking
     ;; react
     ;; syntax-checking
        version-control
     )
 ;; List of additional packages that will be installed without being
 ;; wrapped in a layer. If you need some configuration for these
 ;; packages, then consider creating a layer. You can also put the
 ;; configuration in `dotspacemacs/user-config'.
 dotspacemacs-additional-packages '(
                                                                        paredit
                                                                        editorconfig
                                                                        writeroom-mode
                                                                        tide
                                                                        csharp-mode
                                                                        elisp-format
                                                                        ;; powershell
                                                                        omnisharp
                                                                        gist
                                                                        parinfer
                                                                        ag )

These errors come directly from js2-mode .

You can turn them off by setting these 2 in your config:

(setq js2-mode-show-parse-errors nil
      js2-mode-show-strict-warnings nil)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM