Skip to content

Commit

Permalink
chore: enforce import order via prettier (#1918)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Aug 20, 2024
1 parent 9f088b7 commit b0f6fc6
Show file tree
Hide file tree
Showing 231 changed files with 936 additions and 693 deletions.
8 changes: 8 additions & 0 deletions frontend/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
"importOrder": ["^@/(.*)$", "^[./]" ],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true ,
"semi": false,
"singleQuote": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
127 changes: 126 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"@storybook/vue3": "^8.2.2",
"@storybook/vue3-vite": "^8.1.5",
"@testing-library/vue": "^8.1.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jquery": "^3.5.29",
"@types/node": "^20.14.10",
"@vitejs/plugin-vue": "^5.1.1",
Expand Down Expand Up @@ -111,7 +112,7 @@
"ndb": "^1.1.5",
"node-fetch": "^3.3.2",
"npm-check-updates": "^16.14.20",
"prettier": "3.3.2",
"prettier": "^3.3.2",
"react": "^18.3.1",
"react-dom": "^18.2.0",
"sass": "^1.77.6",
Expand Down
4 changes: 0 additions & 4 deletions frontend/prettier.config.js

This file was deleted.

3 changes: 2 additions & 1 deletion frontend/src/cases/common.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { computed } from 'vue'

import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { useCaseListStore } from '@/cases/stores/caseList'
import { State } from '@/varfish/storeUtils'
import { computed } from 'vue'

export const overlayShow = computed(() => {
const caseListStore = useCaseListStore()
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/cases/common.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { computed } from 'vue'

import {
useCaseDetailsStore,
CaseVariantStatsEntry,
useCaseDetailsStore,
} from '@/cases/stores/caseDetails'
import { useCaseListStore } from '@/cases/stores/caseList'
import { State } from '@/varfish/storeUtils'
import { computed } from 'vue'

export const overlayShow = computed(() => {
const caseListStore = useCaseListStore()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import { computed } from 'vue'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { State } from '@/varfish/storeUtils'
import { displayName, formatLargeInt } from '@/varfish/helpers'
import { State } from '@/varfish/storeUtils'
// Store-related.
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/cases/components/CaseDetail/CardAnnotations.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script setup lang="ts">
import { useVariantFlagsStore } from '@/variants/stores/variantFlags'
import { useVariantCommentsStore } from '@/variants/stores/variantComments'
import { useVariantAcmgRatingStore } from '@/variants/stores/variantAcmgRating'
import { useSvFlagsStore } from '@/svs/stores/strucvarFlags'
import { computed } from 'vue'
import CaseDetailsFlagIcon from '@/cases/components/CaseDetail/FlagIcon.vue'
import { useSvFlagsStore } from '@/svs/stores/strucvarFlags'
import { useVariantAcmgRatingStore } from '@/variants/stores/variantAcmgRating'
import { useVariantCommentsStore } from '@/variants/stores/variantComments'
import { useVariantFlagsStore } from '@/variants/stores/variantFlags'
// Store-related.
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/cases/components/CaseDetail/CardCase.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup>
import { computed, reactive } from 'vue'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { CaseStates } from '@/cases/stores/caseList'
import {
displayName,
formatLargeInt,
formatTime,
formatTimeAgo,
formatLargeInt,
} from '@/varfish/helpers'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
const emit = defineEmits(['editCaseStatusClick', 'editCaseNotesClick'])
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/cases/components/CaseDetail/CardPedigree.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup>
import FilterFormGenotypePaneAffected from '@/variants/components/FilterForm/GenotypePaneAffected.vue'
import FilterFormGenotypePaneSex from '@/variants/components/FilterForm/GenotypePaneSex.vue'
import { displayName } from '@/varfish/helpers'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { useCaseListStore } from '@/cases/stores/caseList'
import { displayName } from '@/varfish/helpers'
import FilterFormGenotypePaneAffected from '@/variants/components/FilterForm/GenotypePaneAffected.vue'
import FilterFormGenotypePaneSex from '@/variants/components/FilterForm/GenotypePaneSex.vue'
/** Define emits. */
const emit = defineEmits(['editPedigreeClick'])
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/cases/components/CaseDetail/CardQueries.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<script setup>
import { onMounted, ref, watch } from 'vue'
import { useCaseListStore } from '@/cases/stores/caseList'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { useCaseListStore } from '@/cases/stores/caseList'
import { QueryPresetsClient } from '@/variants/api/queryPresetsClient'
/** Define emits. */
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/cases/components/CaseDetail/CardTerms.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup>
import { VigunoClient } from '@bihealth/reev-frontend-lib/api/viguno/client'
import { computed, onMounted, reactive, ref, watch } from 'vue'
import { displayName } from '@/varfish/helpers'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { useCaseListStore } from '@/cases/stores/caseList'
import { VigunoClient } from '@bihealth/reev-frontend-lib/api/viguno/client'
import { displayName } from '@/varfish/helpers'
const emit = defineEmits(['updateCasePhenotypeTermsClick'])
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/cases/components/CaseDetail/CardVariantQc.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import { State } from '@/varfish/storeUtils'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { displayName, formatLargeInt } from '@/varfish/helpers'
import { State } from '@/varfish/storeUtils'
const caseDetailsStore = useCaseDetailsStore()
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/cases/components/CaseDetail/Content.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup>
import PaneAnnotations from '@/cases/components/CaseDetail/PaneAnnotations.vue'
import PaneCase from '@/cases/components/CaseDetail/PaneCase.vue'
import PaneQc from '@/cases_qc/components/PaneQc.vue'
import LegacyPaneQc from '@/cases/components/CaseDetail/PaneQc.vue'
import PaneAnnotations from '@/cases/components/CaseDetail/PaneAnnotations.vue'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import PaneQc from '@/cases_qc/components/PaneQc.vue'
import { useCaseQcStore } from '@/cases_qc/stores/caseQc'
const props = defineProps({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup>
import { useRouter } from 'vue-router'
import FilterResultsTable from '@/variants/components/FilterResultsTable.vue'
import SvFilterResultsTable from '@/svs/components/SvFilterResultsTable.vue'
import FilterResultsTable from '@/variants/components/FilterResultsTable.vue'
const router = useRouter()
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/cases/components/CaseDetail/PaneCase.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script setup>
import CaseDetailCardAlignmentQc from '@/cases/components/CaseDetail/CardAlignmentQc.vue'
import CaseDetailCardCaseAnnotations from '@/cases/components/CaseDetail/CardAnnotations.vue'
import CaseDetailCardCaseComments from '@/cases/components/CaseDetail/CardComments.vue'
import CaseDetailCardCase from '@/cases/components/CaseDetail/CardCase.vue'
import CaseDetailCardCaseComments from '@/cases/components/CaseDetail/CardComments.vue'
import CaseDetailCardGeneAnnotations from '@/cases/components/CaseDetail/CardGeneAnnotations.vue'
import CaseDetailCardPedigree from '@/cases/components/CaseDetail/CardPedigree.vue'
import CaseDetailCardQueries from '@/cases/components/CaseDetail/CardQueries.vue'
import CaseDetailCardSvInfo from '@/cases/components/CaseDetail/CardSvInfo.vue'
import CaseDetailCardTerms from '@/cases/components/CaseDetail/CardTerms.vue'
import CaseDetailCardVariantQc from '@/cases/components/CaseDetail/CardVariantQc.vue'
import CaseDetailCardVariantsInfo from '@/cases/components/CaseDetail/CardVariantInfo.vue'
import CaseDetailCardQueries from '@/cases/components/CaseDetail/CardQueries.vue'
import CaseDetailCardVariantQc from '@/cases/components/CaseDetail/CardVariantQc.vue'
/** Define emits. */
const emit = defineEmits([
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/cases/components/CaseDetail/PaneQc.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<script setup>
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { useCaseListStore } from '@/cases/stores/caseList'
import { computed, reactive } from 'vue'
import QcPlotRelatedness from '@/cases/components/CaseDetail/QcPlotRelatedness.vue'
import QcPlotDepthHet from '@/cases/components/CaseDetail/QcPlotDepthHet.vue'
import { downloadPerSampleMetrics, downloadRelatedness } from '@/cases/common'
import QcPlotChrXRatio from '@/cases/components/CaseDetail/QcPlotChrXRatio.vue'
import QcPlotVarType from '@/cases/components/CaseDetail/QcPlotVarType.vue'
import QcPlotVarEffect from '@/cases/components/CaseDetail/QcPlotVarEffect.vue'
import QcPlotDepthHet from '@/cases/components/CaseDetail/QcPlotDepthHet.vue'
import QcPlotIndelSize from '@/cases/components/CaseDetail/QcPlotIndelSize.vue'
import QcTableVarStats from '@/cases/components/CaseDetail/QcTableVarStats.vue'
import QcPlotRelatedness from '@/cases/components/CaseDetail/QcPlotRelatedness.vue'
import QcPlotVarEffect from '@/cases/components/CaseDetail/QcPlotVarEffect.vue'
import QcPlotVarType from '@/cases/components/CaseDetail/QcPlotVarType.vue'
import QcTableAlignmentStats from '@/cases/components/CaseDetail/QcTableAlignmentStats.vue'
import QcTableVarStats from '@/cases/components/CaseDetail/QcTableVarStats.vue'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { useCaseListStore } from '@/cases/stores/caseList'
import { displayName, quantiles } from '@/varfish/helpers'
import { downloadPerSampleMetrics, downloadRelatedness } from '@/cases/common'
const caseListStore = useCaseListStore()
const caseDetailsStore = useCaseDetailsStore()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script setup>
import { State } from '@/varfish/storeUtils'
import { computed } from 'vue'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { displayName, formatLargeInt } from '@/varfish/helpers'
import { computed } from 'vue'
import { State } from '@/varfish/storeUtils'
const caseDetailsStore = useCaseDetailsStore()
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/cases/components/CaseDetail/QcTableVarStats.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import { displayName, formatLargeInt } from '@/varfish/helpers'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { tsTvRatio } from '@/cases/common'
import { useCaseDetailsStore } from '@/cases/stores/caseDetails'
import { displayName, formatLargeInt } from '@/varfish/helpers'
const props = defineProps({
// eslint-disable-next-line vue/require-default-prop
Expand Down
Loading

0 comments on commit b0f6fc6

Please sign in to comment.