Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Aug 2, 2023
1 parent d0d7836 commit fa67d73
Show file tree
Hide file tree
Showing 76 changed files with 242 additions and 214 deletions.
12 changes: 6 additions & 6 deletions packages/anu-vue/src/components/alert/AAlert.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<script lang="ts" setup>
import type { AAlertEvents, aAlertSlots } from './meta'
import { aAlertProps } from './meta'
import { AIcon } from 'anu-vue/components'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { useLayer } from 'anu-vue/composables/useLayer'
import type { AAlertEvents, aAlertSlots } from './meta'
import { aAlertProps } from './meta'
defineOptions({
name: 'AAlert',
})
// SECTION Meta
const _props = defineProps(aAlertProps)
const emit = defineEmits<AAlertEvents>()
defineOptions({
name: 'AAlert',
})
defineSlots<typeof aAlertSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/alert/meta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ExtractPublicPropTypes } from 'vue'
import { aLayerProps } from 'anu-vue/composables/useLayer'
import { configurable } from 'anu-vue/composables/useProps'
import type { ExtractPublicPropTypes } from 'vue'

// ℹ️ Make sure to checkout prop definition rules

Expand Down
4 changes: 2 additions & 2 deletions packages/anu-vue/src/components/avatar/AAvatar.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts" setup>
import { useLayer } from 'anu-vue/composables/useLayer'
import { toRef } from 'vue'
import type { aAvatarSlots } from './meta'
import { aAvatarProps } from './meta'
import { useLayer } from 'anu-vue/composables/useLayer'
const props = defineProps(aAvatarProps)
defineOptions({
name: 'AAvatar',
})
const props = defineProps(aAvatarProps)
defineSlots<typeof aAvatarSlots>()
const { getLayerClasses } = useLayer()
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/avatar/meta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ExtractPublicPropTypes } from 'vue'
import { aLayerProps } from 'anu-vue/composables/useLayer'
import { configurable } from 'anu-vue/composables/useProps'
import type { ExtractPublicPropTypes } from 'vue'

// ℹ️ Make sure to checkout prop definition rules

Expand Down
9 changes: 5 additions & 4 deletions packages/anu-vue/src/components/badge/ABadge.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<script lang="ts" setup>
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { isNumeric } from 'anu-vue/utils/helpers'
import type { aBadgeSlots } from './meta'
import { aBadgeDefaultOffset, aBadgeDefaultOverlapOffset, aBadgeProps } from './meta'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { isNumeric } from 'anu-vue/utils/helpers'
// SECTION Meta
const _props = defineProps(aBadgeProps)
defineOptions({
name: 'ABadge',
inheritAttrs: false,
})
// SECTION Meta
const _props = defineProps(aBadgeProps)
defineSlots<typeof aBadgeSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/badge/meta.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { color as colorProp } from 'anu-vue/composables/useProps'
import type { ExtractPublicPropTypes } from 'vue'
import { color as colorProp } from 'anu-vue/composables/useProps'

export type AVerticalAnchor = 'top' | 'bottom'
export type AHorizontalAnchor = 'left' | 'right'
Expand Down
12 changes: 6 additions & 6 deletions packages/anu-vue/src/components/base-input/ABaseInput.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<script lang="ts" setup>
import type { ABaseInputEvents, aBaseInputSlots } from './meta'
import { aBaseInputProps } from './meta'
import { ALoader } from 'anu-vue/components/loader'
import { useConfigurable } from 'anu-vue/composables/useConfigurable'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import TransitionExpand from 'anu-vue/transitions/TransitionExpand.vue'
import type { ABaseInputEvents, aBaseInputSlots } from './meta'
import { aBaseInputProps } from './meta'
defineOptions({
name: 'ABaseInput',
})
// SECTION Meta
Expand All @@ -17,6 +13,10 @@ const _props = defineProps(aBaseInputProps)
defineEmits<ABaseInputEvents>()
defineOptions({
name: 'ABaseInput',
})
defineSlots<typeof aBaseInputSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/base-input/meta.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { configurable, disabled, readonly } from 'anu-vue/composables/useProps'
import type { ExtractPublicPropTypes, HTMLAttributes, PropType } from 'vue'
import { configurable, disabled, readonly } from 'anu-vue/composables/useProps'

// ℹ️ Make sure to checkout prop definition rules

Expand Down
10 changes: 5 additions & 5 deletions packages/anu-vue/src/components/btn/ABtn.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<script lang="ts" setup>
import type { aBtnSlots } from './meta'
import { aBtnProps } from './meta'
import { ASpinner } from 'anu-vue/components/spinner'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { useLayer } from 'anu-vue/composables/useLayer'
import type { aBtnSlots } from './meta'
import { aBtnProps } from './meta'
// SECTION Meta
const _props = defineProps(aBtnProps)
defineOptions({
name: 'ABtn',
})
// SECTION Meta
const _props = defineProps(aBtnProps)
defineSlots<typeof aBtnSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/btn/meta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ExtractPublicPropTypes } from 'vue'
import { aLayerProps } from 'anu-vue/composables/useLayer'
import { configurable as configurableProp, disabled as disabledProp } from 'anu-vue/composables/useProps'
import type { ExtractPublicPropTypes } from 'vue'

