Skip to content

Commit 9d457f1

Browse files
committed
eslint: detect unreachable code
1 parent 6921592 commit 9d457f1

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ module.exports = {
111111
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
112112
'nonblock-statement-body-position': ['error', 'below'],
113113
'@stylistic/jsx-closing-bracket-location': ['error', 'line-aligned'],
114+
'no-unreachable': 'error',
114115
},
115116
globals: {
116117
describe: 'readonly',

src/Day.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ export function Day<TMessage extends IMessage = IMessage> ({
5757
if (currentMessage == null || isSameDay(currentMessage, previousMessage))
5858
return null
5959

60-
return null
61-
6260
return (
6361
<View style={[styles.container, containerStyle]}>
6462
<View style={wrapperStyle}>

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"experimentalDecorators": true,
1313
"preserveConstEnums": true,
1414
"sourceMap": true,
15+
"allowJs": true,
16+
"checkJs": true,
1517
"strictNullChecks": true,
1618
"skipDefaultLibCheck": true,
1719
"skipLibCheck": true,

0 commit comments

Comments
 (0)