5

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!

Drew
  • 29,895
  • 7
  • 74
  • 104
user2331095
  • 6,577
  • 8
  • 36
  • 56
  • By putting in the semi-colon? –  Jun 24 '16 at 18:26
  • @torazaburo Yes, I can only remove the annoying underline by putting a semicolon... But in my project, semicolon is unnecessary. – user2331095 Jun 25 '16 at 05:35
  • These underlines aren't from Flycheck. If they were you'd see the yellow dot in the fringe on all the underlines lines. I presume that's the error highlighting of JS2 Mode. –  Jun 25 '16 at 06:38
  • @lunaryorn You are right, I've find the solution. Thank you! – user2331095 Jun 25 '16 at 13:54

1 Answers1

5

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.

user2331095
  • 6,577
  • 8
  • 36
  • 56