Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable js2-mode syntax checking globally in spacemacs

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?

like image 668
shangsunset Avatar asked Feb 02 '16 19:02

shangsunset


2 Answers

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)
like image 51
Darian Moody Avatar answered Sep 21 '22 06:09

Darian Moody


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

like image 34
shangsunset Avatar answered Sep 22 '22 06:09

shangsunset