// ℹ️ Make sure to checkout meta definition rules

Expand Down
12 changes: 6 additions & 6 deletions packages/anu-vue/src/components/card/ACard.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<script lang="ts" setup>
import { ATypography } from '../typography'
import type { aCardSlots } from './meta'
import { aCardProps, aCardTypographySlots } from './meta'
import { ALoader } from 'anu-vue/components/loader'
import { isTypographyUsed } from 'anu-vue/components/typography/utils'
import { type ConfigurableValue, useConfigurable } from 'anu-vue/composables/useConfigurable'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { useLayer } from 'anu-vue/composables/useLayer'
import { filterUsedSlots } from 'anu-vue/utils/vue'
import { ATypography } from '../typography'
import type { aCardSlots } from './meta'
import { aCardProps, aCardTypographySlots } from './meta'
// SECTION Meta
const _props = defineProps(aCardProps)
defineOptions({
name: 'ACard',
})
// SECTION Meta
const _props = defineProps(aCardProps)
defineSlots<typeof aCardSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/card/meta.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ExtractPublicPropTypes } from 'vue'
import type { ALoaderProps } from 'anu-vue/components/loader'
import { aTypographyProps, aTypographySlots } from 'anu-vue/components/typography'
import { aLayerProps } from 'anu-vue/composables/useLayer'
import type { ExtractPublicPropTypes } from 'vue'

// ℹ️ Make sure to checkout meta definition rules

Expand Down
12 changes: 7 additions & 5 deletions packages/anu-vue/src/components/checkbox/ACheckbox.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<script lang="ts" setup>
import type { ACheckboxEvents, ACheckboxProps, aCheckboxSlots } from './meta'
import { aCheckboxProps } from './meta'
import { useCheckbox } from 'anu-vue/composables'
import type { ConfigurableValue } from 'anu-vue/composables/useConfigurable'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import type { ACheckboxEvents, ACheckboxProps, aCheckboxSlots } from './meta'
import { aCheckboxProps } from './meta'
// SECTION Meta
const _props = defineProps(aCheckboxProps)
const emit = defineEmits<ACheckboxEvents>()
defineOptions({
name: 'ACheckbox',
inheritAttrs: false,
})
// SECTION Meta
const _props = defineProps(aCheckboxProps)
const emit = defineEmits<ACheckboxEvents>()
defineSlots<typeof aCheckboxSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/checkbox/meta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ExtractPublicPropTypes } from 'vue'
import { useCheckboxProps } from 'anu-vue/composables/useCheckbox'
import { color as colorProp, configurable as configurableProp, disabled as disabledProp } from 'anu-vue/composables/useProps'
import type { ExtractPublicPropTypes } from 'vue'

// ℹ️ Make sure to checkout meta definition rules

Expand Down
12 changes: 7 additions & 5 deletions packages/anu-vue/src/components/chip/AChip.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<script lang="ts" setup>
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { useLayer } from 'anu-vue/composables/useLayer'
import type { AChipEvents, aChipSlots } from './meta'
import { aChipProps } from './meta'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { useLayer } from 'anu-vue/composables/useLayer'
// SECTION Meta
const _props = defineProps(aChipProps)
const emit = defineEmits<AChipEvents>()
defineOptions({
name: 'AChip',
})
// SECTION Meta
const _props = defineProps(aChipProps)
const emit = defineEmits<AChipEvents>()
defineSlots<typeof aChipSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/chip/meta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ExtractPublicPropTypes } from 'vue'
import { aLayerProps } from 'anu-vue/composables/useLayer'
import { configurable as configurableProp, disabled as disabledProp } from 'anu-vue/composables/useProps'
import type { ExtractPublicPropTypes } from 'vue'

// ℹ️ Make sure to checkout meta definition rules

Expand Down
4 changes: 2 additions & 2 deletions packages/anu-vue/src/components/config/AConfig.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script lang="ts" setup>
import { aConfigProps } from './meta'
import { mergePropsDefaults } from 'anu-vue/composables/useDefaults'
import { ANU_PROPS_DEFAULTS } from 'anu-vue/symbols'
import { aConfigProps } from './meta'
const props = defineProps(aConfigProps)
defineOptions({
name: 'AConfig',
})
const props = defineProps(aConfigProps)
const defaults = inject(ANU_PROPS_DEFAULTS)
// ℹ️ Pass new reactive value to avoid updates in upward tree
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/config/meta.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PluginOptions } from 'anu-vue/plugin'
import type { ExtractPublicPropTypes } from 'vue'
import type { PluginOptions } from 'anu-vue/plugin'

// ℹ️ Make sure to checkout meta definition rules

