0

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

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

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