Skip to content

Commit 65ad280

Browse files
committed
add no-unreachable eslint rule
1 parent 9400578 commit 65ad280

File tree

7 files changed

+4
-14
lines changed

7 files changed

+4
-14
lines changed

.eslintrc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
'prettier',
88
'import',
99
'compat',
10-
'json'
10+
'json',
1111
],
1212
env: {
1313
es6: true,
@@ -63,10 +63,10 @@ module.exports = {
6363
{
6464
argsIgnorePattern: '^_',
6565
args: 'none',
66-
varsIgnorePattern: '^React$'
66+
varsIgnorePattern: '^React$',
6767
},
6868
],
69-
'eqeqeq': ['error', 'smart'],
69+
eqeqeq: ['error', 'smart'],
7070
'no-var': 'error',
7171
'prefer-const': 'error',
7272
'import/no-unresolved': 2,
@@ -84,6 +84,7 @@ module.exports = {
8484
'no-undef': 2,
8585
'no-duplicate-imports': 2,
8686
'no-console': ['warn', { allow: ['warn', 'error'] }],
87+
'no-unreachable': 2,
8788
'object-shorthand': 1,
8889
'prettier/prettier': 'error',
8990
'prefer-destructuring': [

app/javascript/stores/ApiStore.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,6 @@ class ApiStore extends jsonapi(datxCollection) {
776776
} catch (e) {
777777
// throw to be caught by CardMoveService
778778
throw e
779-
return
780779
}
781780

782781
runInAction(() => {
@@ -868,7 +867,6 @@ class ApiStore extends jsonapi(datxCollection) {
868867
} catch (e) {
869868
// throw to be caught by CardMoveService
870869
throw e
871-
return
872870
}
873871
const collection = this.find('collections', data.to_id)
874872
const { meta } = res

app/javascript/ui/challenges/ChallengeHeaderButton.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ const ChallengeHeaderButton = ({ record, parentChallenge }) => {
7878
} else {
7979
return <ReviewSubmissionsButton record={record} />
8080
}
81-
return null
8281
}
8382

8483
ChallengeHeaderButton.propTypes = {

app/javascript/ui/challenges/PhaseSettings.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ const PhaseSettings = ({ collection, submissionBoxes, closeModal }) => {
7474
</TextButton>
7575
</Fragment>
7676
)
77-
78-
return null
7977
}
8078

8179
const renderPhaseRows = submissionBox => {

app/javascript/ui/global/styled/buttons.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,4 @@ const invertColor = color => {
215215
default:
216216
return v.colors.white
217217
}
218-
return v.colors.white
219218
}

app/javascript/ui/grid/blankContentTool/CollectionCreator.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,12 @@ class CollectionCreator extends React.Component {
7070
switch (type) {
7171
case 'submissionBox':
7272
return 'Collection::SubmissionBox'
73-
break
7473
case 'testCollection':
7574
return 'Collection::TestCollection'
76-
break
7775
case 'foamcoreBoard':
7876
return 'Collection::Board'
79-
break
8077
case 'searchCollection':
8178
return 'Collection::SearchCollection'
82-
break
8379
case 'collection':
8480
case 'template':
8581
return null

app/javascript/ui/pages/MarketingProductPage.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class MarketingProductPage extends React.Component {
9191
break
9292
default:
9393
return ''
94-
break
9594
}
9695

9796
return (

0 commit comments

Comments
 (0)