Skip to content

Commit

Permalink
chore(deps): upgrade dependencies and exec linter
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisMazel committed Sep 24, 2024
1 parent 293f281 commit 8943150
Show file tree
Hide file tree
Showing 172 changed files with 3,469 additions and 2,849 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
]
},
"devDependencies": {
"@antfu/eslint-config": "^3.0.0",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@commitlint/cz-commitlint": "^19.4.0",
"@types/node": "^22.5.2",
"changelogen": "^0.5.5",
"@antfu/eslint-config": "^3.7.1",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@commitlint/cz-commitlint": "^19.5.0",
"@types/node": "^22.6.1",
"changelogen": "^0.5.7",
"commitizen": "^4.3.0",
"cross-env": "^7.0.3",
"eslint": "9.9.1",
"eslint": "9.11.1",
"eslint-plugin-sonarjs": "^1.0.4",
"eslint-plugin-tailwindcss": "^3.17.4",
"husky": "^9.1.5",
"husky": "^9.1.6",
"lerna": "^8.1.8",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"ts-node": "11.0.0-beta.1",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"repository": {
"type": "git",
Expand Down
9 changes: 5 additions & 4 deletions packages/cli/config/component-template.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/** @type {import('vue-docgen-cli').Templates['component']} */

export function component(renderedUsage, document_, _config, _fileName, requiresMd, _subs) {
const { description, tags, functional } = document_
const { deprecated, author, since, version, see, link } = tags || {}

const hasEvents = !!renderedUsage.events
const hasSlots = !!renderedUsage.slots

const andChar = hasSlots || hasEvents ? ' & ' : ''

return `
${!hasEvents && !hasSlots ? '## Component informations' : '## Props'}${hasEvents && hasSlots ? ', ' : hasSlots || hasEvents ? ' & ' : ''
} ${hasEvents ? 'Event' : ''} ${hasEvents && hasSlots ? '& ' : ''}${hasSlots ? 'Slots' : ''}
${!hasEvents && !hasSlots ? '## Component informations' : '## Props'}${hasEvents && hasSlots ? ', ' : andChar
} ${hasEvents ? 'Event' : ''} ${hasEvents && hasSlots ? '& ' : ''}${hasSlots ? 'Slots' : ''}
${deprecated ? `> **Deprecated** ${deprecated[0].title}\n` : ''}
${description ? `> ${description}` : ''}
Expand All @@ -28,6 +29,6 @@ export function component(renderedUsage, document_, _config, _fileName, requires
${requiresMd.length > 0
? `---\n${requiresMd.map(component => component.content).join('\n---\n')}`
: ''
}
}
`
}
4 changes: 2 additions & 2 deletions packages/cli/docgen.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-check

import { fileURLToPath } from 'node:url'

import { join, resolve } from 'node:path'

import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vue-docgen-cli'
import { component } from './config/component-template.js'

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { createRequire } from 'node:module'
import chalk from 'chalk'

import { Command } from 'commander'
import { clearAndPrintBanner } from './utils/print-banner'
import { createFilesCommand } from './commands/create-files'
import { generateComponentsDocumentationCommand } from './commands/generate-components-docs'
import { logger } from './utils/logger'
import { clearAndPrintBanner } from './utils/print-banner'

const name = 'cli'
const program = new Command()
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/commands/create-files/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { resolve } from 'node:path'
import { exit } from 'node:process'
import { fileURLToPath } from 'node:url'
import { cancel, confirm, isCancel, multiselect, spinner, text } from '@clack/prompts'
import chalk from 'chalk'
import { Command } from 'commander'
import { cancel, confirm, isCancel, multiselect, spinner, text } from '@clack/prompts'
import { buildEntry } from '../../../../lib/build/entry-builder'
import { pascalCaseToKebabCase } from './../../utils/pascal-case-to-kebab-case'
import { createDocumentFile } from './create-documentation-file'
import { createLibraryTestFile } from './create-library-test-file'
import { createLibraryComponentFile } from './create-library-component-file'
import { pascalCaseToKebabCase } from './../../utils/pascal-case-to-kebab-case'
import { createLibraryTestFile } from './create-library-test-file'

const _dirname = fileURLToPath(new URL('.', import.meta.url))

Expand Down
10 changes: 5 additions & 5 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
"devDependencies": {
"@types/postcss-import": "^14.0.3",
"@types/postcss-url": "^10.0.4",
"@types/react": "^18.3.5",
"@vercel/og": "^0.6.2",
"@types/react": "^18.3.9",
"@vercel/og": "^0.6.3",
"postcss-import": "^16.1.0",
"postcss-url": "^10.1.3",
"react": "^18.3.1",
"tailwindcss": "^3.4.10",
"tailwindcss": "^3.4.13",
"vitepress": "1.3.4",
"vue": "^3.4.38"
"vue": "^3.5.8"
},
"dependencies": {
"chart.js": "^4.4.4",
"chartjs-plugin-datalabels": "^2.2.0",
"dayjs": "^1.11.13",
"dropzone": "^5.9.3",
"libphonenumber-js": "^1.11.7",
"libphonenumber-js": "^1.11.9",
"maz-ui": "workspace:*",
"vitepress-plugin-google-analytics": "^1.0.2"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/build/compile-scss.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { resolve } from 'node:path'
import { existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import postcss from 'postcss'
import autoprefixer from 'autoprefixer'
import postcss from 'postcss'
import { compileAsync } from 'sass'
import { logger } from './utils/logger'

Expand Down
20 changes: 10 additions & 10 deletions packages/lib/build/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { resolve } from 'node:path'
import { readdir, rename } from 'node:fs/promises'
import { cpSync } from 'node:fs'
import { readdir, rename } from 'node:fs/promises'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import minimist from 'minimist'
import { type InlineConfig, build } from 'vite'
import Vue from '@vitejs/plugin-vue'
import svgLoader from 'vite-svg-loader'
import { type Target, viteStaticCopy } from 'vite-plugin-static-copy'
import minimist from 'minimist'
import { replaceInFile } from 'replace-in-file'
import { build, type InlineConfig } from 'vite'
import { libInjectCss } from 'vite-plugin-lib-inject-css'
import { logger } from './utils/logger'
import { execPromise } from './utils/exec-promise'
import { generateComponentsEntryFile } from './generate-components-entry'
import { generateLibComponentsEntryFile } from './generate-lib-entry'
import { type Target, viteStaticCopy } from 'vite-plugin-static-copy'
import svgLoader from 'vite-svg-loader'
import { compileScss } from './compile-scss'
import { copyAndTransformComponentsTypesFiles } from './copy-components-types'
import { generateComponentsEntryFile } from './generate-components-entry'
import { generateLibComponentsEntryFile } from './generate-lib-entry'
import { getComponentList } from './get-component-list'
import { execPromise } from './utils/exec-promise'
import { logger } from './utils/logger'

const _dirname = fileURLToPath(new URL('.', import.meta.url))

Expand Down
6 changes: 3 additions & 3 deletions packages/lib/components/MazAccordion.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts" setup>
import { computed, ref, useSlots } from 'vue'
import MazExpandAnimation from './MazExpandAnimation.vue'
import MazCardSpotlight from './MazCardSpotlight.vue'
import Plus from './../icons/plus.svg'
import { useInstanceUniqId } from './../modules/composables/useInstanceUniqId'
import MazCardSpotlight from './MazCardSpotlight.vue'
import MazExpandAnimation from './MazExpandAnimation.vue'
export interface Props {
id?: string
modelValue?: number
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/components/MazAvatar.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { computed, defineAsyncComponent } from 'vue'
import type { Color } from './types'
import { computed, defineAsyncComponent } from 'vue'
export type { Color }
const props = withDefaults(defineProps<Props>(), {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/components/MazBottomSheet.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { defineAsyncComponent } from 'vue'
import MazBackdrop from './MazBackdrop.vue'
import XIcon from './../icons/x-mark.svg'
import MazBackdrop from './MazBackdrop.vue'
defineProps({
noClose: { type: Boolean, default: false },
Expand Down
10 changes: 5 additions & 5 deletions packages/lib/components/MazBtn.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<script lang="ts" setup>
import type { Color, Size } from './types'
import {
type Component,
type ComponentPublicInstance,
type FunctionalComponent,
type HTMLAttributes,
type SVGAttributes,
computed,
defineAsyncComponent,
type FunctionalComponent,
type HTMLAttributes,
onBeforeMount,
type SVGAttributes,
useAttrs,
useSlots,
} from 'vue'
import type { Color, Size } from './types'
export type { Color, Size }
const props = withDefaults(defineProps<Props>(), {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/components/MazCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { type HTMLAttributes, computed, defineAsyncComponent, ref, useSlots, watch } from 'vue'
import type { RouterLinkProps } from 'vue-router'
import type { MazGalleryImage } from './types'
import { computed, defineAsyncComponent, type HTMLAttributes, ref, useSlots, watch } from 'vue'
export type { MazGalleryImage } from './types'
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/components/MazCardSpotlight.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { type HTMLAttributes, type StyleValue, computed, onMounted, onUnmounted, ref } from 'vue'
import type { Color } from './types'
import { computed, type HTMLAttributes, onMounted, onUnmounted, ref, type StyleValue } from 'vue'
export type { Color }
Expand Down
6 changes: 3 additions & 3 deletions packages/lib/components/MazChart.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts" setup>
import { type PropType, defineAsyncComponent } from 'vue'
import {
ArcElement,
BarElement,
Expand All @@ -8,15 +7,16 @@ import {
type ChartData,
type ChartType,
Legend,
LineElement,
LinearScale,
LineElement,
PointElement,
Title,
Tooltip,
type UpdateMode,
} from 'chart.js'
import { defineAsyncComponent, type PropType } from 'vue'
export type { ChartType, ChartData, UpdateMode }
export type { ChartData, ChartType, UpdateMode }
const props = defineProps({
/**
Expand Down
8 changes: 4 additions & 4 deletions packages/lib/components/MazCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ export type { Color, Size } from './types'

<script lang="ts" setup generic="T extends boolean | (string | number)[]">
/* eslint-disable import/first */
import { type HTMLAttributes, computed, ref } from 'vue'
import { useInstanceUniqId } from '../modules/composables/useInstanceUniqId'
import type { Color, Size } from './types'
import { computed, type HTMLAttributes, ref } from 'vue'
import { useInstanceUniqId } from '../modules/composables/useInstanceUniqId'
import CheckIcon from './../icons/check.svg'
export interface Props<T = boolean | (string | number)[]> {
Expand Down Expand Up @@ -172,8 +172,8 @@ function getNewValue(value: boolean | string | number) {
if (
typeof value === 'boolean'
&& (typeof props.modelValue === 'boolean'
|| props.modelValue === undefined
|| props.modelValue === null)
|| props.modelValue === undefined
|| props.modelValue === null)
) {
return !props.modelValue
}
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/components/MazCircularProgressBar.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { type SVGAttributes, computed, useSlots } from 'vue'
import type { Color } from './types'
import { computed, type SVGAttributes, useSlots } from 'vue'
import { useInstanceUniqId } from '../modules/composables/useInstanceUniqId'
import MazAnimatedCounter from './MazAnimatedCounter.vue'
import type { Color } from './types'
const props = withDefaults(
defineProps<{
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/components/MazDialog.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
import {
type HTMLAttributes,
type StyleValue,
computed,
defineAsyncComponent,
type HTMLAttributes,
type StyleValue,
useAttrs,
} from 'vue'
import MazBackdrop, { type Props as MazBackdropProps } from './MazBackdrop.vue'
Expand Down
10 changes: 5 additions & 5 deletions packages/lib/components/MazDialogPromise.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<script lang="ts">
/* eslint-disable import/first */
export {
useMazDialogPromise,
type DialogState,
type DialogData,
type DialogState,
useMazDialogPromise,
} from './MazDialogPromise/use-maz-dialog-promise'
export type { Color, Size } from './types'
</script>

<script lang="ts" setup>
import { computed, defineAsyncComponent } from 'vue'
import MazDialog, { type Props as MazDialogProps } from './MazDialog.vue'
import {
defaultData,
type DialogCustomButton,
type DialogData,
type DialogState,
defaultData,
useMazDialogPromise,
} from './MazDialogPromise/use-maz-dialog-promise'
import MazDialog, { type Props as MazDialogProps } from './MazDialog.vue'
export interface InternalProps extends MazDialogProps {
/** Dialog Data - @type DialogData */
data?: DialogData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ref } from 'vue'
import type { Color, Size } from './../types'
import { ref } from 'vue'

export interface DialogState {
id: string
Expand Down
8 changes: 4 additions & 4 deletions packages/lib/components/MazDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts" setup>
import { type HTMLAttributes, defineAsyncComponent, ref, watch } from 'vue'
import type { RouteLocationRaw } from 'vue-router'
import type { Color } from './MazBtn.vue'
import type { Position } from './types'
import { defineAsyncComponent, type HTMLAttributes, ref, watch } from 'vue'
import { useInstanceUniqId } from '../modules/composables/useInstanceUniqId'
import { debounce } from '../modules/helpers/debounce'
import { vClickOutside } from '../modules/directives/click-outside'
import type { Position } from './types'
import type { Color } from './MazBtn.vue'
import { debounce } from '../modules/helpers/debounce'
defineOptions({
inheritAttrs: false,
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/components/MazDropzone.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script lang="ts">
import type { DropzoneFile, DropzoneOptions } from 'dropzone'
import {
type ComponentPublicInstance,
type PropType,
computed,
defineAsyncComponent,
defineComponent,
onBeforeUnmount,
onMounted,
type PropType,
ref,
} from 'vue'
import type { DropzoneFile, DropzoneOptions } from 'dropzone'
function dropzoneFix<T>(component: T): T {
return (component as any).default ?? component
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/components/MazFullscreenLoader.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { defineAsyncComponent, onMounted, onUnmounted } from 'vue'
import type { Color } from './types'
import { defineAsyncComponent, onMounted, onUnmounted } from 'vue'
withDefaults(defineProps<Props>(), { color: 'primary', size: '3em' })
Expand Down
Loading

0 comments on commit 8943150

Please sign in to comment.