HeavenShallBurn HeavenShallBurn - 5 months ago 13x
Javascript Question

ESLint - new line before return with IIFE

Have the following simple code:
Image here

How to avoid this notification? I think this is because I used the IIFE function.

Thanks in advance.


If you want to disable it for this specific case you can just add a disable comment on the same line: (function(){ // eslint-disable-line newline-before-return

If you'd like to disable it for the entire project, edit your .eslintrc file to add it to the rules section:

    "rules": {
        "newline-before-return": "off"

More info on configuration here: http://eslint.org/docs/user-guide/configuring