Skip to content

Commit

Permalink
Fix frontend eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rwood-moz committed Jan 28, 2025
1 parent 615df35 commit d045b9a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 20 deletions.
1 change: 1 addition & 0 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module.exports = {
caughtErrorsIgnorePattern: '^_',
},
],
'object-curly-newline': 'off',
},
settings: {
'import/resolver': {
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const call = createFetch({
beforeFetch({ options }) {
if (user?.authenticated) {
const token = user.data.accessToken;
// @ts-ignore
// @ts-expect-error ignore headers type error
options.headers.Authorization = `Bearer ${token}`;
}
return { options };
Expand Down Expand Up @@ -205,10 +205,13 @@ onMounted(async () => {
// Hack to clear $set_once until we get confirmation that this can be filtered.
// Move the function reference so we can patch it and still retrieve the results before we sanitize it.
/* eslint no-underscore-dangle: ["error", { "allow": ["_calculate_set_once_properties"] }] */
if (posthog['_original_calculate_set_once_properties'] === undefined) {
posthog['_original_calculate_set_once_properties'] = posthog._calculate_set_once_properties;
}
posthog._calculate_set_once_properties = function (dataSetOnce?) {
posthog._calculate_set_once_properties = function patch(dataSetOnce?) {
dataSetOnce = posthog['_original_calculate_set_once_properties'](dataSetOnce);
if (dataSetOnce?.$initial_current_url || dataSetOnce?.$initial_pathname) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/CalendarQalendar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import {
ref, computed, inject, toRefs, watch, onMounted
ref, computed, inject, toRefs, watch
} from 'vue';
import { Qalendar } from 'qalendar';
import 'qalendar/dist/style.css';
Expand Down
16 changes: 3 additions & 13 deletions frontend/src/components/UserInviteTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,17 @@
import {
computed, inject, onMounted, ref,
} from 'vue';
import { useI18n } from 'vue-i18n';
import {
AlertSchemes, TableDataButtonType, TableDataType, InviteStatus,
AlertSchemes, TableDataType, InviteStatus,
} from '@/definitions';
import { useRouter } from 'vue-router';
import { IconSend } from '@tabler/icons-vue';
import {
Invite, InviteListResponse, BooleanResponse, Exception, TableDataRow, TableDataColumn, TableFilter,
Invite, InviteListResponse, TableDataRow, TableDataColumn,
} from '@/models';
import { dayjsKey, callKey } from '@/keys';
import { callKey } from '@/keys';
import DataTable from '@/components/DataTable.vue';
import LoadingSpinner from '@/elements/LoadingSpinner.vue';
import PrimaryButton from '@/elements/PrimaryButton.vue';
import AlertBox from '@/elements/AlertBox.vue';
import AdminNav from '@/elements/admin/AdminNav.vue';
const router = useRouter();
const { t } = useI18n();
const call = inject(callKey);
const dj = inject(dayjsKey);
const invites = ref<Invite[]>([]);
const loading = ref(true);
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/DocsView.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<script setup lang="ts">
import {
computed, onMounted, ref,
onMounted, ref,
} from 'vue';
import { useRoute } from 'vue-router';
/* eslint import/no-unresolved: [2, { ignore: ['\\.html'] }] */
import usingZoom from '@/assets/docs/en/using-zoom.html?raw';
const route = useRoute();
const pageContents = ref('');
onMounted(async () => {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/LegalView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
computed, onMounted, ref,
} from 'vue';
import { useRoute } from 'vue-router';
/* eslint import/no-unresolved: [2, { ignore: ['\\.html'] }] */
import privacy from '@/assets/legal/en/privacy.html?raw';
import terms from '@/assets/legal/en/terms.html?raw';
Expand Down

0 comments on commit d045b9a

Please sign in to comment.