Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update eslint #138

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meta/alias.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Alias } from 'vite';
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'pathe';
import type { Alias } from 'vite';

const __dirname = dirname(fileURLToPath(import.meta.url));

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@mixte/snippets": "workspace:*",
"@mixte/use": "workspace:*",
"@mixte/validator": "workspace:*",
"@moomfe/eslint-config": "^3.3.0",
"@moomfe/eslint-config": "^3.4.0",
"@moomfe/small-utils": "^5.3.2",
"@nuxt/kit": "^3.13.0",
"@nuxt/schema": "^3.13.0",
Expand All @@ -76,7 +76,7 @@
"change-case": "^5.4.4",
"defu": "^6.1.4",
"element-plus": "^2.8.1",
"eslint": "^9.11.1",
"eslint": "^9.14.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"gsap": "^3.12.5",
Expand Down
6 changes: 3 additions & 3 deletions packages/.vitepress/components/DemoCard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@

<script lang="ts" setup>
import type { Highlighter } from 'shiki';
import { ShikiMagicMove } from 'shiki-magic-move/vue';
import { NConfigProvider, dateZhCN, zhCN } from 'naive-ui';
import { getSingletonHighlighter } from 'shiki';
import { decode } from 'js-base64';
import { dateZhCN, NConfigProvider, zhCN } from 'naive-ui';
import { getSingletonHighlighter } from 'shiki';
import { ShikiMagicMove } from 'shiki-magic-move/vue';
import 'shiki-magic-move/dist/style.css';

