0

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

7
  • look at js2-ingored-warnings variable Feb 9, 2017 at 11:50
  • @ChakravarthyRaghunandan describe variable can't find it and there is no such varaible in the source
    – jcubic
    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 Feb 9, 2017 at 13:08
  • The variable is called js2-ignored-warnings.
    – Dmitry
    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
    Feb 9, 2017 at 15:32

1 Answer 1

3

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 that you have read and understand our privacy policy and code of conduct.

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