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

Appease eslint, allow deliberate unused vars #284

Merged
merged 1 commit into from
Jan 30, 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
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module.exports = {
"no-use-before-define": OFF,
"@typescript-eslint/no-non-null-assertion": OFF,
"@typescript-eslint/no-explicit-any": OFF,
"@typescript-eslint/no-unused-vars": [ERROR, {"varsIgnorePattern": "^_"}],
},
root: true,
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract class WebSocketNetworkAdapter extends NetworkAdapter {
}

export class BrowserWebSocketClientAdapter extends WebSocketNetworkAdapter {
#isReady: boolean = false
#isReady = false
#retryIntervalId?: TimeoutId
#log = debug("automerge-repo:websocket:browser")

Expand Down
2 changes: 2 additions & 0 deletions packages/automerge-repo-react-hooks/src/useDocuments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export const useDocuments = <T>(ids?: DocId[]) => {
handle.doc().then(doc => {
updateDocument(id, doc)
addListener(handle)
}).catch(err => {
console.error(`Error loading document ${id} in useDocuments: `, err)
})
})

Expand Down
2 changes: 1 addition & 1 deletion packages/automerge-repo-storage-nodefs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class NodeFSStorageAdapter extends StorageAdapter {
/**
* @param baseDirectory - The path to the directory to store data in. Defaults to "./automerge-repo-data".
*/
constructor(baseDirectory: string = "automerge-repo-data") {
constructor(baseDirectory = "automerge-repo-data") {
super()
this.baseDirectory = baseDirectory
}
Expand Down
2 changes: 1 addition & 1 deletion packages/automerge-repo/src/DocHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class DocHandle<T> //
#log: debug.Debugger

#machine: DocHandleXstateMachine<T>
#timeoutDelay: number = 60_000
#timeoutDelay = 60_000
#remoteHeads: Record<StorageId, A.Heads> = {}

/** The URL of this document
Expand Down
Loading