[英]Linting errors in js2-mode that seem to *not* be coming from flycheck?
我将emacs与Spacemacs配置配合使用(已启用javascript层, 未启用语法检查)。 在js2模式下,我发现发生了错误的.eslintrc
(即,我的项目根目录下有一个.eslintrc
文件,并且其配置被忽略了-从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")))
那么我的缓冲区中的这些错误可能从哪里来?
这是一个.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.