lint
This commit is contained in:
		
							parent
							
								
									ba96f2fe74
								
							
						
					
					
						commit
						49f435284f
					
				@ -761,48 +761,48 @@ export class AbstractContent {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * @param {number} offset
 | 
					   * @param {number} _offset
 | 
				
			||||||
   * @return {AbstractContent}
 | 
					   * @return {AbstractContent}
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  splice (offset) {
 | 
					  splice (_offset) {
 | 
				
			||||||
    throw error.methodUnimplemented()
 | 
					    throw error.methodUnimplemented()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * @param {AbstractContent} right
 | 
					   * @param {AbstractContent} _right
 | 
				
			||||||
   * @return {boolean}
 | 
					   * @return {boolean}
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  mergeWith (right) {
 | 
					  mergeWith (_right) {
 | 
				
			||||||
    throw error.methodUnimplemented()
 | 
					    throw error.methodUnimplemented()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * @param {Transaction} transaction
 | 
					   * @param {Transaction} _transaction
 | 
				
			||||||
   * @param {Item} item
 | 
					   * @param {Item} _item
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  integrate (transaction, item) {
 | 
					  integrate (_transaction, _item) {
 | 
				
			||||||
    throw error.methodUnimplemented()
 | 
					    throw error.methodUnimplemented()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * @param {Transaction} transaction
 | 
					   * @param {Transaction} _transaction
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  delete (transaction) {
 | 
					  delete (_transaction) {
 | 
				
			||||||
    throw error.methodUnimplemented()
 | 
					    throw error.methodUnimplemented()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * @param {StructStore} store
 | 
					   * @param {StructStore} _store
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  gc (store) {
 | 
					  gc (_store) {
 | 
				
			||||||
    throw error.methodUnimplemented()
 | 
					    throw error.methodUnimplemented()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
 | 
					   * @param {UpdateEncoderV1 | UpdateEncoderV2} _encoder
 | 
				
			||||||
   * @param {number} offset
 | 
					   * @param {number} _offset
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  write (encoder, offset) {
 | 
					  write (_encoder, _offset) {
 | 
				
			||||||
    throw error.methodUnimplemented()
 | 
					    throw error.methodUnimplemented()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@ import {
 | 
				
			|||||||
  getItemCleanStart,
 | 
					  getItemCleanStart,
 | 
				
			||||||
  isDeleted,
 | 
					  isDeleted,
 | 
				
			||||||
  addToDeleteSet,
 | 
					  addToDeleteSet,
 | 
				
			||||||
  Transaction, Doc, Item, GC, DeleteSet, AbstractType, YEvent // eslint-disable-line
 | 
					  Transaction, Doc, Item, GC, DeleteSet, AbstractType // eslint-disable-line
 | 
				
			||||||
} from '../internals.js'
 | 
					} from '../internals.js'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import * as time from 'lib0/time'
 | 
					import * as time from 'lib0/time'
 | 
				
			||||||
@ -158,7 +158,7 @@ export class UndoManager extends Observable {
 | 
				
			|||||||
   */
 | 
					   */
 | 
				
			||||||
  constructor (typeScope, {
 | 
					  constructor (typeScope, {
 | 
				
			||||||
    captureTimeout = 500,
 | 
					    captureTimeout = 500,
 | 
				
			||||||
    captureTransaction = tr => true,
 | 
					    captureTransaction = _tr => true,
 | 
				
			||||||
    deleteFilter = () => true,
 | 
					    deleteFilter = () => true,
 | 
				
			||||||
    trackedOrigins = new Set([null]),
 | 
					    trackedOrigins = new Set([null]),
 | 
				
			||||||
    ignoreRemoteMapChanges = false,
 | 
					    ignoreRemoteMapChanges = false,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
import { init, compare, applyRandomTests, Doc } from './testHelper.js' // eslint-disable-line
 | 
					import { init } from './testHelper.js' // eslint-disable-line
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import * as Y from '../src/index.js'
 | 
					import * as Y from '../src/index.js'
 | 
				
			||||||
import * as t from 'lib0/testing'
 | 
					import * as t from 'lib0/testing'
 | 
				
			||||||
@ -64,9 +64,9 @@ export const testUndoText = tc => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Test case to fix #241
 | 
					 * Test case to fix #241
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testEmptyTypeScope = tc => {
 | 
					export const testEmptyTypeScope = _tc => {
 | 
				
			||||||
  const ydoc = new Y.Doc()
 | 
					  const ydoc = new Y.Doc()
 | 
				
			||||||
  const um = new Y.UndoManager([], { doc: ydoc })
 | 
					  const um = new Y.UndoManager([], { doc: ydoc })
 | 
				
			||||||
  const yarray = ydoc.getArray()
 | 
					  const yarray = ydoc.getArray()
 | 
				
			||||||
@ -78,9 +78,9 @@ export const testEmptyTypeScope = tc => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Test case to fix #241
 | 
					 * Test case to fix #241
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testDoubleUndo = tc => {
 | 
					export const testDoubleUndo = _tc => {
 | 
				
			||||||
  const doc = new Y.Doc()
 | 
					  const doc = new Y.Doc()
 | 
				
			||||||
  const text = doc.getText()
 | 
					  const text = doc.getText()
 | 
				
			||||||
  text.insert(0, '1221')
 | 
					  text.insert(0, '1221')
 | 
				
			||||||
@ -316,9 +316,9 @@ export const testUndoDeleteFilter = tc => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * This issue has been reported in https://discuss.yjs.dev/t/undomanager-with-external-updates/454/6
 | 
					 * This issue has been reported in https://discuss.yjs.dev/t/undomanager-with-external-updates/454/6
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testUndoUntilChangePerformed = tc => {
 | 
					export const testUndoUntilChangePerformed = _tc => {
 | 
				
			||||||
  const doc = new Y.Doc()
 | 
					  const doc = new Y.Doc()
 | 
				
			||||||
  const doc2 = new Y.Doc()
 | 
					  const doc2 = new Y.Doc()
 | 
				
			||||||
  doc.on('update', update => Y.applyUpdate(doc2, update))
 | 
					  doc.on('update', update => Y.applyUpdate(doc2, update))
 | 
				
			||||||
@ -347,9 +347,9 @@ export const testUndoUntilChangePerformed = tc => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * This issue has been reported in https://github.com/yjs/yjs/issues/317
 | 
					 * This issue has been reported in https://github.com/yjs/yjs/issues/317
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testUndoNestedUndoIssue = tc => {
 | 
					export const testUndoNestedUndoIssue = _tc => {
 | 
				
			||||||
  const doc = new Y.Doc({ gc: false })
 | 
					  const doc = new Y.Doc({ gc: false })
 | 
				
			||||||
  const design = doc.getMap()
 | 
					  const design = doc.getMap()
 | 
				
			||||||
  const undoManager = new Y.UndoManager(design, { captureTimeout: 0 })
 | 
					  const undoManager = new Y.UndoManager(design, { captureTimeout: 0 })
 | 
				
			||||||
@ -403,9 +403,9 @@ export const testUndoNestedUndoIssue = tc => {
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * This issue has been reported in https://github.com/yjs/yjs/issues/355
 | 
					 * This issue has been reported in https://github.com/yjs/yjs/issues/355
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testConsecutiveRedoBug = tc => {
 | 
					export const testConsecutiveRedoBug = _tc => {
 | 
				
			||||||
  const doc = new Y.Doc()
 | 
					  const doc = new Y.Doc()
 | 
				
			||||||
  const yRoot = doc.getMap()
 | 
					  const yRoot = doc.getMap()
 | 
				
			||||||
  const undoMgr = new Y.UndoManager(yRoot)
 | 
					  const undoMgr = new Y.UndoManager(yRoot)
 | 
				
			||||||
@ -454,9 +454,9 @@ export const testConsecutiveRedoBug = tc => {
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * This issue has been reported in https://github.com/yjs/yjs/issues/304
 | 
					 * This issue has been reported in https://github.com/yjs/yjs/issues/304
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testUndoXmlBug = tc => {
 | 
					export const testUndoXmlBug = _tc => {
 | 
				
			||||||
  const origin = 'origin'
 | 
					  const origin = 'origin'
 | 
				
			||||||
  const doc = new Y.Doc()
 | 
					  const doc = new Y.Doc()
 | 
				
			||||||
  const fragment = doc.getXmlFragment('t')
 | 
					  const fragment = doc.getXmlFragment('t')
 | 
				
			||||||
@ -499,9 +499,9 @@ export const testUndoXmlBug = tc => {
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * This issue has been reported in https://github.com/yjs/yjs/issues/343
 | 
					 * This issue has been reported in https://github.com/yjs/yjs/issues/343
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testUndoBlockBug = tc => {
 | 
					export const testUndoBlockBug = _tc => {
 | 
				
			||||||
  const doc = new Y.Doc({ gc: false })
 | 
					  const doc = new Y.Doc({ gc: false })
 | 
				
			||||||
  const design = doc.getMap()
 | 
					  const design = doc.getMap()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -559,9 +559,9 @@ export const testUndoBlockBug = tc => {
 | 
				
			|||||||
 * Undo text formatting delete should not corrupt peer state.
 | 
					 * Undo text formatting delete should not corrupt peer state.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @see https://github.com/yjs/yjs/issues/392
 | 
					 * @see https://github.com/yjs/yjs/issues/392
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testUndoDeleteTextFormat = tc => {
 | 
					export const testUndoDeleteTextFormat = _tc => {
 | 
				
			||||||
  const doc = new Y.Doc()
 | 
					  const doc = new Y.Doc()
 | 
				
			||||||
  const text = doc.getText()
 | 
					  const text = doc.getText()
 | 
				
			||||||
  text.insert(0, 'Attack ships on fire off the shoulder of Orion.')
 | 
					  text.insert(0, 'Attack ships on fire off the shoulder of Orion.')
 | 
				
			||||||
@ -597,9 +597,9 @@ export const testUndoDeleteTextFormat = tc => {
 | 
				
			|||||||
 * Undo text formatting delete should not corrupt peer state.
 | 
					 * Undo text formatting delete should not corrupt peer state.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @see https://github.com/yjs/yjs/issues/392
 | 
					 * @see https://github.com/yjs/yjs/issues/392
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testBehaviorOfIgnoreremotemapchangesProperty = tc => {
 | 
					export const testBehaviorOfIgnoreremotemapchangesProperty = _tc => {
 | 
				
			||||||
  const doc = new Y.Doc()
 | 
					  const doc = new Y.Doc()
 | 
				
			||||||
  const doc2 = new Y.Doc()
 | 
					  const doc2 = new Y.Doc()
 | 
				
			||||||
  doc.on('update', update => Y.applyUpdate(doc2, update, doc))
 | 
					  doc.on('update', update => Y.applyUpdate(doc2, update, doc))
 | 
				
			||||||
@ -620,9 +620,9 @@ export const testBehaviorOfIgnoreremotemapchangesProperty = tc => {
 | 
				
			|||||||
 * Special deletion case.
 | 
					 * Special deletion case.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @see https://github.com/yjs/yjs/issues/447
 | 
					 * @see https://github.com/yjs/yjs/issues/447
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} _tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const testSpecialDeletionCase = tc => {
 | 
					export const testSpecialDeletionCase = _tc => {
 | 
				
			||||||
  const origin = 'undoable'
 | 
					  const origin = 'undoable'
 | 
				
			||||||
  const doc = new Y.Doc()
 | 
					  const doc = new Y.Doc()
 | 
				
			||||||
  const fragment = doc.getXmlFragment()
 | 
					  const fragment = doc.getXmlFragment()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user