简体   繁体   中英

jshint: funky code vs semicolons; how to silence all of jshint's complaints about semicolons here?

I'm not a fan of ASI. But given that this is perfectly legit JavaScript, where exactly is it here that jshint (repeatedly, 8 times over) is expecting to find a semicolon?

    script.addEventListener('load', function () {
        ++i !== requires.length ? loader(i) : (loadLocal(thirdParty), loadLocal(main))
    }, true);

At the end of your ternary expression.

ie

(loadLocal(thirdParty), loadLocal(main));
                                        ^ here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM