Skip to content

Commit d574234

Browse files
Antreesybackportbot[bot]
authored andcommitted
chore(eslint): function indent rules
- @stylistic/indent - @stylistic/indent-binary-ops - @stylistic/object-curly-spacing Signed-off-by: Maksim Sukharev <[email protected]>
1 parent 8b1677b commit d574234

File tree

8 files changed

+27
-30
lines changed

8 files changed

+27
-30
lines changed

eslint.config.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default [
1212
rules: {
1313
'@nextcloud/vue/no-deprecated-exports': 'off',
1414
'@nextcloud/vue/no-deprecated-props': 'off',
15-
'@stylistic/indent': 'off',
16-
'@stylistic/indent-binary-ops': 'off',
1715
'@stylistic/member-delimiter-style': 'off',
18-
'@stylistic/object-curly-spacing': 'off',
1916
'@typescript-eslint/no-unsafe-function-type': 'off',
2017
'@typescript-eslint/no-unused-vars': 'off',
2118
'@typescript-eslint/no-use-before-define': 'off',

src/components/LogDetailsModal.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ const index = computed(() => props.logEntries.findIndex((entry) => entry === pro
104104
/**
105105
* Formatted data of the entry
106106
*/
107-
const code = computed(() => hljs.highlight(JSON.stringify(props.currentEntry, null, 2), { language: 'json' })
108-
.value)
107+
const code = computed(() => hljs.highlight(JSON.stringify(props.currentEntry, null, 2), { language: 'json' }).value)
109108
110109
/**
111110
* Level as translated human readable string

src/components/exception/TraceLine.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ const functionText = computed(() => `${props.line.class}${props.line.type}${prop
3434
* The arguments of the function
3535
*/
3636
const argumentText = computed(() => (props.line.args || []).length === 0
37-
? '()'
38-
: (
37+
? '()'
38+
: (
3939
'(\n'
4040
+ (props.line.args || [])
4141
// stringify the arguments and add indention
4242
.map((argument) => JSON.stringify(argument, undefined, 2).split('\n').map((code) => ` ${code}`).join('\n'))
4343
.join(',\n')
44-
+ '\n)'
44+
+ '\n)'
4545
))
4646
</script>
4747

src/components/settings/SettingsDatetimeFormat.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const dateTimeFormat = computed(() => settingsStore.dateTimeFormat)
7979
* @param v - How the log time should be displayed ('local' | 'raw' | 'utc' | 'relative')
8080
*/
8181
function setDateTimeFormat(v: IAppSettings['dateTimeFormat']) {
82-
return settingsStore
82+
return settingsStore
8383
.setSetting('dateTimeFormat', v)
8484
.catch((e) => {
8585
logger.debug(e)

src/components/settings/SettingsLiveView.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ const settingsStore = useSettingsStore()
2929
const liveLog = computed({
3030
get: () => settingsStore.enabled ? settingsStore.liveLog : false,
3131
set: (v: boolean) => settingsStore
32-
.setSetting('liveLog', v)
33-
.catch((e) => {
34-
logger.debug(e)
35-
showError(t('logreader', 'Could not change live view setting.'))
36-
}),
32+
.setSetting('liveLog', v)
33+
.catch((e) => {
34+
logger.debug(e)
35+
showError(t('logreader', 'Could not change live view setting.'))
36+
}),
3737
})
3838
</script>

src/components/table/LogTableHeader.vue

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,18 @@ const sortIcon = computed(() => {
8888
*/
8989
function changeSortMode() {
9090
switch (props.sorted) {
91-
case 'ascending': {
92-
emit('update:sorted', 'descending')
93-
break
94-
}
95-
case 'descending': {
96-
emit('update:sorted', '')
97-
break
98-
}
99-
case '': {
100-
emit('update:sorted', 'ascending')
101-
break
102-
}
91+
case 'ascending': {
92+
emit('update:sorted', 'descending')
93+
break
94+
}
95+
case 'descending': {
96+
emit('update:sorted', '')
97+
break
98+
}
99+
case '': {
100+
emit('update:sorted', 'ascending')
101+
break
102+
}
103103
}
104104
}
105105

src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55

66
import { translate, translatePlural } from '@nextcloud/l10n'
77
import {
8-
type Pinia,
8+
type Pinia,
99

10-
createPinia, PiniaVuePlugin,
10+
createPinia,
11+
PiniaVuePlugin,
1112
} from 'pinia'
1213
import Vue from 'vue'
1314
import App from './App.vue'
@@ -22,7 +23,7 @@ const pinia = createPinia()
2223
// ComponentOptions is declared in types/options.d.ts
2324
declare module 'vue/types/options.d.ts' {
2425
interface ComponentOptions<V extends Vue> {
25-
pinia?: Pinia
26+
pinia?: Pinia
2627
}
2728
}
2829

src/store/logging.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('store:logging', () => {
106106
pollLog: mocks.pollLog,
107107
}
108108
})
109-
vi.mocked(mocks.getLog).mockImplementation(async ({ query }: { query: string}) => {
109+
vi.mocked(mocks.getLog).mockImplementation(async ({ query }: { query: string }) => {
110110
await (new Promise((resolve) => setTimeout(resolve, 50)))
111111
// Fake an axios response
112112
return {

0 commit comments

Comments
 (0)