I realize that flycheck is a syntax checker that can be used with nearly every language's major mode. My question is how (if at all) it can interact with modes such as (specifically) js2-mode which offer

on-the-fly reporting of syntax errors and strict-mode warnings`.

This question answers how they are different but I am wondering if it is better to just pick one mode or can they work together somehow?

I realize this could be opinion based so I am wondering If someone has an example of them working together how does it work?


  • Possible duplicate of js2-mode with flycheck and jshint – Drew Jul 27 '16 at 15:20
  • @Drew That question explains the difference and what each mode does, I was trying to figure out if they can work together. lunaryorn gives an answer with more substance that what is found in that question. – Startec Jul 27 '16 at 19:10

Flycheck can use many different Javascript linters, including but not limited to eslint, which report far more issues that just syntax errors and strict-mode issues. For instance eslint can warn you about useless super() calls in ES6 constructors, and help you enforce the use of const in ES6 code, or warn about using var instead of let in ES6.

If you can use Flycheck you should do so and disable the built-in checking of JS2 Mode.

Disclosure: I'm a Flycheck maintainer and thus probably biased.

  • Can the two not coexist? I've been using them concurrently without issue for a while now. – PythonNut Jul 28 '16 at 2:51
  • 2
    They can; JS2 Mode checking is redundant, though. At worst you'll get duplicate warning for the same issue. – user227 Jul 28 '16 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.