Skip to content

Commit 38932b7

Browse files
committed
fixup! feat: Vue
1 parent 5917e15 commit 38932b7

3 files changed

Lines changed: 25 additions & 19 deletions

File tree

eslint.config.mjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,29 @@ import { recommended } from '@nextcloud/eslint-config'
77

88
export default [
99
...recommended,
10+
{
11+
rules: {
12+
'no-console': 'error',
13+
'no-unused-vars': 'warn',
14+
15+
// 'jsdoc/no-undefined-types': 'error',
16+
'jsdoc/require-jsdoc': 'off',
17+
// 'jsdoc/require-param': 'off',
18+
19+
'vue/multi-word-component-names': 'off',
20+
21+
// 'sort-imports': ['error', { ignoreDeclarationSort: true }],
22+
// 'import/order': ['error', { groups: ['builtin', 'external', 'internal'], alphabetize: { order: 'asc', caseInsensitive: true } }],
23+
24+
// // Relax some rules for now. Can be improved later one (baseline).
25+
//
26+
// // JSDocs are welcome but lint:fix should not create empty ones
27+
// 'jsdoc/require-jsdoc': 'off',
28+
// 'jsdoc/require-param': 'off',
29+
// Forbid empty JSDocs
30+
// TODO: Enable this rule once @nextcloud/eslint-config was updated and pulls the
31+
// newest version of eslint-plugin-jsdoc (is a recent feature/rule).
32+
// 'jsdoc/no-blank-blocks': 'error',
33+
},
34+
},
1035
]

src/composables/useLiveData.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ export interface ThermalZone {
1313
temp: number
1414
}
1515

16-
/**
17-
* Live, fast-changing metrics polled from the /update endpoint. The shape mirrors
18-
* the backend LiveData payload one-to-one. Memory values are in MB.
19-
*/
2016
export interface LiveData {
2117
cpu: { load: number[] | false }
2218
memory: { total: number, free: number, swap_total: number, swap_free: number }
@@ -25,20 +21,13 @@ export interface LiveData {
2521
thermalzones: ThermalZone[]
2622
}
2723

28-
/**
29-
*
30-
*/
3124
export function useLiveData() {
3225
const data = ref<LiveData | null>(null)
33-
/** Increments on every successful poll — a reliable "new sample" tick for charts. */
3426
const tick = ref(0)
3527

3628
let timeoutId: ReturnType<typeof setTimeout> | null = null
3729
let stopped = false
3830

39-
/**
40-
*
41-
*/
4231
async function poll() {
4332
try {
4433
const response = await axios.get(generateUrl('/apps/serverinfo/update'))

src/composables/useStaticData.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,11 @@ export interface StaticData {
5252
phpinfoUrl: string
5353
}
5454

55-
/**
56-
* Fetches the one-time snapshot of static/slow-changing server data.
57-
* Replaces the previous `loadState` initial-state blob so the page can paint
58-
* immediately and hydrate via XHR.
59-
*/
6055
export function useStaticData() {
6156
const data = ref<StaticData | null>(null)
6257
const loading = ref(true)
6358
const error = ref(false)
6459

65-
/**
66-
*
67-
*/
6860
async function load() {
6961
try {
7062
const response = await axios.get(generateUrl('/apps/serverinfo/data'))

0 commit comments

Comments
 (0)