chore: add noUnusedLocals and noUnusedParameters rules (#3476)

Co-authored-by: LongYinan <lynweklm@gmail.com>
This commit is contained in:
Alex Yang
2023-07-30 22:47:37 -07:00
committed by GitHub
parent 5a8c1dcb57
commit 1d43e46f99
14 changed files with 17 additions and 16 deletions

View File

@@ -45,7 +45,7 @@ type SubdocEvent = {
const docUpdateCallbackWeakMap = new WeakMap<Doc, UpdateCallback>();
const createMonitor = (doc: Doc) => {
const onUpdate: UpdateCallback = (update, origin) => {
const onUpdate: UpdateCallback = (_, origin) => {
if (process.env.NODE_ENV === 'development') {
if (typeof origin !== 'string' && typeof origin !== 'number') {
console.warn(

View File

@@ -32,14 +32,14 @@ const mockedAddBlob = vi.fn();
vi.stubGlobal('window', {
apis: {
db: {
getDocAsUpdates: async (workspaceId, guid) => {
getDocAsUpdates: async (_, guid) => {
const subdoc = guid ? getDoc(offlineYdoc, guid) : offlineYdoc;
if (!subdoc) {
return false;
}
return Y.encodeStateAsUpdate(subdoc);
},
applyDocUpdate: async (id, update, subdocId) => {
applyDocUpdate: async (_, update, subdocId) => {
const subdoc = subdocId ? getDoc(offlineYdoc, subdocId) : offlineYdoc;
if (!subdoc) {
return;