how to disable js2-mode syntax checking globally in spacemacs
Asked Answered
P

3

20

Since im using eslint, syntax checking from js-mode is redundant to me. so how to turn it off globally instead of toggling on and off?

I configured eslint not to check for semicolons, but js2-mode still checks it. if js2-mode syntax checking cant be disabled globally, is there a way to only turn off semicolon check?

Pugnacious answered 2/2, 2016 at 19:23 Comment(0)
S
26

shangsunset's answer only disables the semi-colon warning, to disable all js2-mode errors and warnings globally, you'll need something like this in your .spacemacs's dotspacemacs/user-config section:

;; Turn off js2 mode errors & warnings (we lean on eslint/standard)
(setq js2-mode-show-parse-errors nil)
(setq js2-mode-show-strict-warnings nil)
Stammel answered 12/2, 2017 at 18:37 Comment(1)
One could also just call js2-toggle-warnings-and-errors if you want it on the fly, which is bound to , wKieger
P
15

putting (setq js2-strict-missing-semi-warning nil) in .spacemacs solves my issue.

Pugnacious answered 3/2, 2016 at 16:49 Comment(1)
I think you'd better add a complete guide as (setq js2-strict-missing-semi-warning nil)~Metasomatism
E
0

I found a way to toggle manually SPC t s. There's documentation as to how to disable it in your .spacemacs file, but I haven't been able to get it to work.

Endstopped answered 3/2, 2016 at 15:26 Comment(1)
where do you put the setting in your .spacemacs? did you try putting in user-init or user-config? i think im more focused on js2-mode than flycheckPugnacious

© 2022 - 2024 — McMap. All rights reserved.