Skip to content

Commit

Permalink
style: fix some linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Feb 12, 2024
1 parent bf95ef3 commit f1223c0
Show file tree
Hide file tree
Showing 78 changed files with 104 additions and 134 deletions.
4 changes: 2 additions & 2 deletions packages/client-ui/pages/admin/permissions/index/add.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import { APermissionForm } from '@authup/client-vue';
import type { Permission } from '@authup/core';
import { PermissionName, isRealmResourceWritable } from '@authup/core';
import { PermissionName } from '@authup/core';
import { storeToRefs } from 'pinia';
import { defineNuxtComponent, navigateTo } from '#app';
import { definePageMeta, resolveComponent } from '#imports';
import { definePageMeta } from '#imports';
import { LayoutKey, LayoutNavigationID } from '../../../../config/layout';
import { useAuthStore } from '../../../../store/auth';
Expand Down
3 changes: 0 additions & 3 deletions packages/client-ui/pages/admin/robots/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
import { storeToRefs } from 'pinia';
import type { BuildInput } from 'rapiq';
import { defineNuxtComponent } from '#app';
import { resolveComponent } from '#imports';
import { useAuthStore } from '../../../../store/auth';
export default defineNuxtComponent({
Expand All @@ -23,8 +22,6 @@ export default defineNuxtComponent({
},
emits: ['deleted'],
setup(props, { emit }) {
const list = resolveComponent('RobotList');
const handleDeleted = (e: Robot) => {
emit('deleted', e);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/services/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineNuxtComponent({
const items = [
{
id: ServiceID.SYSTEM, name: 'System', icon: 'fa-solid fa-atom', version: 'v1.0.0-alpha.0',
}
},
];

const thirdPartyItems = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import type { Registry } from '@privateaim/core';
import type { PropType } from 'vue';
import { RegistryCleanup } from '@privateaim/client-vue';
import { useToast } from '#imports';
import { defineNuxtComponent } from '#imports';
import { defineNuxtComponent, useToast } from '#imports';

export default defineNuxtComponent({
components: { RegistryCleanup },
Expand All @@ -20,7 +19,7 @@ export default defineNuxtComponent({
required: true,
},
},
async setup(props) {
async setup() {
const toast = useToast();

const handleExecuted = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- view the LICENSE file that was distributed with this source code.
-->
<script lang="ts">
import type { Registry, RegistryProject } from '@privateaim/core';
import type { Registry } from '@privateaim/core';
import { PermissionID } from '@privateaim/core';
import type { PropType } from 'vue';
import { RegistryProjectForm } from '@privateaim/client-vue';
Expand All @@ -32,7 +32,7 @@ export default defineNuxtComponent({

const toast = useToast();

const handleCreated = (e: RegistryProject) => {
const handleCreated = () => {
toast.show({ variant: 'success', body: 'The project was successfully created.' });
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineNuxtComponent({
required: true,
},
},
async setup(props) {
async setup() {
const toast = useToast();
const handleExecuted = () => {
if (toast) {
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/stations/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default defineNuxtComponent({
await navigateTo(`/admin/stations/${e.id}`);
};

const handleDeleted = (e: Node) => {
const handleDeleted = () => {
toast.show({ variant: 'success', body: 'The station was successfully deleted.' });
};

Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/proposals/index/in.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default defineNuxtComponent({
modalNode.value = false;
};

const handleFailed = (e: Error) => {
const handleFailed = () => {
// todo: handle error
};

Expand Down
1 change: 0 additions & 1 deletion packages/client-ui/plugins/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import { SocketManager } from '@privateaim/client-vue';
import type { Pinia } from 'pinia';
import { ref } from 'vue';
import { useRuntimeConfig } from '#imports';
import { useAuthStore } from '../store/auth';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
PropType,
} from 'vue';

import type { MasterImage, Project, Node } from '@privateaim/core';
import type { MasterImage, Node, Project } from '@privateaim/core';
import { DomainType, ProposalRisk } from '@privateaim/core';
import { useUpdatedAt } from '../../composables';
import type { ListProps } from '../../core';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-vue/src/components/station/StationForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* view the LICENSE file that was distributed with this source code.
*/
import { ARealms } from '@authup/client-vue';
import type { Registry, Node } from '@privateaim/core';
import type { Node, Registry } from '@privateaim/core';
import {
DomainType,
alphaNumHyphenUnderscoreRegex, hexToUTF8, isHex,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import type { PropType } from 'vue';
import { defineComponent, h } from 'vue';
import type { RegistryProject, Node } from '@privateaim/core';
import type { Node, RegistryProject } from '@privateaim/core';
import RegistryProjectDetails from '../registry-project/RegistryProjectEntity';

export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
import { PermissionID, AnalysisNodeApprovalCommand, AnalysisNodeApprovalStatus } from '@privateaim/core';
import { AnalysisNodeApprovalCommand, AnalysisNodeApprovalStatus, PermissionID } from '@privateaim/core';
import type { PropType } from 'vue';
import { computed, defineComponent, ref } from 'vue';
import type { ActionCommandProperties } from '../../core';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* view the LICENSE file that was distributed with this source code.
*/

import { AnalysisBuildStatus, AnalysisRunStatus, AnalysisNodeStatic } from '@privateaim/core';
import { AnalysisBuildStatus, AnalysisNodeStatic, AnalysisRunStatus } from '@privateaim/core';
import type { PropType } from 'vue';
import { computed, defineComponent, h } from 'vue';
import { hasNormalizedSlot, normalizeSlot } from '../../core';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import type { Analysis, AnalysisNode } from '@privateaim/core';
import {
AnalysisBuildStatus,
AnalysisRunStatus,
AnalysisNodeRunStatus,
AnalysisNodeStatic,
AnalysisRunStatus,
} from '@privateaim/core';
import type { BuildInput } from 'rapiq';
import type { PropType } from 'vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
view the LICENSE file that was distributed with this source code.
-->
<script lang="ts">
import type { Project, Analysis } from '@privateaim/core';
import type { Analysis, Project } from '@privateaim/core';
import { DomainType, TrainType } from '@privateaim/core';
import { maxLength, minLength, required } from '@vuelidate/validators';
import type { BuildInput } from 'rapiq';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* view the LICENSE file that was distributed with this source code.
*/

import type { MasterImage, AnalysisFile } from '@privateaim/core';
import type { AnalysisFile, MasterImage } from '@privateaim/core';
import {
computed, defineComponent, h, ref, toRefs, watch,
} from 'vue';
Expand Down
7 changes: 3 additions & 4 deletions packages/client-vue/src/components/train/TrainPipeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
<script lang="ts">
import type { Analysis } from '@privateaim/core';
import {
AnalysisAPICommand,
AnalysisBuildStatus, AnalysisConfigurationStatus,
AnalysisResultStatus, AnalysisRunStatus,
PermissionID,
AnalysisAPICommand, AnalysisBuildStatus,
AnalysisConfigurationStatus, AnalysisResultStatus,
AnalysisRunStatus,
} from '@privateaim/core';
import type { PropType } from 'vue';
import { computed, defineComponent } from 'vue';
import { VCLink } from '@vuecs/link';
import { injectAuthupStore } from '../../core';
import Dropdown from '../Dropdown';
import TrainResultCommand from './command/TrainResultCommand';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { computed, defineComponent, ref } from 'vue';
import type { PropType } from 'vue';
import type { Analysis } from '@privateaim/core';
import {
PermissionID,
AnalysisAPICommand,
AnalysisBuildStatus,
AnalysisConfigurationStatus,
PermissionID,
} from '@privateaim/core';
import {
injectAPIClient, injectAuthupStore, renderActionCommand, wrapFnWithBusyState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { computed, defineComponent, ref } from 'vue';
import type { PropType } from 'vue';
import type { Analysis } from '@privateaim/core';
import {
PermissionID,
AnalysisAPICommand,
AnalysisResultStatus,
AnalysisRunStatus,
PermissionID,
} from '@privateaim/core';
import {
injectAPIClient, injectAuthupStore, renderActionCommand, wrapFnWithBusyState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
import type { PropType } from 'vue';
import type { Analysis } from '@privateaim/core';
import {
PermissionID,
AnalysisAPICommand,
AnalysisBuildStatus,
AnalysisRunStatus,
PermissionID,
} from '@privateaim/core';
import type { TrainCommandProperties } from './type';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
view the LICENSE file that was distributed with this source code.
-->
<script lang="ts">
import type { MasterImage, Analysis, AnalysisNode } from '@privateaim/core';
import type { Analysis, AnalysisNode, MasterImage } from '@privateaim/core';
import type { PropType } from 'vue';
import {
defineComponent, ref,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/domains/analysis-node/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ export type TrainStationEventContext = DomainEventBaseContext & {
export type AnalyseNodeSocketEventData = Record<string, { online: boolean, realmId: string }>;
export type AnalyseNodeSocketCTSEvents = {
analysisNodes: (id: Analysis['id'], cb?: (err: null | Error, data: AnalyseNodeSocketEventData) => void) => void
}
};
2 changes: 1 addition & 1 deletion packages/core/src/domains/analysis/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ export enum AnalysisAPICommand {
// -------------------------------------------------------------------------

export enum AnalysisContainerPath {
MAIN = '/opt/'
MAIN = '/opt/',
}
2 changes: 0 additions & 2 deletions packages/core/src/domains/analysis/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import type {
AnalysisResultStatus,
AnalysisRunStatus,
} from './constants';
import type { Node } from '../node';
import type { Registry } from '../registry';
import type { RegistryProject } from '../registry-project';

export interface Analysis {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/domains/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export enum DomainType {
ANALYSIS = 'analysis',
ANALYSIS_FILE = 'analysisFile',
ANALYSIS_LOG = 'analysisLog',
ANALYSIS_NODE = 'analysisNode'
ANALYSIS_NODE = 'analysisNode',
}

export enum DomainSubType {
Expand Down
5 changes: 2 additions & 3 deletions packages/core/src/domains/node/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export enum NodeType {
AGGREGATOR = 'aggregator',
DEFAULT = 'default',
Expand All @@ -7,11 +6,11 @@ export enum NodeType {
export enum NodeSocketClientEventName {
CONNECT = 'nodeConnect',
DISCONNECT = 'nodeDisconnect',
MESSAGE = 'nodeMessage'
MESSAGE = 'nodeMessage',
}

export enum NodeSocketServerEventName {
CONNECTED = 'nodeConnected',
DISCONNECTED = 'nodeDisconnected',
MESSAGE = 'nodeMessage'
MESSAGE = 'nodeMessage',
}
1 change: 0 additions & 1 deletion packages/core/src/domains/service/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { BaseAPI } from '../base';
import type { RegistryAPICommand } from './registry';
import { ServiceID } from './constants';
import type { SingleResourceResponse } from '../types-base';
import type { SecretStorageAPICommand } from './secret-engine';
import type { Registry } from '../registry';
import type { RegistryProject } from '../registry-project';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '../../../core';
import { BuilderCommand } from '../constants';
import { BuilderError } from '../error';
import { useBuilderLogger } from '../utils'
import { useBuilderLogger } from '../utils';
import type { ContainerPackContext } from './type';

export async function packContainerWithTrain(container: Container, context: ContainerPackContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import type {
Analysis, AnalysisNode, Node
Analysis,
} from '@privateaim/core';
import type { BuilderCommand, BuilderEvent } from './constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { getMinioBucketObjectList, useMinio } from '../../../../core';
import type { CoreDestroyPayload } from '../../type';
import {buildMinioBucketName} from '../utils';
import { buildMinioBucketName } from '../utils';

export async function executeCoreDestroyCommand(
payload: CoreDestroyPayload,
Expand Down
2 changes: 1 addition & 1 deletion packages/server-analysis-manager/src/components/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* view the LICENSE file that was distributed with this source code.
*/

import type { Registry, RegistryProject, Analysis } from '@privateaim/core';
import type { Analysis, Registry, RegistryProject } from '@privateaim/core';

export type ComponentPayloadExtended<T extends Record<string, any>> = T & {
entity: Analysis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { hasOwnProperty } from '@privateaim/core';
import type {
APIClient, Registry, Analysis,
APIClient, Analysis, Registry,
} from '@privateaim/core';
import { isClientErrorWithStatusCode, useClient } from 'hapic';
import { BaseError } from '../error';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export async function buildDockerImage(
entry.end();

const options : ImageBuildOptions = {
t: context.imageName
t: context.imageName,
};
if(context.authConfig) {
if (context.authConfig) {
options.authconfig = context.authConfig;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DomainType } from '@authup/core';
import type { DomainsEventContext } from '@authup/core';
import { isBoolFalse, isBoolTrue } from '@privateaim/core';
import { createClient } from 'redis-extension';
import {ConfigDefaults, useEnv, useLogger} from '../../config';
import { ConfigDefaults, useEnv, useLogger } from '../../config';
import type { Aggregator } from '../type';
import {
handleAuthupRealmEvent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import {
} from '@privateaim/core';
import { useDataSource } from 'typeorm-extension';
import type { AnalysisLogSaveContext } from '../../../domains';
import { saveAnalysisLog } from '../../../domains';
import { AnalysisEntity } from '../../../domains';
import { AnalysisEntity, saveAnalysisLog } from '../../../domains';

export async function handleTrainManagerBuilderEvent(
context: BuilderEventContext | ComponentContextWithError<BuilderEventContext>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class MigrationGenerateCommand implements CommandModule {

describe = 'Generate database migrations.';

async handler(_args: any) {
async handler() {
createConfig();

const connections : DataSourceOptions[] = [
Expand Down
Loading

0 comments on commit f1223c0

Please sign in to comment.