Client - minor refacto w/ import order rules

This commit is contained in:
Sam
2021-08-21 18:34:06 +02:00
parent 064a7f66c8
commit f60847cc5f
15 changed files with 259 additions and 32 deletions

View File

@ -1,7 +1,7 @@
import { createStore } from 'vuex'
import { IRootState } from '@/store/modules/root/interfaces'
import root from '@/store/modules/root'
import { IRootState } from '@/store/modules/root/interfaces'
const store = createStore<IRootState>(root)

View File

@ -1,8 +1,8 @@
import { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import { ROOT_STORE } from '@/store/constants'
import { IRootActions, IRootState } from '@/store/modules/root/interfaces'
import authApi from '@/api/authApi'
import { handleError } from '@/utils'
export const actions: ActionTree<IRootState, IRootState> & IRootActions = {

View File

@ -1,6 +1,7 @@
import { ROOT_STORE } from '@/store/constants'
import { ActionContext } from 'vuex'
import { ROOT_STORE } from '@/store/constants'
export interface IAppStatistics {
sports: number
uploads_dir_size: number

View File

@ -1,5 +1,4 @@
import { IRootState } from '@/store/modules/root/interfaces'
import { IApplication } from '@/store/modules/root/interfaces'
import { IRootState, IApplication } from '@/store/modules/root/interfaces'
export const state: IRootState = {
root: true,

View File

@ -1,5 +1,8 @@
import { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import api from '@/api/defaultApi'
import router from '@/router'
import { ROOT_STORE, USER_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/interfaces'
import {
@ -8,9 +11,6 @@ import {
IUserState,
} from '@/store/modules/user/interfaces'
import { handleError } from '@/utils'
import authApi from '@/api/authApi'
import api from '@/api/defaultApi'
import router from '@/router'
export const actions: ActionTree<IUserState, IRootState> & IUserActions = {
[USER_STORE.ACTIONS.CHECK_AUTH_USER](

View File

@ -4,8 +4,8 @@ import { IRootState } from '@/store/modules/root/interfaces'
import { actions } from '@/store/modules/user/actions'
import { getters } from '@/store/modules/user/getters'
import { IUserState } from '@/store/modules/user/interfaces'
import { userState } from '@/store/modules/user/state.ts'
import { mutations } from '@/store/modules/user/mutations'
import { userState } from '@/store/modules/user/state.ts'
const user: Module<IUserState, IRootState> = {
state: userState,