Skip to content

Commit 90e3cc1

Browse files
cannonagaearon
authored andcommitted
Relaxed eslint rule no-unused-expressions (#724)
Now allows the use of short circuit and ternary expressions.
1 parent 91b32a2 commit 90e3cc1

File tree

1 file changed

+4
-1
lines changed
  • packages/eslint-config-react-app

1 file changed

+4
-1
lines changed

packages/eslint-config-react-app/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ module.exports = {
127127
'no-undef': 'error',
128128
'no-unexpected-multiline': 'warn',
129129
'no-unreachable': 'warn',
130-
'no-unused-expressions': 'warn',
130+
'no-unused-expressions': ['warn', {
131+
'allowShortCircuit': true,
132+
'allowTernary': true
133+
}],
131134
'no-unused-labels': 'warn',
132135
'no-unused-vars': ['warn', {
133136
vars: 'local',

0 commit comments

Comments
 (0)