interface Props {
Expand Down
14 changes: 7 additions & 7 deletions packages/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'pathe';
import { defineConfig } from 'vitepress';
import { transformerTwoslash } from '@shikijs/vitepress-twoslash';
import VueJsx from '@vitejs/plugin-vue-jsx';
import { pascalCase } from 'change-case';
import { dirname, resolve } from 'pathe';
import Unocss from 'unocss/vite';
import Icons from 'unplugin-icons/vite';
import IconsResolver from 'unplugin-icons/resolver';
import Components from 'unplugin-vue-components/vite';
import Icons from 'unplugin-icons/vite';
import { ArcoResolver, ElementPlusResolver, NaiveUiResolver } from 'unplugin-vue-components/resolvers';
import { pascalCase } from 'change-case';
import { transformerTwoslash } from '@shikijs/vitepress-twoslash';
import { components, mixte, snippets, use, validator } from '../../meta/docs.json';
import Components from 'unplugin-vue-components/vite';
import { defineConfig } from 'vitepress';
import { alias } from '../../meta/alias';
import { components, mixte, snippets, use, validator } from '../../meta/docs.json';
import { version } from '../../package.json';
import { MarkdownTransform } from './plugins/markdownTransform';
import VitePlugins from './vite.common.plugins';
Expand Down
12 changes: 6 additions & 6 deletions packages/.vitepress/plugins/markdownTransform.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/* eslint-disable ts/no-use-before-define */

import { dirname, resolve } from 'pathe';
import type { Plugin } from 'vite';
import type { BundledLanguage } from 'shiki';
import MagicString from 'magic-string';
import fs from 'fs-extra';
import type { Plugin } from 'vite';
import type { Info } from '../types/info';
import { pascalCase } from 'change-case';
import { find } from 'lodash-es';
import fs from 'fs-extra';
import { encode } from 'js-base64';
import { find } from 'lodash-es';
import MagicString from 'magic-string';
import { customRandom, random } from 'nanoid';
import { dirname, resolve } from 'pathe';
import docs from '../../../meta/docs.json';
import type { Info } from '../types/info';

const nanoid = customRandom('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890', 18, random);

Expand Down
4 changes: 2 additions & 2 deletions packages/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</template>

<script lang="ts" setup>
import DefaultTheme from 'vitepress/theme';
import { useData } from 'vitepress';
import { toggleThemeViewTransition } from '@mixte/snippets/toggleThemeViewTransition';
import { useData } from 'vitepress';
import DefaultTheme from 'vitepress/theme';

const { isDark } = useData();

Expand Down
6 changes: 3 additions & 3 deletions packages/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// https://vitepress.dev/guide/custom-theme
import type { App } from 'vue';
import { ID_INJECTION_KEY } from 'element-plus';
import { inject } from '@vercel/analytics';
import Theme from 'vitepress/theme';
import TwoSlashFloatingVue from '@shikijs/vitepress-twoslash/client';
import { inject } from '@vercel/analytics';
import { ID_INJECTION_KEY } from 'element-plus';
import * as Mixte from 'mixte';
import Theme from 'vitepress/theme';
import Layout from './Layout.vue';

import './style.css';
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/auto-grid/demo/功能演示.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
</template>

<script lang="ts" setup>
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';
import { colors as colorsMap } from '@/.vitepress/shared/unocss.theme';
import { MixteAutoGrid } from '@mixte/components/auto-grid';
import { isNumeric, isPlainObject, random } from 'mixte';
import { omit } from 'lodash-es';
import { colors as colorsMap } from '@/.vitepress/shared/unocss.theme';
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';
import { isNumeric, isPlainObject, random } from 'mixte';

const rootRef = ref<HTMLDivElement>();
const rootWidth = useElementSize(rootRef).width;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/auto-grid/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { VNodeChild } from 'vue';
import { MixteAutoGrid } from '@mixte/components/auto-grid';
import { mount } from '@vue/test-utils';
import { h } from 'vue';
import postcss from 'postcss';
import postcssJs from 'postcss-js';
import { h } from 'vue';
import { defaultStyle, sharedTest } from './shared-test';

describe('auto-grid', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/auto-grid/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AutoGrid from './src/index.vue';
import type { AutoGridProps } from './src/types';
import AutoGrid from './src/index.vue';

type AutoGridInstance = InstanceType<typeof AutoGrid>;

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/auto-grid/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

<script lang="tsx" setup>
import type { CSSProperties, VNodeChild } from 'vue';
import { computed, onBeforeUpdate, ref } from 'vue';
import type { AutoGridProps, AutoGridSlots } from './types';
import { flatten } from 'naive-ui/es/_utils/vue/flatten';
import { computed, onBeforeUpdate, ref } from 'vue';
import { useAutoGrid } from '../../list-auto-grid/src/composables/useAutoGrid';
import type { AutoGridProps, AutoGridSlots } from './types';

const props = defineProps<AutoGridProps>();
const slots = defineSlots<AutoGridSlots>();
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/list-auto-grid/demo/功能演示.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
</template>

<script lang="ts" setup>
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';
import { colors as colorsMap } from '@/.vitepress/shared/unocss.theme';
import { MixteListAutoGrid } from '@mixte/components/list-auto-grid';
import { isNumeric, isPlainObject, random } from 'mixte';
import { omit } from 'lodash-es';
import { colors as colorsMap } from '@/.vitepress/shared/unocss.theme';
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';
import { isNumeric, isPlainObject, random } from 'mixte';

const rootRef = ref<HTMLDivElement>();
const rootWidth = useElementSize(rootRef).width;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CSSProperties } from 'vue-demi';
import { computed, ref } from 'vue-demi';
import { useElementSize } from '@vueuse/core';
import { isNumeric } from 'mixte';
import { computed, ref } from 'vue-demi';

export interface CommomAutoGridProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/components/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'pathe';
import fg from 'fast-glob';
import fs from 'fs-extra';
import { dirname, resolve } from 'pathe';

const __dirname = dirname(fileURLToPath(import.meta.url));
const rootDir = resolve(__dirname, '../');
Expand Down
18 changes: 9 additions & 9 deletions packages/mixte/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export * from './src/is/index';
export * from './src/random/index';
export * from './src/delay/index';
export * from './src/uniqueKey/index';
export * from './src/move/index';
export * from './src/asyncArrayFn/index';
export * from './src/toArray/index';
export * from './src/changeCase/index';
export * from './src/deepClone/index';
export * from './src/deepMerge/index';
export * from './src/onceRun/index';
export * from './src/leastRun/index';
export * from './src/defineArgs/index';
export * from './src/delay/index';
export * from './src/env/index';
export * from './src/changeCase/index';
export * from './src/is/index';
export * from './src/leastRun/index';
export * from './src/move/index';
export * from './src/onceRun/index';
export * from './src/random/index';
export * from './src/toArray/index';
export * from './src/uniqueKey/index';
2 changes: 1 addition & 1 deletion packages/mixte/src/changeCase/demo/camelCase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</template>

<script lang="ts" setup>
import { camelCase } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { camelCase } from 'mixte';

interface Props {
fn?: (str: string) => string;
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/deepMerge/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isPlainObject } from 'mixte';
import type { Merge } from 'type-fest';
import { isPlainObject } from 'mixte';

function merge<T extends object, S extends object>(target: T, source: S, cache: WeakMap<object, object>) {
cache.set(source, target);
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/is/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isBoolean, isESModule, isEmptyObject, isFunction, isNativePromise, isNumber, isNumeric, isNumericString, isObject, isPlainObject, isPrimitive, isPromise, isReference, isString } from 'mixte';
import { isBoolean, isEmptyObject, isESModule, isFunction, isNativePromise, isNumber, isNumeric, isNumericString, isObject, isPlainObject, isPrimitive, isPromise, isReference, isString } from 'mixte';
import { testTypes, types } from './testTypes';

describe('testTypes', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/leastRun/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</template>

<script lang="ts" setup>
import { leastRun } from 'mixte';
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';
import { leastRun } from 'mixte';

const isRun = ref(false);
const ms = ref(1000);
Expand Down
6 changes: 3 additions & 3 deletions packages/mixte/src/move/demo/move.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
</template>

<script lang="ts" setup>
import { delay, move } from 'mixte';
import { gsap } from 'gsap';
import { offset, useFloating } from '@floating-ui/vue';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { offset, useFloating } from '@floating-ui/vue';
import { gsap } from 'gsap';
import { delay, move } from 'mixte';

const containerRef = ref<HTMLElement>();
const fromFloatingRef = ref<HTMLElement>();
Expand Down
6 changes: 3 additions & 3 deletions packages/mixte/src/move/demo/moveRange.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
</template>

<script lang="ts" setup>
import { delay, moveRange } from 'mixte';
import { gsap } from 'gsap';
import { offset, useFloating } from '@floating-ui/vue';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { offset, useFloating } from '@floating-ui/vue';
import { gsap } from 'gsap';
import { delay, moveRange } from 'mixte';

const containerRef = ref<HTMLElement>();
const startFloatingRef = ref<HTMLElement>();
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/onceRun/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</template>

<script lang="ts" setup>
import { delay, onceRun } from 'mixte';
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';
import { delay, onceRun } from 'mixte';

const isRun = ref(false);
const runCount = ref(0);
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/random/demo/random.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</template>

<script lang="ts" setup>
import { random } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { random } from 'mixte';

const from = ref(-100);
const to = ref(100);
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/random/demo/randomBoolean.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</template>

<script lang="ts" setup>
import { randomBoolean } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { randomBoolean } from 'mixte';

const value = ref(
randomBoolean(),
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/random/demo/randomLetter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</template>

<script lang="ts" setup>
import { randomLetter } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { randomLetter } from 'mixte';

const uppercase = ref<boolean>();
const value = ref(
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/random/demo/randomLowercaseLetter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</template>

<script lang="ts" setup>
import { randomLowercaseLetter } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { randomLowercaseLetter } from 'mixte';

const value = ref(
randomLowercaseLetter(),
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/random/demo/randomNatural.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</template>

<script lang="ts" setup>
import { randomNatural } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { randomNatural } from 'mixte';

const min = ref(0);
const max = ref(100);
Expand Down
4 changes: 2 additions & 2 deletions packages/mixte/src/random/demo/randomString.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</template>

<script lang="ts" setup>
import { randomString } from 'mixte';
import { ElMessage } from 'element-plus';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { ElMessage } from 'element-plus';
import { randomString } from 'mixte';

const length = ref<number>(12);
const lowercase = ref<boolean>(true);
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/random/demo/randomUppercaseLetter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</template>

<script lang="ts" setup>
import { randomUppercaseLetter } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { randomUppercaseLetter } from 'mixte';

const value = ref(
randomUppercaseLetter(),
Expand Down
2 changes: 1 addition & 1 deletion packages/mixte/src/uniqueKey/demo/uniqueKeyCustomizer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</template>

<script lang="ts" setup>
import { uniqueKeyCustomizer } from 'mixte';
import type { InjectCode } from '@/.vitepress/components/DemoCard/types';
import { uniqueKeyCustomizer } from 'mixte';

const value = ref(
uniqueKeyCustomizer(),
Expand Down
4 changes: 2 additions & 2 deletions packages/snippets/src/getFastestCDN/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
</template>

<script lang="ts" setup>
import { useRequestReactive } from '@mixte/use';
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';
import { getFastestCDN } from '@mixte/snippets/getFastestCDN';
import { useRequestReactive } from '@mixte/use';
import { randomNatural } from 'mixte';
import type { InjectCode, InjectCodeLang } from '@/.vitepress/components/DemoCard/types';

const pkg = ref('');
const version = ref('');
Expand Down
Loading