allowShortCircuit

{ "allowShortCircuit": true } 选项的错误代码示例:

Examples of incorrect code for the { "allowShortCircuit": true } option:

/*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/

a || b

+GYGg7Nmrlg5+TMZxEGEpL5wmt/db/pSBNlX8uHFie/mf372y+pSXV1MdBq2cUlJxZrjoa10xHJxthY1BNBGqFfmr1I+5bFOn/dh7yhB1SbplfifXAv5XeCNDoY0nOJahfr/dEqN4w1nCy+BH4mo0KwKrNbiulGDMNWhyrEDvVviKXmAWKj6K8sgBdQHxW3XdWPZciuJffZaKyQwQtku1gUS5NpUChinGxs4BFYK/e/mLRtar0suO5DaMODCMLfRK2YUf1e/7F/twv71r2x7jQ==

/*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/

a && b()
a() || (b = c)