I am using spacemacs and flycheck-eslint as linter to check my React code.
Here is my project's .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
}
}
I have set NO semicolon in the .eslintrc
. I've try Atom Editor, Sublime Text3, VSCode, they work as expect.
But in spacemacs, I got the annoying underline hint.
How can I remove the annoying underline ??
Thanks!
After researching, I've found that it is not related to flycheck. The underline is added by js2-mode.
The solution is to add (setq js2-strict-missing-semi-warning nil)
in .spacemacs
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With