Fix linter error

Linter did not like await in global scope besides it being fully
functional, so I've created a `src/jquery.js` file which sets jquery
globals and then we can safely import `src/semantic.js`.
This commit is contained in:
Kasper Seweryn 2022-02-22 00:00:17 +01:00
parent 5f319db268
commit 17006094b6
No known key found for this signature in database
GPG Key ID: B2BA6FA597595C00
2 changed files with 4 additions and 5 deletions

2
front/src/jquery.js vendored Normal file
View File

@ -0,0 +1,2 @@
import jQuery from 'jquery'
window.$ = window.jQuery = jQuery

View File

@ -19,17 +19,14 @@ import filters from '@/filters' // eslint-disable-line
import { parseAPIErrors } from '@/utils'
import globals from '@/components/globals' // eslint-disable-line
import './registerServiceWorker'
import '@/jquery'
import '@/semantic'
logger.default.info('Loading environment:', import.meta.env.NODE_ENV)
logger.default.debug('Environment variables:', import.meta.env)
sync(store, router)
window.$ = window.jQuery = jQuery
// NOTE: We cannot use normal import statements after doing some stuff, so we'll just await a dynamic import
await import('./semantic.js')
let APP = null
const availableLanguages = (function () {