Skip to content

Commit

Permalink
chore: enable lint-staged & register pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Nov 12, 2024
1 parent 90f7131 commit 1602b63
Show file tree
Hide file tree
Showing 14 changed files with 740 additions and 27 deletions.
9 changes: 9 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh
#
# Copyright (c) 2023.
# Author Peter Placzek (tada5hi)
# For the full copyright and license information,
# view the LICENSE file that was distributed with this source code.
#

npx lint-staged
730 changes: 714 additions & 16 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"husky": "^9.1.4",
"jest": "^29.7.0",
"jest-serial-runner": "^1.2.0",
"lint-staged": "^15.2.10",
"nx": "^20.0.7",
"rimraf": "^6.0.1",
"rollup": "^4.24.0",
Expand All @@ -44,5 +45,10 @@
"server-api": "npm run dev --workspace=packages/server-api",
"server-realtime": "npm run dev --workspace=packages/server-realtime",
"server-train-manager": "npm run dev --workspace=packages/server-train-manager"
},
"lint-staged": {
"*.vue": "npm run lint:fix",
"*.js": "npm run lint:fix",
"*.ts": "npm run lint:fix"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { BTable } from 'bootstrap-vue-next';
import type { IdentityProvider } from '@authup/core-kit';
import { PermissionName, isRealmResourceWritable } from '@authup/core-kit';
import {
AEntityDelete, AIdentityProviders, APagination, ASearch, ATitle, usePermissionCheck, injectStore,
AEntityDelete, AIdentityProviders, APagination, ASearch, ATitle, injectStore, usePermissionCheck,
} from '@authup/client-web-kit';
import { storeToRefs } from 'pinia';
import type { BuildInput } from 'rapiq';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/nodes/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default defineComponent({
<template>
<div>
<h1 class="title no-border mb-3">
<i class="fa-solid fa-server"></i> {{ entity.name }} <span class="sub-title">Details</span>
<i class="fa-solid fa-server" /> {{ entity.name }} <span class="sub-title">Details</span>
</h1>

<div class="m-b-20 m-t-10">
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/nodes/index/index.vue
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 { usePermissionCheck, injectStore } from '@authup/client-web-kit';
import { injectStore, usePermissionCheck } from '@authup/client-web-kit';
import { PermissionName } from '@privateaim/kit';
import { VCTimeago } from '@vuecs/timeago';
import type { Node } from '@privateaim/core-kit';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/permissions/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { VCTimeago } from '@vuecs/timeago';
import { BTable } from 'bootstrap-vue-next';
import {
AEntityDelete, APagination, APermissions, ASearch, ATitle, usePermissionCheck, injectStore,
AEntityDelete, APagination, APermissions, ASearch, ATitle, injectStore, usePermissionCheck,
} from '@authup/client-web-kit';
import type { Permission } from '@authup/core-kit';
import { PermissionName, isRealmResourceWritable } from '@authup/core-kit';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/realms/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { BTable } from 'bootstrap-vue-next';
import type { Realm } from '@authup/core-kit';
import { PermissionName, isRealmResourceWritable } from '@authup/core-kit';
import {
AEntityDelete, APagination, ARealms, ASearch, ATitle, usePermissionCheck, injectStore,
AEntityDelete, APagination, ARealms, ASearch, ATitle, injectStore, usePermissionCheck,
} from '@authup/client-web-kit';
import { storeToRefs } from 'pinia';
import { defineNuxtComponent } from '#imports';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/robots/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { BTable } from 'bootstrap-vue-next';
import type { Robot } from '@authup/core-kit';
import { PermissionName, isRealmResourceWritable } from '@authup/core-kit';
import {
AEntityDelete, APagination, ARobots, ASearch, ATitle, usePermissionCheck, injectStore,
AEntityDelete, APagination, ARobots, ASearch, ATitle, injectStore, usePermissionCheck,
} from '@authup/client-web-kit';
import { storeToRefs } from 'pinia';
import type { BuildInput } from 'rapiq';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/roles/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { BTable } from 'bootstrap-vue-next';
import type { Role } from '@authup/core-kit';
import { PermissionName, isRealmResourceWritable } from '@authup/core-kit';
import {
AEntityDelete, APagination, ARoles, ASearch, ATitle, usePermissionCheck, injectStore,
AEntityDelete, APagination, ARoles, ASearch, ATitle, injectStore, usePermissionCheck,
} from '@authup/client-web-kit';
import { storeToRefs } from 'pinia';
import type { BuildInput } from 'rapiq';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/admin/users/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
PermissionName, isRealmResourceWritable,
} from '@authup/core-kit';
import {
AEntityDelete, AUsers, usePermissionCheck, injectStore,
AEntityDelete, AUsers, injectStore, usePermissionCheck,
} from '@authup/client-web-kit';
import { storeToRefs } from 'pinia';
import type { BuildInput } from 'rapiq';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/analyses/index/in.vue
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 { usePermissionCheck, injectStore } from '@authup/client-web-kit';
import { injectStore, usePermissionCheck } from '@authup/client-web-kit';
import { PermissionName } from '@privateaim/kit';
import { VCTimeago } from '@vuecs/timeago';
import type { AnalysisNode } from '@privateaim/core-kit';
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/projects/[id].vue
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 { usePermissionCheck, injectStore } from '@authup/client-web-kit';
import { injectStore, usePermissionCheck } from '@authup/client-web-kit';
import type {
Project,
ProjectNode,
Expand Down
2 changes: 1 addition & 1 deletion packages/client-ui/pages/projects/index/in.vue
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 { usePermissionCheck, injectStore } from '@authup/client-web-kit';
import { injectStore, usePermissionCheck } from '@authup/client-web-kit';
import { PermissionName } from '@privateaim/kit';
import type { ProjectNode } from '@privateaim/core-kit';
import { storeToRefs } from 'pinia';
Expand Down

0 comments on commit 1602b63

Please sign in to comment.