js2-mode icon indicating copy to clipboard operation
js2-mode copied to clipboard

disable warning `msg.no.side.effects`?

Open blaenk opened this issue 8 years ago • 2 comments

I'm using chai for testing my code but certain constructs make js2-mode think that there are no side-effects. I think the side-effects warning is useful otherwise, but it's noisy in this context. Is there a way to disable it when it recognizes it's in an expect(_) chain? Failing that, is there a way to only disable this warning message but not all other warning messages?

screenshot

blaenk avatar Jul 23 '16 18:07 blaenk

For those looking for this feature right now, refer to issue #260 where I have code that does exactly this.

Also take a look at my config for js2-mode where my complete warning ignore code exists: https://github.com/jordonbiondo/.emacs.d/blob/master/init.el#L901

It would be great if this was built in to the mode. I'd be happy to open a PR that makes this a real feature if the maintainers are interested in the idea.

jordonbiondo avatar Jan 27 '17 16:01 jordonbiondo

See https://github.com/mooz/js2-mode/pull/404#issuecomment-997100520 for a quick and easy way to apply this to a whole test/ subdirectory.

aspiers avatar Dec 18 '21 00:12 aspiers