From a488b879f55aec1078f76988d5f460188d48ce3f Mon Sep 17 00:00:00 2001 From: "Haytham A. Salama" Date: Fri, 11 Aug 2023 22:59:10 +0300 Subject: [PATCH] chore: add eslint rules for spacing (#526) --- .eslintrc.cjs | 2 ++ docs/components/content/examples/TableExampleAdvanced.vue | 2 +- docs/components/content/examples/TabsExampleItemCustomSlot.vue | 2 +- docs/components/content/examples/TabsExampleItemSlot.vue | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index b9874762..69c6549f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -14,6 +14,7 @@ module.exports = { 'key-spacing': ['error', { beforeColon: false, afterColon: true, mode: 'strict' }], 'space-before-blocks': ['error', 'always'], 'space-infix-ops': ['error', { int32Hint: false }], + 'no-multi-spaces': ['error', { ignoreEOLComments: true }], // Typescript '@typescript-eslint/type-annotation-spacing': 'error', @@ -21,6 +22,7 @@ module.exports = { // Vuejs 'vue/multi-word-component-names': 0, 'vue/html-indent': ['error', 2], + 'vue/comma-spacing': ['error', { before: false, after: true }], 'vue/script-indent': ['error', 2, { baseIndent: 0 }], 'vue/keyword-spacing': ['error', { before: true, after: true }], 'vue/object-curly-spacing': ['error', 'always'], diff --git a/docs/components/content/examples/TableExampleAdvanced.vue b/docs/components/content/examples/TableExampleAdvanced.vue index 40510a0a..cd854d31 100644 --- a/docs/components/content/examples/TableExampleAdvanced.vue +++ b/docs/components/content/examples/TableExampleAdvanced.vue @@ -78,7 +78,7 @@ const resetFilters = () => { // Pagination const page = ref(1) -const pageCount = ref(10) +const pageCount = ref(10) const pageTotal = ref(200) // This value should be dynamic coming from the API const pageFrom = computed(() => (page.value - 1) * pageCount.value + 1) const pageTo = computed(() => Math.min(page.value * pageCount.value, pageTotal.value)) diff --git a/docs/components/content/examples/TabsExampleItemCustomSlot.vue b/docs/components/content/examples/TabsExampleItemCustomSlot.vue index ef8143fa..9bbf88a1 100644 --- a/docs/components/content/examples/TabsExampleItemCustomSlot.vue +++ b/docs/components/content/examples/TabsExampleItemCustomSlot.vue @@ -7,7 +7,7 @@ const items = [{ label: 'Password' }] -const accountForm = reactive({ name: 'Benjamin', username: 'benjamincanac' }) +const accountForm = reactive({ name: 'Benjamin', username: 'benjamincanac' }) const passwordForm = reactive({ currentPassword: '', newPassword: '' }) function onSubmitAccount () { diff --git a/docs/components/content/examples/TabsExampleItemSlot.vue b/docs/components/content/examples/TabsExampleItemSlot.vue index 20141c1d..fe85f9e2 100644 --- a/docs/components/content/examples/TabsExampleItemSlot.vue +++ b/docs/components/content/examples/TabsExampleItemSlot.vue @@ -9,7 +9,7 @@ const items = [{ description: 'Change your password here. After saving, you\'ll be logged out.' }] -const accountForm = reactive({ name: 'Benjamin', username: 'benjamincanac' }) +const accountForm = reactive({ name: 'Benjamin', username: 'benjamincanac' }) const passwordForm = reactive({ currentPassword: '', newPassword: '' }) function onSubmit (form) {