Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove the annoying underline in flycheck (using eslint)?

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.

enter image description here

How can I remove the annoying underline ??

Thanks!

like image 455
user2331095 Avatar asked Jun 24 '16 10:06

user2331095


1 Answers

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.

like image 149
user2331095 Avatar answered Oct 25 '22 15:10

user2331095