Is it possible to disable warning for functions that not always return value in js2-mode?

  • look at js2-ingored-warnings variable Commented Feb 9, 2017 at 11:50
  • @ChakravarthyRaghunandan describe variable can't find it and there is no such varaible in the source
    – jcubic
    Commented Feb 9, 2017 at 11:57
  • Are you sure? Maybe emacs had not loaded js2-mode. Open a .js file and search for a variable after opening that file Commented Feb 9, 2017 at 13:08
  • The variable is called js2-ignored-warnings.
    – Dmitry
    Commented Feb 9, 2017 at 15:03
  • 2
    Have you tried changing js2-strict-inconsistent-return-warning ? Also most people disable js2-mode warnings and use flycheck with some linter.
    – caisah
    Commented Feb 9, 2017 at 15:32

1 Answer 1


The variable responsible for this is js2-strict-inconsistent-return-warning. Just set it to nil.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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