Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Sobo <[email protected]>
  • Loading branch information
Antonio Scandurra authored and Nathan Sobo committed May 19, 2017
1 parent d158e44 commit a7066e3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
"IntersectionObserver",
"FocusEvent",
"requestAnimationFrame",
"HTMLElement"
"HTMLElement",
"snapshotResult"
]
}
}
2 changes: 1 addition & 1 deletion src/main-process/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (typeof snapshotResult !== 'undefined') {
snapshotResult.setGlobals(global, process, global, {}, console, require) // eslint-disable-line no-undef
snapshotResult.setGlobals(global, process, global, {}, console, require)
}

const startTime = Date.now()
Expand Down
20 changes: 10 additions & 10 deletions static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@
if (process.platform === 'win32') {
relativeFilePath = relativeFilePath.replace(/\\/g, '/')
}
let cachedModule = snapshotResult.customRequire.cache[relativeFilePath] // eslint-disable-line no-undef
let cachedModule = snapshotResult.customRequire.cache[relativeFilePath]
if (!cachedModule) {
cachedModule = {exports: Module._load(module, this, false)}
snapshotResult.customRequire.cache[relativeFilePath] = cachedModule // eslint-disable-line no-undef
snapshotResult.customRequire.cache[relativeFilePath] = cachedModule
}
return cachedModule.exports
}

snapshotResult.setGlobals(global, process, window, document, console, require) // eslint-disable-line no-undef
snapshotResult.setGlobals(global, process, window, document, console, require)
}

const FileSystemBlobStore = useSnapshot ? snapshotResult.customRequire('../src/file-system-blob-store.js') : require('../src/file-system-blob-store') // eslint-disable-line no-undef
const FileSystemBlobStore = useSnapshot ? snapshotResult.customRequire('../src/file-system-blob-store.js') : require('../src/file-system-blob-store')
blobStore = FileSystemBlobStore.load(path.join(process.env.ATOM_HOME, 'blob-store'))

const NativeCompileCache = useSnapshot ? snapshotResult.customRequire('../src/native-compile-cache.js') : require('../src/native-compile-cache') // eslint-disable-line no-undef
const NativeCompileCache = useSnapshot ? snapshotResult.customRequire('../src/native-compile-cache.js') : require('../src/native-compile-cache')
NativeCompileCache.setCacheStore(blobStore)
NativeCompileCache.setV8Version(process.versions.v8)
NativeCompileCache.install()
Expand Down Expand Up @@ -88,21 +88,21 @@
}

function setupWindow () {
const CompileCache = useSnapshot ? snapshotResult.customRequire('../src/compile-cache.js') : require('../src/compile-cache') // eslint-disable-line no-undef
const CompileCache = useSnapshot ? snapshotResult.customRequire('../src/compile-cache.js') : require('../src/compile-cache')
CompileCache.setAtomHomeDirectory(process.env.ATOM_HOME)
CompileCache.install(process.resourcesPath, require)

const ModuleCache = useSnapshot ? snapshotResult.customRequire('../src/module-cache.js') : require('../src/module-cache') // eslint-disable-line no-undef
const ModuleCache = useSnapshot ? snapshotResult.customRequire('../src/module-cache.js') : require('../src/module-cache')
ModuleCache.register(getWindowLoadSettings())

const startCrashReporter = useSnapshot ? snapshotResult.customRequire('../src/crash-reporter-start.js') : require('../src/crash-reporter-start') // eslint-disable-line no-undef
const startCrashReporter = useSnapshot ? snapshotResult.customRequire('../src/crash-reporter-start.js') : require('../src/crash-reporter-start')
startCrashReporter({_version: getWindowLoadSettings().appVersion})

const CSON = useSnapshot ? snapshotResult.customRequire('../node_modules/season/lib/cson.js') : require('season') // eslint-disable-line no-undef
const CSON = useSnapshot ? snapshotResult.customRequire('../node_modules/season/lib/cson.js') : require('season')
CSON.setCacheDir(path.join(CompileCache.getCacheDirectory(), 'cson'))

const initScriptPath = path.relative(entryPointDirPath, getWindowLoadSettings().windowInitializationScript)
const initialize = useSnapshot ? snapshotResult.customRequire(initScriptPath) : require(initScriptPath) // eslint-disable-line no-undef
const initialize = useSnapshot ? snapshotResult.customRequire(initScriptPath) : require(initScriptPath)
return initialize({blobStore: blobStore}).then(function () {
electron.ipcRenderer.send('window-command', 'window:loaded')
})
Expand Down

0 comments on commit a7066e3

Please sign in to comment.