gpt4 book ai didi

emacs - 如何删除 flycheck 中烦人的下划线(使用 eslint)?

转载 作者:行者123 更新时间:2023-12-01 13:43:20 25 4
gpt4 key购买 nike

我使用 spacemacs 和 flycheck-eslint 作为 linter 来检查我的 React 代码。

这是我项目的 .eslintrc ,

{
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"semi": [0, "never"],
"eqeqeq": 2,
"no-console": 1,
"no-unused-vars": [1, {"vars": "all", "args": "after-used"}],
"comma-spacing": [2, {"before": false, "after": true}],
"react/prop-types": [2, {
"ignore": ["dispatch"]
}]
},
"globals": {
"__DEV_MODE__": true,
"__API_SERVER__": true
}
}

我在 .eslintrc 中没有设置分号.我尝试过 Atom 编辑器、Sublime Text3、VSCode,它们按预期工作。

但是在 spacemacs 中,我得到了恼人的下划线提示。

enter image description here

如何删除烦人的下划线?

谢谢!

最佳答案

经过研究,我发现它与flycheck无关。下划线由 js2-mode 添加。

解决方法是添加(setq js2-strict-missing-semi-warning nil).spacemacs文件。

关于emacs - 如何删除 flycheck 中烦人的下划线(使用 eslint)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38011791/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com