chore: add no-debugger eslint rule (#5906)
This commit is contained in:
@@ -257,7 +257,6 @@ describe('component: proxy', () => {
|
||||
expect(instanceProxy.isDisplayed).toBe(true)
|
||||
})
|
||||
|
||||
|
||||
test('allow jest spying on proxy methods with Object.defineProperty', () => {
|
||||
// #5417
|
||||
let instanceProxy: any
|
||||
@@ -426,7 +425,6 @@ describe('component: proxy', () => {
|
||||
expect(instanceProxy.fromProp).toBe(false)
|
||||
})
|
||||
|
||||
|
||||
// #864
|
||||
test('should not warn declared but absent props', () => {
|
||||
const Comp = {
|
||||
|
||||
@@ -443,10 +443,8 @@ describe('api: template refs', () => {
|
||||
expect(mapRefs()).toMatchObject(['2', '3', '4'])
|
||||
})
|
||||
|
||||
|
||||
|
||||
test('named ref in v-for', async () => {
|
||||
const show = ref(true);
|
||||
const show = ref(true)
|
||||
const list = reactive([1, 2, 3])
|
||||
const listRefs = ref([])
|
||||
const mapRefs = () => listRefs.value.map(n => serializeInner(n))
|
||||
@@ -495,6 +493,4 @@ describe('api: template refs', () => {
|
||||
await nextTick()
|
||||
expect(mapRefs()).toMatchObject(['2', '3', '4'])
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
||||
@@ -135,8 +135,8 @@ const enum BooleanFlags {
|
||||
|
||||
// extract props which defined with default from prop options
|
||||
export type ExtractDefaultPropTypes<O> = O extends object
|
||||
// use `keyof Pick<O, DefaultKeys<O>>` instead of `DefaultKeys<O>` to support IDE features
|
||||
? { [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]> }
|
||||
? // use `keyof Pick<O, DefaultKeys<O>>` instead of `DefaultKeys<O>` to support IDE features
|
||||
{ [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]> }
|
||||
: {}
|
||||
|
||||
type NormalizedProp =
|
||||
@@ -226,7 +226,7 @@ export function updateProps(
|
||||
for (let i = 0; i < propsToUpdate.length; i++) {
|
||||
let key = propsToUpdate[i]
|
||||
// skip if the prop key is a declared emit event listener
|
||||
if (isEmitListener(instance.emitsOptions, key)){
|
||||
if (isEmitListener(instance.emitsOptions, key)) {
|
||||
continue
|
||||
}
|
||||
// PROPS flag guarantees rawProps to be non-null
|
||||
|
||||
@@ -113,7 +113,7 @@ export function createHydrationFunctions(
|
||||
nextNode = onMismatch()
|
||||
} else {
|
||||
if ((node as Text).data !== vnode.children) {
|
||||
hasMismatch = true; debugger
|
||||
hasMismatch = true
|
||||
__DEV__ &&
|
||||
warn(
|
||||
`Hydration text mismatch:` +
|
||||
@@ -351,7 +351,7 @@ export function createHydrationFunctions(
|
||||
)
|
||||
let hasWarned = false
|
||||
while (next) {
|
||||
hasMismatch = true; debugger
|
||||
hasMismatch = true
|
||||
if (__DEV__ && !hasWarned) {
|
||||
warn(
|
||||
`Hydration children mismatch in <${vnode.type as string}>: ` +
|
||||
@@ -366,7 +366,7 @@ export function createHydrationFunctions(
|
||||
}
|
||||
} else if (shapeFlag & ShapeFlags.TEXT_CHILDREN) {
|
||||
if (el.textContent !== vnode.children) {
|
||||
hasMismatch = true; debugger
|
||||
hasMismatch = true
|
||||
__DEV__ &&
|
||||
warn(
|
||||
`Hydration text content mismatch in <${
|
||||
@@ -411,7 +411,7 @@ export function createHydrationFunctions(
|
||||
} else if (vnode.type === Text && !vnode.children) {
|
||||
continue
|
||||
} else {
|
||||
hasMismatch = true; debugger
|
||||
hasMismatch = true
|
||||
if (__DEV__ && !hasWarned) {
|
||||
warn(
|
||||
`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
|
||||
@@ -465,7 +465,7 @@ export function createHydrationFunctions(
|
||||
} else {
|
||||
// fragment didn't hydrate successfully, since we didn't get a end anchor
|
||||
// back. This should have led to node/children mismatch warnings.
|
||||
hasMismatch = true; debugger
|
||||
hasMismatch = true
|
||||
// since the anchor is missing, we need to create one and insert it
|
||||
insert((vnode.anchor = createComment(`]`)), container, next)
|
||||
return next
|
||||
@@ -480,7 +480,7 @@ export function createHydrationFunctions(
|
||||
slotScopeIds: string[] | null,
|
||||
isFragment: boolean
|
||||
): Node | null => {
|
||||
hasMismatch = true; debugger
|
||||
hasMismatch = true
|
||||
__DEV__ &&
|
||||
warn(
|
||||
`Hydration node mismatch:\n- Client vnode:`,
|
||||
|
||||
Reference in New Issue
Block a user