首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >JS2-模式中的Linting错误,似乎不是来自flycheck?

JS2-模式中的Linting错误,似乎不是来自flycheck?
EN

Stack Overflow用户
提问于 2016-10-20 15:56:31
回答 1查看 364关注 0票数 0

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

我有点不知所措,在这一点上,什么可能会产生这些衬里错误。据我所知,它们一定来自flycheck (我在javascript层代码中注意到了这条线,尽管docs中没有提到flycheck,也找不到它的调用来源)。不过,我敢说支票没开。我很确定这是因为

  • 我尝试通过交互式的小型缓冲器手动切换flycheck-mode
  • 我已经运行了describe-mode,并确保没有提到flycheck、linting或语法检查
  • flycheck-verify-setup报告Flycheck Mode is disabled.
  • 我添加了一个从未触发过的钩子(add-hook 'flycheck-mode-hook (lambda () (message "entered flycheck mode")))

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

这是一个.spacemacs节选

代码语言:javascript
复制
 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 )
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-10-21 00:22:20

这些错误直接来自js2-mode

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

代码语言:javascript
复制
(setq js2-mode-show-parse-errors nil
      js2-mode-show-strict-warnings nil)
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40159183

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档