From 675e1bbd5145c54da5fea1329abc09cd4327ad22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20K=C3=B6nig?= Date: Wed, 6 Nov 2024 14:24:20 +0100 Subject: [PATCH] linting --- eslint.config.mjs | 2 ++ src/components/rest/RestQueryExamples.vue | 4 ++-- src/components/setup/ClusterForm.vue | 4 ++-- src/components/shared/IndexFilter/IndexPattern.vue | 4 ++-- src/components/shared/IndexFilter/IndexSelect.vue | 4 ++-- src/components/shared/ModalLoader.vue | 4 ++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9c662be9..41cf23d5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -17,6 +17,8 @@ export default [ ...vueI18n.configs['flat/recommended'], { rules: { + 'semi': ['error', 'never'], + 'vue/script-indent': ['error', 2, { 'baseIndent': 1 }], 'vue/max-attributes-per-line': 'off', 'vue/first-attribute-linebreak': 'off', 'vue/html-closing-bracket-newline': 'off', diff --git a/src/components/rest/RestQueryExamples.vue b/src/components/rest/RestQueryExamples.vue index 3177f343..cbc7230f 100644 --- a/src/components/rest/RestQueryExamples.vue +++ b/src/components/rest/RestQueryExamples.vue @@ -107,8 +107,8 @@ return REST_QUERY_EXAMPLES.filter(example => { return example.method.includes(filterValue) || - example.path.includes(filterValue) || - example.description.includes(filterValue) + example.path.includes(filterValue) || + example.description.includes(filterValue) }) }) diff --git a/src/components/setup/ClusterForm.vue b/src/components/setup/ClusterForm.vue index 56ab25ff..cdfce587 100644 --- a/src/components/setup/ClusterForm.vue +++ b/src/components/setup/ClusterForm.vue @@ -49,8 +49,8 @@ if (!formValid.value) return connect().then(idx => props.connectCallback(idx)) - .catch(() => { - }) + .catch(() => { + }) } const emit = defineEmits(['update:modelValue']) watch(cluster, value => emit('update:modelValue', value)) diff --git a/src/components/shared/IndexFilter/IndexPattern.vue b/src/components/shared/IndexFilter/IndexPattern.vue index 5fce2f79..744e3028 100644 --- a/src/components/shared/IndexFilter/IndexPattern.vue +++ b/src/components/shared/IndexFilter/IndexPattern.vue @@ -39,8 +39,8 @@ const { requestState, callElasticsearch } = useElasticsearchAdapter() const load = () => { return callElasticsearch('catIndices', { index: localValue.value, h: 'index' }) - .then(body => (indices.value = body)) - .catch(() => (indices.value = [])) + .then(body => (indices.value = body)) + .catch(() => (indices.value = [])) } onMounted(load) diff --git a/src/components/shared/IndexFilter/IndexSelect.vue b/src/components/shared/IndexFilter/IndexSelect.vue index ee1f69b9..40ada1ac 100644 --- a/src/components/shared/IndexFilter/IndexSelect.vue +++ b/src/components/shared/IndexFilter/IndexSelect.vue @@ -68,8 +68,8 @@ if (props.behavior === 'load') { const load = () => { return callElasticsearch(props.method, props.methodParams) - .then(body => indices.value = body.map((i: EsIndex) => (i.index || i)).sort()) - .catch(() => (indices.value = [])) + .then(body => indices.value = body.map((i: EsIndex) => (i.index || i)).sort()) + .catch(() => (indices.value = [])) } onMounted(load) } diff --git a/src/components/shared/ModalLoader.vue b/src/components/shared/ModalLoader.vue index b475c446..25f613e8 100644 --- a/src/components/shared/ModalLoader.vue +++ b/src/components/shared/ModalLoader.vue @@ -54,8 +54,8 @@ const data = ref('') const load = () => { callElasticsearch(store.method, store.methodParams) - .then(body => (data.value = stringifyJson(body))) - .catch(() => (data.value = '')) + .then(body => (data.value = stringifyJson(body))) + .catch(() => (data.value = '')) } const ownValue = ref(false)