Expand Down
17 changes: 9 additions & 8 deletions packages/anu-vue/src/components/data-table/ADataTable.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<script lang="ts" setup generic="Row extends Record<string, unknown>">
import { defu } from 'defu'
import type { Ref } from 'vue'
import type { ADataTableEvents, ADataTableItemsFunction, ADataTablePropColumn } from './meta'
import { aDataTableColDefaults, aDataTableProps, aDataTableSlots, aDataTableTableSlots } from './meta'
import { ABtn, AInput, ASelect, ATable } from 'anu-vue/components'
import type { ATableProps } from 'anu-vue/components/table'
import { aTableProps } from 'anu-vue/components/table'
Expand All @@ -8,21 +12,18 @@ import type { typeSortBy } from 'anu-vue/composables/useSort'
import { useSort } from 'anu-vue/composables/useSort'
import { objectKeys } from 'anu-vue/utils/typescripts'
import { filterUsedSlots } from 'anu-vue/utils/vue'
import { defu } from 'defu'
import type { Ref } from 'vue'
import type { ADataTableEvents, ADataTableItemsFunction, ADataTablePropColumn } from './meta'
import { aDataTableColDefaults, aDataTableProps, aDataTableSlots, aDataTableTableSlots } from './meta'
defineOptions({
name: 'ADataTable',
})
// TODO: Check usage with useDebounceFn. Can we limit the # of req to server?
// SECTION Meta
const _props = defineProps(aDataTableProps<Row>())
const emit = defineEmits<ADataTableEvents>()
defineOptions({
name: 'ADataTable',
})
// TODO: (types) Without any we get type error: https://github.com/vuejs/language-tools/issues/3141
defineSlots<any>()
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/data-table/meta.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { ExtractPublicPropTypes } from 'vue'
import type { ATableEvents, ATablePropColumn, RowKey } from 'anu-vue/components/table'
import { aTableProps, aTableSlots } from 'anu-vue/components/table'
import type { CustomFilter } from 'anu-vue/composables/useSearch'
import type { CustomSort } from 'anu-vue/composables/useSort'
import { omitObjKeys } from 'anu-vue/utils/helpers'
import type { ExtractPublicPropTypes } from 'vue'

// ℹ️ Make sure to checkout meta definition rules

Expand Down
14 changes: 8 additions & 6 deletions packages/anu-vue/src/components/dialog/ADialog.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<script lang="ts" setup>
import type { Ref } from 'vue'
import type { ADialogEvents } from './meta'
import { aDialogProps, aDialogSlots } from './meta'
import { ACard } from 'anu-vue/components/card'
import { onClickSameTarget } from 'anu-vue/composables/onClickSameTarget'
import { useDOMScrollLock } from 'anu-vue/composables/useDOMScrollLock'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { useTeleport } from 'anu-vue/composables/useTeleport'
import { filterUsedSlots } from 'anu-vue/utils/vue'
import type { Ref } from 'vue'
import type { ADialogEvents } from './meta'
import { aDialogProps, aDialogSlots } from './meta'
// SECTION Meta
const _props = defineProps(aDialogProps)
const emit = defineEmits<ADialogEvents>()
defineOptions({
name: 'ADialog',
inheritAttrs: false,
})
// SECTION Meta
const _props = defineProps(aDialogProps)
const emit = defineEmits<ADialogEvents>()
defineSlots<typeof aDialogSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/dialog/meta.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { aCardProps, aCardSlots } from 'anu-vue/components/card'
import type { ExtractPublicPropTypes } from 'vue'
import { aCardProps, aCardSlots } from 'anu-vue/components/card'

// ℹ️ Make sure to checkout meta definition rules

Expand Down
14 changes: 8 additions & 6 deletions packages/anu-vue/src/components/drawer/ADrawer.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<script lang="ts" setup>
import type { Ref } from 'vue'
import type { ADrawerEvents } from './meta'
import { aDrawerProps, aDrawerSlots } from './meta'
import { ACard } from 'anu-vue/components/card'
import { onClickSameTarget } from 'anu-vue/composables/onClickSameTarget'
import { useDOMScrollLock } from 'anu-vue/composables/useDOMScrollLock'
import { useDefaults } from 'anu-vue/composables/useDefaults'
import { useTeleport } from 'anu-vue/composables/useTeleport'
import { filterUsedSlots } from 'anu-vue/utils/vue'
import type { Ref } from 'vue'
import type { ADrawerEvents } from './meta'
import { aDrawerProps, aDrawerSlots } from './meta'
// SECTION Meta
const _props = defineProps(aDrawerProps)
const emit = defineEmits<ADrawerEvents>()
defineOptions({
name: 'ADrawer',
inheritAttrs: false,
})
// SECTION Meta
const _props = defineProps(aDrawerProps)
const emit = defineEmits<ADrawerEvents>()
defineSlots<typeof aDrawerSlots>()
const { props, defaultsClass, defaultsStyle, defaultsAttrs } = useDefaults(_props)
Expand Down
Loading

0 comments on commit fa67d73

Please sign in to comment.