From cf75a89979022d1f30666613d1a324e9a8da189a Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Mon, 9 Dec 2024 12:44:42 -0800 Subject: [PATCH] Update all linting for latest version of kolibri-format. --- .eslintrc.js | 27 +- .prettierrc.js | 2 +- docs/assets/definitions.scss | 3 +- docs/common/DocsAnchorTarget.vue | 6 +- docs/common/DocsColorBlock.vue | 15 +- docs/common/DocsDoNot.vue | 18 +- docs/common/DocsExternalLink.vue | 11 +- docs/common/DocsGithubLink.vue | 10 +- docs/common/DocsPageSection.vue | 10 +- docs/common/DocsPageTemplate/BranchLink.vue | 9 +- docs/common/DocsPageTemplate/Header.vue | 28 +- .../DocsPageTemplate/SideNav/NavLink.vue | 4 +- .../common/DocsPageTemplate/SideNav/index.vue | 9 +- docs/common/DocsPageTemplate/index.vue | 9 +- .../DocsPageTemplate/jsdocs/EventsTable.vue | 14 +- .../DocsPageTemplate/jsdocs/MethodsTable.vue | 14 +- .../DocsPageTemplate/jsdocs/PropsTable.vue | 18 +- .../DocsPageTemplate/jsdocs/SlotsTable.vue | 14 +- docs/common/DocsShow.vue | 5 +- docs/common/DocsShowCode/index.vue | 5 +- docs/common/DocsShowCode/webpack-loader.js | 9 +- docs/common/DocsToggleButton.vue | 6 +- docs/pages-components/DocsKCard.vue | 86 +++- docs/pages/accessibility.vue | 90 +++- docs/pages/appbars/index.vue | 126 +++-- docs/pages/buttons.vue | 238 +++++++--- docs/pages/colors.vue | 372 ++++++++++----- docs/pages/errors/index.vue | 234 ++++++---- docs/pages/filters/index.vue | 160 ++++--- docs/pages/glossary/index.vue | 52 ++- docs/pages/icons/IconBlock.vue | 5 +- docs/pages/icons/IconTable.vue | 30 +- docs/pages/icons/index.vue | 175 +++++-- docs/pages/index.vue | 110 ++++- docs/pages/installation.vue | 66 ++- docs/pages/kbreadcrumbs.vue | 42 +- docs/pages/kbutton.vue | 71 ++- docs/pages/kbuttongroup.vue | 29 +- docs/pages/kcard.vue | 429 +++++++++++++----- docs/pages/kcardgrid.vue | 427 +++++++++++++---- docs/pages/kcheckbox.vue | 77 +++- docs/pages/kcircularloader.vue | 47 +- docs/pages/kdaterange.vue | 18 +- docs/pages/kdropdownmenu.vue | 55 +-- docs/pages/kemptyplaceholder.vue | 66 ++- docs/pages/kexternallink.vue | 65 ++- docs/pages/kfixedgrid.vue | 11 +- docs/pages/kfixedgriditem.vue | 12 +- docs/pages/kfocustrap.vue | 17 +- docs/pages/kgrid.vue | 21 +- docs/pages/kgriditem.vue | 22 +- docs/pages/kicon.vue | 14 +- docs/pages/kiconbutton.vue | 71 ++- docs/pages/kimg.vue | 165 +++++-- docs/pages/klinearloader.vue | 47 +- docs/pages/klistwithoverflow.vue | 79 ++-- docs/pages/klogo.vue | 100 ++-- docs/pages/kmodal.vue | 11 +- docs/pages/koptionaltext.vue | 82 ++-- docs/pages/koverlay.vue | 39 +- docs/pages/kradiobutton.vue | 74 ++- docs/pages/kradiobuttongroup.vue | 10 +- docs/pages/krouterlink.vue | 75 ++- docs/pages/kselect.vue | 65 ++- docs/pages/kswitch.vue | 57 ++- docs/pages/ktable.vue | 88 +++- docs/pages/ktabs.vue | 136 ++++-- docs/pages/ktabslist.vue | 188 +++++--- docs/pages/ktabspanel.vue | 28 +- docs/pages/ktextbox.vue | 79 +++- docs/pages/ktexttruncator.vue | 16 +- docs/pages/ktransition.vue | 64 ++- docs/pages/layout/index.vue | 294 ++++++++---- docs/pages/loaders/index.vue | 75 +-- docs/pages/menus/index.vue | 104 +++-- docs/pages/modals/index.vue | 196 ++++---- docs/pages/pageheader/index.vue | 87 ++-- docs/pages/playground/cards.vue | 79 +++- docs/pages/playground/index.vue | 1 - docs/pages/principles.vue | 69 ++- docs/pages/release-process.vue | 196 +++++--- docs/pages/snackbars.vue | 59 ++- docs/pages/styling/index.vue | 190 +++++--- docs/pages/tabs.vue | 31 +- docs/pages/textfields/index.vue | 172 ++++--- docs/pages/usekliveregion.vue | 117 ++++- docs/pages/usekresponsiveelement.vue | 29 +- docs/pages/usekresponsivewindow.vue | 95 +++- docs/pages/usekshow.vue | 100 ++-- docs/pages/writing.vue | 87 +++- jest.conf/index.js | 6 +- jest.conf/setup.js | 6 +- lib/KBreadcrumbs.vue | 38 +- lib/KCheckbox.vue | 13 +- lib/KDateRange/KDateCalendar.vue | 191 ++++++-- lib/KDateRange/KDateDay.vue | 46 +- lib/KDateRange/KDateInput.vue | 12 +- lib/KDateRange/ValidationMachine.js | 6 +- .../__tests__/ValidationMachine.spec.js | 8 +- lib/KDateRange/index.vue | 10 +- lib/KDropdownMenu.vue | 24 +- lib/KFocusTrap.vue | 6 +- lib/KIcon/iconDefinitions.js | 10 +- lib/KIcon/index.vue | 2 +- lib/KImg/__tests__/KImg.spec.js | 2 +- lib/KImg/index.vue | 8 +- lib/KLabeledIcon.vue | 35 +- lib/KListWithOverflow.vue | 17 +- lib/KLogo/index.vue | 160 +++++-- lib/KModal.vue | 46 +- lib/KOptionalText.vue | 8 +- lib/KOverlay/index.vue | 1 - lib/KRadioButton.vue | 21 +- lib/KRadioButtonGroup.vue | 10 +- lib/KSelect/KSelectOption.vue | 45 +- lib/KSelect/index.vue | 114 +++-- lib/KSwitch.vue | 15 +- lib/KTable/KTableGridItem.vue | 13 +- lib/KTable/index.vue | 202 ++++++--- lib/KTable/useSorting/__tests__/index.spec.js | 14 +- lib/KTable/useSorting/index.js | 10 +- lib/KThemePlugin.js | 5 +- lib/KToolbar.vue | 29 +- lib/KTooltip/Popper.vue | 65 ++- lib/KTooltip/index.vue | 11 +- lib/__tests__/KModal.spec.js | 4 +- lib/__tests__/KRadioButtonGroup.spec.js | 6 +- lib/__tests__/KTable.spec.js | 11 +- lib/buttons-and-links/KButton.vue | 7 +- lib/buttons-and-links/KButtonGroup.vue | 4 +- lib/buttons-and-links/KExternalLink.vue | 14 +- lib/buttons-and-links/KIconButton.vue | 10 +- lib/buttons-and-links/KRouterLink.vue | 10 +- lib/buttons-and-links/buttonMixin.js | 5 +- lib/buttons-and-links/buttons.scss | 7 +- lib/cards/KCard.vue | 26 +- lib/cards/KCardGrid.vue | 28 +- lib/cards/SkeletonCard.vue | 11 +- lib/cards/__tests__/KCard.spec.js | 2 +- lib/cards/useGridLoading.js | 4 +- lib/cards/utils.js | 2 +- lib/composables/_useOverlay/index.js | 3 +- lib/composables/useKLiveRegion/index.js | 1 + lib/grids/KFixedGrid.vue | 7 +- lib/grids/KFixedGridItem.vue | 8 +- lib/grids/KGridItem.vue | 5 +- lib/grids/Overlay.vue | 9 +- lib/grids/extra-units.css | 37 -- lib/grids/test/KFixedGrid.spec.js | 6 +- lib/grids/test/KFixedGridItem.spec.js | 10 +- lib/grids/test/KGridItem.spec.js | 12 +- lib/loaders/KCircularLoader.vue | 29 +- lib/loaders/KLinearLoader.vue | 11 +- lib/styles/darkenColors.js | 12 +- lib/styles/definitions.scss | 12 +- lib/styles/theme.js | 2 +- lib/styles/trackInputModality.js | 12 +- lib/tabs/KTabs.vue | 24 +- lib/tabs/KTabsList.vue | 4 +- lib/tabs/KTabsPanel.vue | 5 +- lib/tabs/__tests__/KTabsList.spec.js | 12 +- lib/tabs/__tests__/KTabsPanel.spec.js | 4 +- lib/utils/focusManagement.js | 2 +- nuxt.config.js | 3 +- utils/extractApi.js | 2 +- utils/extractEnvironment.js | 2 +- utils/extractRstIcons.js | 10 +- 167 files changed, 5799 insertions(+), 2673 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ddcf841b4..4595554bd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,18 +1,23 @@ const esLintConfig = require('kolibri-format/.eslintrc'); -// Vuetify's helper attributes use hyphens and they would -// not be recognized if auto-formatted to camel case -esLintConfig.rules['vue/attribute-hyphenation'] = 0; - -// This rule conflicts with Nuxt page naming -esLintConfig.rules['kolibri/vue-filename-and-component-name-match'] = 0; +const nuxtDocsRules = { + // Vuetify's helper attributes use hyphens and they would + // not be recognized if auto-formatted to camel case + 'vue/attribute-hyphenation': 0, + // This rule conflicts with Nuxt page naming + 'vue/no-reserved-component-names': 0, + // This rule conflicts with Nuxt page naming + 'kolibri/vue-filename-and-component-name-match': 0, + // max-len rules are unhelpful for documentation + 'max-len': 0, + 'vue/max-len': 0, +}; -// This rule is currently disabled in kolibri-format/.eslintrc -esLintConfig.rules['vue/require-default-prop'] = 1; +esLintConfig.overrides.push({ + files: ['docs/**/*.vue'], + rules: nuxtDocsRules, +}); -// max-len rules are unhelpful for documentation -esLintConfig.rules['max-len'] = 0; -esLintConfig.rules['vue/max-len'] = 0; // Allow nuxt resources to be found esLintConfig.settings['import/resolver'].nuxt = { diff --git a/.prettierrc.js b/.prettierrc.js index 68851adda..aa0587e6a 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1 +1 @@ -module.exports = require('kolibri-tools/.prettierrc'); +module.exports = require('kolibri-format/.prettierrc'); diff --git a/docs/assets/definitions.scss b/docs/assets/definitions.scss index d5b47a33d..189800664 100644 --- a/docs/assets/definitions.scss +++ b/docs/assets/definitions.scss @@ -4,5 +4,6 @@ $code-color: #696680; $link-color: #368d74; $link-hover-color: #26614d; $selection-color: #badbd2; -$basic-transition: color 0.25s ease, fill 0.25s ease; +$basic-transition: color 0.25s ease, + fill 0.25s ease; $nav-width: 260px; diff --git a/docs/common/DocsAnchorTarget.vue b/docs/common/DocsAnchorTarget.vue index bfd7fbbb6..59a4e2d6a 100644 --- a/docs/common/DocsAnchorTarget.vue +++ b/docs/common/DocsAnchorTarget.vue @@ -14,7 +14,11 @@ /> - # + # diff --git a/docs/common/DocsColorBlock.vue b/docs/common/DocsColorBlock.vue index 86fdf3840..71d0db1b9 100644 --- a/docs/common/DocsColorBlock.vue +++ b/docs/common/DocsColorBlock.vue @@ -1,9 +1,15 @@