mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
👕 Fix linter errors
This commit is contained in:
@@ -12,7 +12,7 @@ describe("FileRecoveryService", () => {
|
||||
let mockWindow, recoveryService, recoveryDirectory
|
||||
|
||||
beforeEach(() => {
|
||||
mockWindow = new Emitter
|
||||
mockWindow = new Emitter()
|
||||
recoveryDirectory = temp.mkdirSync()
|
||||
recoveryService = new FileRecoveryService(recoveryDirectory)
|
||||
})
|
||||
@@ -32,7 +32,7 @@ describe("FileRecoveryService", () => {
|
||||
})
|
||||
|
||||
it("creates many recovery files and deletes them when many windows attempt to save the same file", () => {
|
||||
const anotherMockWindow = new Emitter
|
||||
const anotherMockWindow = new Emitter()
|
||||
let filePath = temp.path()
|
||||
|
||||
fs.writeFileSync(filePath, "some content")
|
||||
|
||||
@@ -8,8 +8,8 @@ import fs from 'fs-plus'
|
||||
export default class FileRecoveryService {
|
||||
constructor (recoveryDirectory) {
|
||||
this.recoveryDirectory = recoveryDirectory
|
||||
this.recoveryPathsByWindowAndFilePath = new WeakMap
|
||||
this.crashListeners = new WeakSet
|
||||
this.recoveryPathsByWindowAndFilePath = new WeakMap()
|
||||
this.crashListeners = new WeakSet()
|
||||
}
|
||||
|
||||
start () {
|
||||
@@ -29,7 +29,7 @@ export default class FileRecoveryService {
|
||||
fs.writeFileSync(recoveryPath, fs.readFileSync(path))
|
||||
|
||||
if (!this.recoveryPathsByWindowAndFilePath.has(window)) {
|
||||
this.recoveryPathsByWindowAndFilePath.set(window, new Map)
|
||||
this.recoveryPathsByWindowAndFilePath.set(window, new Map())
|
||||
}
|
||||
this.recoveryPathsByWindowAndFilePath.get(window).set(path, recoveryPath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user