mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-29 17:58:08 +08:00
chore: update dependencies (#18573)
* chore: update dependencies typescript: v5.5 vue-tsc: v2 eslint: v8-latest @commitlint/*: v18 * fix: apply suggestions * fix: ignore some ts errors
This commit is contained in:
parent
e306995707
commit
7bba5332f1
@ -38,7 +38,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@esbuild-kit/cjs-loader": "^2.2.1",
|
"@esbuild-kit/cjs-loader": "^2.2.1",
|
||||||
"@pnpm/types": "^8.4.0",
|
"@pnpm/types": "^8.4.0",
|
||||||
"unbuild": "^0.7.4",
|
"unbuild": "^2.0.0",
|
||||||
"vue": "^3.2.37"
|
"vue": "^3.2.37"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,6 @@ module.exports = defineConfig({
|
|||||||
files: ['*.json', '*.json5', '*.jsonc'],
|
files: ['*.json', '*.json5', '*.jsonc'],
|
||||||
parser: 'jsonc-eslint-parser',
|
parser: 'jsonc-eslint-parser',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
files: ['*.ts', '*.vue'],
|
|
||||||
rules: {
|
|
||||||
'no-undef': 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
files: ['**/__tests__/**'],
|
files: ['**/__tests__/**'],
|
||||||
rules: {
|
rules: {
|
||||||
@ -121,6 +115,10 @@ module.exports = defineConfig({
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'no-undef': 'off',
|
'no-undef': 'off',
|
||||||
|
'@typescript-eslint/consistent-type-imports': [
|
||||||
|
'error',
|
||||||
|
{ disallowTypeAnnotations: false },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -191,11 +189,9 @@ module.exports = defineConfig({
|
|||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
||||||
'@typescript-eslint/consistent-type-imports': [
|
|
||||||
'error',
|
|
||||||
{ disallowTypeAnnotations: false },
|
|
||||||
],
|
|
||||||
'@typescript-eslint/ban-ts-comment': ['off', { 'ts-ignore': false }],
|
'@typescript-eslint/ban-ts-comment': ['off', { 'ts-ignore': false }],
|
||||||
|
'@typescript-eslint/no-require-imports': 'off',
|
||||||
|
'@typescript-eslint/no-unused-expressions': 'off',
|
||||||
|
|
||||||
// vue
|
// vue
|
||||||
'vue/no-v-html': 'off',
|
'vue/no-v-html': 'off',
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"eslint": "^8.0.0"
|
"eslint": "^8.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
"@typescript-eslint/eslint-plugin": "^8.9.0",
|
||||||
"@typescript-eslint/parser": "^5.30.0",
|
"@typescript-eslint/parser": "^8.9.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-define-config": "^1.5.1",
|
"eslint-define-config": "^1.5.1",
|
||||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||||
@ -24,13 +24,13 @@
|
|||||||
"eslint-plugin-markdown": "^3.0.0",
|
"eslint-plugin-markdown": "^3.0.0",
|
||||||
"eslint-plugin-prettier": "^4.1.0",
|
"eslint-plugin-prettier": "^4.1.0",
|
||||||
"eslint-plugin-unicorn": "^43.0.2",
|
"eslint-plugin-unicorn": "^43.0.2",
|
||||||
"eslint-plugin-vue": "^9.1.1",
|
"eslint-plugin-vue": "^9.29.1",
|
||||||
"jsonc-eslint-parser": "^2.1.0",
|
"jsonc-eslint-parser": "^2.1.0",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "~5.5.4",
|
||||||
"yaml-eslint-parser": "^1.0.1"
|
"yaml-eslint-parser": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.18.0"
|
"eslint": "^8.57.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
package.json
10
package.json
@ -68,8 +68,8 @@
|
|||||||
"normalize-wheel-es": "^1.2.0"
|
"normalize-wheel-es": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^17.0.3",
|
"@commitlint/cli": "^18.6.1",
|
||||||
"@commitlint/config-conventional": "^17.0.3",
|
"@commitlint/config-conventional": "^18.6.3",
|
||||||
"@element-plus/build": "workspace:^0.0.1",
|
"@element-plus/build": "workspace:^0.0.1",
|
||||||
"@element-plus/build-utils": "workspace:^0.0.1",
|
"@element-plus/build-utils": "workspace:^0.0.1",
|
||||||
"@element-plus/eslint-config": "workspace:*",
|
"@element-plus/eslint-config": "workspace:*",
|
||||||
@ -95,7 +95,7 @@
|
|||||||
"csstype": "^2.6.20",
|
"csstype": "^2.6.20",
|
||||||
"cz-git": "^1.3.8",
|
"cz-git": "^1.3.8",
|
||||||
"czg": "^1.3.8",
|
"czg": "^1.3.8",
|
||||||
"eslint": "^8.18.0",
|
"eslint": "^8.57.1",
|
||||||
"eslint-define-config": "^1.5.1",
|
"eslint-define-config": "^1.5.1",
|
||||||
"expect-type": "^0.13.0",
|
"expect-type": "^0.13.0",
|
||||||
"fast-glob": "^3.2.11",
|
"fast-glob": "^3.2.11",
|
||||||
@ -111,13 +111,13 @@
|
|||||||
"sass": "^1.79.3",
|
"sass": "^1.79.3",
|
||||||
"tsx": "^4.7.1",
|
"tsx": "^4.7.1",
|
||||||
"type-fest": "^2.14.0",
|
"type-fest": "^2.14.0",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "~5.5.4",
|
||||||
"unplugin-element-plus": "^0.4.0",
|
"unplugin-element-plus": "^0.4.0",
|
||||||
"unplugin-vue-macros": "^2.7.11",
|
"unplugin-vue-macros": "^2.7.11",
|
||||||
"vitest": "^2.0.5",
|
"vitest": "^2.0.5",
|
||||||
"vue": "^3.2.37",
|
"vue": "^3.2.37",
|
||||||
"vue-router": "^4.0.16",
|
"vue-router": "^4.0.16",
|
||||||
"vue-tsc": "^1.8.27"
|
"vue-tsc": "^2.1.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
|
@ -6,6 +6,7 @@ import type { Language } from '@element-plus/locale'
|
|||||||
import type { ButtonConfigContext } from '@element-plus/components/button'
|
import type { ButtonConfigContext } from '@element-plus/components/button'
|
||||||
import type { MessageConfigContext } from '@element-plus/components/message'
|
import type { MessageConfigContext } from '@element-plus/components/message'
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
export type ExperimentalFeatures = {
|
export type ExperimentalFeatures = {
|
||||||
// TO BE Defined
|
// TO BE Defined
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
|
|
||||||
import { buildProps } from '@element-plus/utils'
|
import { buildProps } from '@element-plus/utils'
|
||||||
|
|
||||||
import type { ExtractPropTypes } from 'vue'
|
import type { ExtractPropTypes } from 'vue'
|
||||||
|
@ -25,7 +25,7 @@ export const enforceUnit = (style: CSSProperties) => {
|
|||||||
return style
|
return style
|
||||||
}
|
}
|
||||||
|
|
||||||
export const componentToSlot = <T>(
|
export const componentToSlot = <T extends object>(
|
||||||
ComponentLike: JSX.Element | ((props: T) => Component<T>) | undefined
|
ComponentLike: JSX.Element | ((props: T) => Component<T>) | undefined
|
||||||
) =>
|
) =>
|
||||||
isVNode(ComponentLike)
|
isVNode(ComponentLike)
|
||||||
|
@ -325,6 +325,7 @@ const refInput = computed<HTMLInputElement[]>(() => {
|
|||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
const setSelectionRange = (start: number, end: number, pos?: 'min' | 'max') => {
|
const setSelectionRange = (start: number, end: number, pos?: 'min' | 'max') => {
|
||||||
const _inputs = refInput.value
|
const _inputs = refInput.value
|
||||||
if (!_inputs.length) return
|
if (!_inputs.length) return
|
||||||
@ -687,6 +688,7 @@ const handleEndChange = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const pickerOptions = ref<Partial<PickerOptions>>({})
|
const pickerOptions = ref<Partial<PickerOptions>>({})
|
||||||
|
// @ts-expect-error
|
||||||
const onSetPickerOption = <T extends keyof PickerOptions>(
|
const onSetPickerOption = <T extends keyof PickerOptions>(
|
||||||
e: [T, PickerOptions[T]]
|
e: [T, PickerOptions[T]]
|
||||||
) => {
|
) => {
|
||||||
@ -694,10 +696,12 @@ const onSetPickerOption = <T extends keyof PickerOptions>(
|
|||||||
pickerOptions.value.panelReady = true
|
pickerOptions.value.panelReady = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
const onCalendarChange = (e: [Date, null | Date]) => {
|
const onCalendarChange = (e: [Date, null | Date]) => {
|
||||||
emit('calendar-change', e)
|
emit('calendar-change', e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
const onPanelChange = (
|
const onPanelChange = (
|
||||||
value: [Dayjs, Dayjs],
|
value: [Dayjs, Dayjs],
|
||||||
mode: 'month' | 'year',
|
mode: 'month' | 'year',
|
||||||
|
@ -19,7 +19,7 @@ export interface UploadProgressEvent extends ProgressEvent {
|
|||||||
export interface UploadRequestOptions {
|
export interface UploadRequestOptions {
|
||||||
action: string
|
action: string
|
||||||
method: string
|
method: string
|
||||||
data: Record<string, string | Blob | [string | Blob, string]>
|
data: Record<string, string | Blob | [Blob, string]>
|
||||||
filename: string
|
filename: string
|
||||||
file: UploadRawFile
|
file: UploadRawFile
|
||||||
headers: Headers | Record<string, string | number | null | undefined>
|
headers: Headers | Record<string, string | number | null | undefined>
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/ban-types */
|
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
||||||
|
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
|
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
|
@ -7,7 +7,7 @@ type Many<T> = T | ReadonlyArray<T>
|
|||||||
/** like `_.castArray`, except falsy value returns empty array. */
|
/** like `_.castArray`, except falsy value returns empty array. */
|
||||||
export const castArray = <T>(arr: Many<T>): T[] => {
|
export const castArray = <T>(arr: Many<T>): T[] => {
|
||||||
if (!arr && (arr as any) !== 0) return []
|
if (!arr && (arr as any) !== 0) return []
|
||||||
return isArray(arr) ? arr : [arr]
|
return isArray(arr) ? arr : [arr as T]
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove import alias
|
// TODO: remove import alias
|
||||||
|
@ -2,8 +2,10 @@ import { get, set } from 'lodash-unified'
|
|||||||
import type { Entries } from 'type-fest'
|
import type { Entries } from 'type-fest'
|
||||||
import type { Arrayable } from '.'
|
import type { Arrayable } from '.'
|
||||||
|
|
||||||
export const keysOf = <T>(arr: T) => Object.keys(arr) as Array<keyof T>
|
export const keysOf = <T extends object>(arr: T) =>
|
||||||
export const entriesOf = <T>(arr: T) => Object.entries(arr) as Entries<T>
|
Object.keys(arr) as Array<keyof T>
|
||||||
|
export const entriesOf = <T extends object>(arr: T) =>
|
||||||
|
Object.entries(arr) as Entries<T>
|
||||||
export { hasOwn } from '@vue/shared'
|
export { hasOwn } from '@vue/shared'
|
||||||
|
|
||||||
export const getProp = <T = any>(
|
export const getProp = <T = any>(
|
||||||
|
1893
pnpm-lock.yaml
1893
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user