繁体   English   中英

js2-mode中的掉线错误似乎不是*来自flycheck?

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

我将emacs与Spacemacs配置配合使用(已启用javascript层, 启用语法检查)。 在js2模式下,我发现发生了错误的.eslintrc (即,我的项目根目录下有一个.eslintrc文件,并且其配置被忽略了-从cli运行eslint会给我零错误,但错误出现在缓冲区中)。

cli的eslint显示没有错误

在这一点上, 什至不知所措,甚至可能产生这些掉毛错误。 据我所知,它们一定来自flycheck(即使文档中未提及flycheck,我也注意到了javascript层代码中的这一行 ,也找不到从何处调用flycheck)。 但是,我可以保证flycheck没有启用。 我对此很确定,因为

  • 我尝试通过交互式迷你缓冲区手动切换flycheck-mode
  • 我已经运行了describe-mode并确保没有提及flycheck,lint或语法检查
  • flycheck-verify-setup报告Flycheck Mode is disabled.
  • 我添加了一个钩子(add-hook 'flycheck-mode-hook (lambda () (message "entered flycheck mode")))永远不会被触发的钩子(add-hook 'flycheck-mode-hook (lambda () (message "entered flycheck mode")))

那么我的缓冲区中的这些错误可能从哪里来?

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

错误显示在minibuffer中

这是一个.spacemacs摘录

 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 )

这些错误直接来自js2-mode

您可以通过在配置中设置以下2个来关闭它们:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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