diff options
author | Nathan Friend <nathan@gitlab.com> | 2019-06-03 22:51:02 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-06-03 22:51:02 +0000 |
commit | bee3c7e847e4c682f3b808ebfddcc0b6746c2d60 (patch) | |
tree | ddac4275d2f6da90e0e5651c5d030d861425a7d9 /app/assets/javascripts/ide/stores/getters.js | |
parent | deebe0bf1ed222450092397e683dff746c7979b3 (diff) | |
download | gitlab-ce-bee3c7e847e4c682f3b808ebfddcc0b6746c2d60.tar.gz |
Comply with `no-implicit-coercion` rule (CE)
This commit is the result of running `yarn eslint --fix` after enabling
the `no-implicit-coercion` ESLint rule. This rule has been added to
our ESLint config here:
https://gitlab.com/gitlab-org/gitlab-eslint-config/merge_requests/14
Diffstat (limited to 'app/assets/javascripts/ide/stores/getters.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/getters.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/ide/stores/getters.js b/app/assets/javascripts/ide/stores/getters.js index 7a88ac5b116..5a736805fdc 100644 --- a/app/assets/javascripts/ide/stores/getters.js +++ b/app/assets/javascripts/ide/stores/getters.js @@ -42,9 +42,10 @@ export const emptyRepo = state => export const currentTree = state => state.trees[`${state.currentProjectId}/${state.currentBranchId}`]; -export const hasChanges = state => !!state.changedFiles.length || !!state.stagedFiles.length; +export const hasChanges = state => + Boolean(state.changedFiles.length) || Boolean(state.stagedFiles.length); -export const hasMergeRequest = state => !!state.currentMergeRequestId; +export const hasMergeRequest = state => Boolean(state.currentMergeRequestId); export const allBlobs = state => Object.keys(state.entries) @@ -70,7 +71,7 @@ export const isCommitModeActive = state => state.currentActivityView === activit export const isReviewModeActive = state => state.currentActivityView === activityBarViews.review; export const someUncommittedChanges = state => - !!(state.changedFiles.length || state.stagedFiles.length); + Boolean(state.changedFiles.length || state.stagedFiles.length); export const getChangesInFolder = state => path => { const changedFilesCount = state.changedFiles.filter(f => filePathMatches(f.path, path)).length; |