fix linting issues

This commit is contained in:
Philip Weiss
2018-02-26 15:56:36 -08:00
parent 48d3677664
commit 8567b8feea

View File

@@ -346,18 +346,13 @@ class Project extends Model {
// * `exact` If `true`, only add `projectPath` if it names an existing directory. If `false`, if `projectPath` is a
// a file or does not exist, its parent directory will be added instead.
addPath (projectPath, options = {}) {
const directory = this.getDirectoryForProjectPath(projectPath)
if (projectPath === "/Users/foo/baz") {
console.log("ree", directory)
}
let ok = true
if (options.exact === true) {
ok = (directory.getPath() === projectPath)
}
ok = ok && directory.existsSync()
if (!ok) {
if (options.mustExist === true) {
const err = new Error(`Project directory ${directory} does not exist`)
@@ -372,7 +367,6 @@ class Project extends Model {
if (existingDirectory.getPath() === directory.getPath()) { return }
}
this.rootDirectories.push(directory)
const didChangeCallback = events => {
@@ -382,6 +376,7 @@ class Project extends Model {
this.emitter.emit('did-change-files', events)
}
}
// We'll use the directory's custom onDidChangeFiles callback, if available.
// CustomDirectory::onDidChangeFiles should match the signature of
// Project::onDidChangeFiles below (although it may resolve asynchronously)