refactor(eslint): use cordova-eslint /w fix
diff --git a/.eslintrc.yml b/.eslintrc.yml
index 0cccb8c..17277f7 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -1,10 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 root: true
-extends: semistandard
-rules:
-  indent:
-    - error
-    - 4
-  camelcase: off
-  padded-blocks: off
-  operator-linebreak: off
-  no-throw-literal: off
\ No newline at end of file
+extends: '@cordova/eslint-config/browser'
+
+overrides:
+    - files: [tests/**/*.js]
+      extends: '@cordova/eslint-config/node-tests'
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 177bbf9..0000000
--- a/.jshintrc
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-    "browser": true
-  , "devel": true
-  , "bitwise": true
-  , "undef": true
-  , "trailing": true
-  , "quotmark": false
-  , "indent": 4
-  , "unused": "vars"
-  , "latedef": "nofunc"
-  , "globals": {
-        "module": false,
-        "exports": false,
-        "require": false,
-        "cordova": false,
-        "File": true,
-        "FileSystem": true,
-        "FileReader": true,
-        "FileWriter": true,
-        "FileError": true,
-        "LocalFileSystem": true,
-        "Metadata": true,
-        "Flags": true,
-        "DirectoryEntry": true,
-        "resolveLocalFileSystemURL": false,
-        "requestFileSystem": true,
-        "FILESYSTEM_PREFIX": true,
-        "FILESYSTEM_PROTOCOL": true
-    }
-}
diff --git a/package.json b/package.json
index 3531978..f3e2e43 100644
--- a/package.json
+++ b/package.json
@@ -26,8 +26,8 @@
     "cordova-windows"
   ],
   "scripts": {
-    "test": "npm run eslint",
-    "eslint": "node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src && node node_modules/eslint/bin/eslint tests"
+    "test": "npm run lint",
+    "lint": "eslint ."
   },
   "author": "Apache Software Foundation",
   "license": "Apache-2.0",
@@ -42,12 +42,6 @@
     }
   },
   "devDependencies": {
-    "eslint": "^3.19.0",
-    "eslint-config-semistandard": "^11.0.0",
-    "eslint-config-standard": "^10.2.1",
-    "eslint-plugin-import": "^2.3.0",
-    "eslint-plugin-node": "^5.0.0",
-    "eslint-plugin-promise": "^3.5.0",
-    "eslint-plugin-standard": "^3.0.1"
+    "@cordova/eslint-config": "^3.0.0"
   }
 }
diff --git a/src/browser/FileProxy.js b/src/browser/FileProxy.js
index 17955b6..3ce0bc5 100644
--- a/src/browser/FileProxy.js
+++ b/src/browser/FileProxy.js
@@ -18,6 +18,7 @@
  * under the License.
  *
  */
+
 (function () {
     /* global require, exports, module */
     /* global FILESYSTEM_PREFIX */
@@ -32,7 +33,7 @@
     if (require('./isChrome')()) {
         var pathsPrefix = {
             // Read-only directory where the application is installed.
-            applicationDirectory: location.origin + '/', // eslint-disable-line no-undef
+            applicationDirectory: location.origin + '/',
             // Where to put app-specific data files.
             dataDirectory: 'filesystem:file:///persistent/',
             // Cached files that should survive app restarts.
@@ -56,11 +57,6 @@
     var File = require('./File');
 
     (function (exports, global) {
-        var indexedDB = global.indexedDB || global.mozIndexedDB;
-        if (!indexedDB) {
-            throw 'Firefox OS File plugin: indexedDB not supported';
-        }
-
         var fs_ = null;
 
         var idb_ = {};
@@ -71,7 +67,7 @@
 
         var pathsPrefix = {
             // Read-only directory where the application is installed.
-            applicationDirectory: location.origin + '/', // eslint-disable-line no-undef
+            applicationDirectory: location.origin + '/',
             // Where to put app-specific data files.
             dataDirectory: 'file:///persistent/',
             // Cached files that should survive app restarts.
@@ -81,13 +77,10 @@
 
         var unicodeLastChar = 65535;
 
-    /** * Exported functionality ***/
+        /** * Exported functionality ***/
 
         exports.requestFileSystem = function (successCallback, errorCallback, args) {
             var type = args[0];
-            // Size is ignored since IDB filesystem size depends
-            // on browser implementation and can't be set up by user
-            var size = args[1]; // eslint-disable-line no-unused-vars
 
             if (type !== LocalFileSystem.TEMPORARY && type !== LocalFileSystem.PERSISTENT) {
                 if (errorCallback) {
@@ -97,14 +90,18 @@
             }
 
             var name = type === LocalFileSystem.TEMPORARY ? 'temporary' : 'persistent';
-            var storageName = (location.protocol + location.host).replace(/:/g, '_'); // eslint-disable-line no-undef
+            var storageName = (location.protocol + location.host).replace(/:/g, '_');
 
             var root = new DirectoryEntry('', DIR_SEPARATOR);
             fs_ = new FileSystem(name, root);
 
-            idb_.open(storageName, function () {
-                successCallback(fs_);
-            }, errorCallback);
+            idb_.open(
+                storageName,
+                function () {
+                    successCallback(fs_);
+                },
+                errorCallback
+            );
         };
 
         // Overridden by Android, BlackBerry 10 and iOS to populate fsMap
@@ -122,15 +119,24 @@
 
             var path = resolveToFullPath_(fullPath);
 
-            exports.getDirectory(function () {
-                idb_.getAllEntries(path.fullPath + DIR_SEPARATOR, path.storagePath, function (entries) {
-                    successCallback(entries);
-                }, errorCallback);
-            }, function () {
-                if (errorCallback) {
-                    errorCallback(FileError.NOT_FOUND_ERR);
-                }
-            }, [path.storagePath, path.fullPath, {create: false}]);
+            exports.getDirectory(
+                function () {
+                    idb_.getAllEntries(
+                        path.fullPath + DIR_SEPARATOR,
+                        path.storagePath,
+                        function (entries) {
+                            successCallback(entries);
+                        },
+                        errorCallback
+                    );
+                },
+                function () {
+                    if (errorCallback) {
+                        errorCallback(FileError.NOT_FOUND_ERR);
+                    }
+                },
+                [path.storagePath, path.fullPath, { create: false }]
+            );
         };
 
         exports.getFile = function (successCallback, errorCallback, args) {
@@ -141,103 +147,121 @@
             // Create an absolute path if we were handed a relative one.
             path = resolveToFullPath_(fullPath, path);
 
-            idb_.get(path.storagePath, function (fileEntry) {
-                if (options.create === true && options.exclusive === true && fileEntry) {
-                    // If create and exclusive are both true, and the path already exists,
-                    // getFile must fail.
+            idb_.get(
+                path.storagePath,
+                function (fileEntry) {
+                    if (options.create === true && options.exclusive === true && fileEntry) {
+                        // If create and exclusive are both true, and the path already exists,
+                        // getFile must fail.
 
-                    if (errorCallback) {
-                        errorCallback(FileError.PATH_EXISTS_ERR);
-                    }
-                } else if (options.create === true && !fileEntry) {
-                    // If create is true, the path doesn't exist, and no other error occurs,
-                    // getFile must create it as a zero-length file and return a corresponding
-                    // FileEntry.
-                    var newFileEntry = new FileEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root));
-
-                    newFileEntry.file_ = new MyFile({
-                        size: 0,
-                        name: newFileEntry.name,
-                        lastModifiedDate: new Date(),
-                        storagePath: path.storagePath
-                    });
-
-                    idb_.put(newFileEntry, path.storagePath, successCallback, errorCallback);
-                } else if (options.create === true && fileEntry) {
-                    if (fileEntry.isFile) {
-                        // Overwrite file, delete then create new.
-                        idb_['delete'](path.storagePath, function () {
-                            var newFileEntry = new FileEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root));
-
-                            newFileEntry.file_ = new MyFile({
-                                size: 0,
-                                name: newFileEntry.name,
-                                lastModifiedDate: new Date(),
-                                storagePath: path.storagePath
-                            });
-
-                            idb_.put(newFileEntry, path.storagePath, successCallback, errorCallback);
-                        }, errorCallback);
-                    } else {
                         if (errorCallback) {
-                            errorCallback(FileError.INVALID_MODIFICATION_ERR);
+                            errorCallback(FileError.PATH_EXISTS_ERR);
                         }
-                    }
-                } else if ((!options.create || options.create === false) && !fileEntry) {
-                    // If create is not true and the path doesn't exist, getFile must fail.
-                    if (errorCallback) {
-                        errorCallback(FileError.NOT_FOUND_ERR);
-                    }
-                } else if ((!options.create || options.create === false) && fileEntry &&
-                    fileEntry.isDirectory) {
-                    // If create is not true and the path exists, but is a directory, getFile
-                    // must fail.
-                    if (errorCallback) {
-                        errorCallback(FileError.TYPE_MISMATCH_ERR);
-                    }
-                } else {
-                    // Otherwise, if no other error occurs, getFile must return a FileEntry
-                    // corresponding to path.
+                    } else if (options.create === true && !fileEntry) {
+                        // If create is true, the path doesn't exist, and no other error occurs,
+                        // getFile must create it as a zero-length file and return a corresponding
+                        // FileEntry.
+                        var newFileEntry = new FileEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root));
 
-                    successCallback(fileEntryFromIdbEntry(fileEntry));
-                }
-            }, errorCallback);
+                        newFileEntry.file_ = new MyFile({
+                            size: 0,
+                            name: newFileEntry.name,
+                            lastModifiedDate: new Date(),
+                            storagePath: path.storagePath
+                        });
+
+                        idb_.put(newFileEntry, path.storagePath, successCallback, errorCallback);
+                    } else if (options.create === true && fileEntry) {
+                        if (fileEntry.isFile) {
+                            // Overwrite file, delete then create new.
+                            idb_.delete(
+                                path.storagePath,
+                                function () {
+                                    var newFileEntry = new FileEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root));
+
+                                    newFileEntry.file_ = new MyFile({
+                                        size: 0,
+                                        name: newFileEntry.name,
+                                        lastModifiedDate: new Date(),
+                                        storagePath: path.storagePath
+                                    });
+
+                                    idb_.put(newFileEntry, path.storagePath, successCallback, errorCallback);
+                                },
+                                errorCallback
+                            );
+                        } else {
+                            if (errorCallback) {
+                                errorCallback(FileError.INVALID_MODIFICATION_ERR);
+                            }
+                        }
+                    } else if ((!options.create || options.create === false) && !fileEntry) {
+                        // If create is not true and the path doesn't exist, getFile must fail.
+                        if (errorCallback) {
+                            errorCallback(FileError.NOT_FOUND_ERR);
+                        }
+                    } else if ((!options.create || options.create === false) && fileEntry && fileEntry.isDirectory) {
+                        // If create is not true and the path exists, but is a directory, getFile
+                        // must fail.
+                        if (errorCallback) {
+                            errorCallback(FileError.TYPE_MISMATCH_ERR);
+                        }
+                    } else {
+                        // Otherwise, if no other error occurs, getFile must return a FileEntry
+                        // corresponding to path.
+
+                        successCallback(fileEntryFromIdbEntry(fileEntry));
+                    }
+                },
+                errorCallback
+            );
         };
 
         exports.getFileMetadata = function (successCallback, errorCallback, args) {
             var fullPath = args[0];
 
-            exports.getFile(function (fileEntry) {
-                successCallback(new File(fileEntry.file_.name, fileEntry.fullPath, '', fileEntry.file_.lastModifiedDate,
-                    fileEntry.file_.size));
-            }, errorCallback, [fullPath, null]);
+            exports.getFile(
+                function (fileEntry) {
+                    successCallback(
+                        new File(fileEntry.file_.name, fileEntry.fullPath, '', fileEntry.file_.lastModifiedDate, fileEntry.file_.size)
+                    );
+                },
+                errorCallback,
+                [fullPath, null]
+            );
         };
 
         exports.getMetadata = function (successCallback, errorCallback, args) {
-            exports.getFile(function (fileEntry) {
-                successCallback(
-                    {
+            exports.getFile(
+                function (fileEntry) {
+                    successCallback({
                         modificationTime: fileEntry.file_.lastModifiedDate,
                         size: fileEntry.file_.lastModifiedDate
                     });
-            }, errorCallback, args);
+                },
+                errorCallback,
+                args
+            );
         };
 
         exports.setMetadata = function (successCallback, errorCallback, args) {
             var fullPath = args[0];
             var metadataObject = args[1];
 
-            exports.getFile(function (fileEntry) {
-                fileEntry.file_.lastModifiedDate = metadataObject.modificationTime;
-                idb_.put(fileEntry, fileEntry.file_.storagePath, successCallback, errorCallback);
-            }, errorCallback, [fullPath, null]);
+            exports.getFile(
+                function (fileEntry) {
+                    fileEntry.file_.lastModifiedDate = metadataObject.modificationTime;
+                    idb_.put(fileEntry, fileEntry.file_.storagePath, successCallback, errorCallback);
+                },
+                errorCallback,
+                [fullPath, null]
+            );
         };
 
         exports.write = function (successCallback, errorCallback, args) {
             var fileName = args[0];
             var data = args[1];
             var position = args[2];
-            var isBinary = args[3]; // eslint-disable-line no-unused-vars
 
             if (!data) {
                 if (errorCallback) {
@@ -247,41 +271,49 @@
             }
 
             if (typeof data === 'string' || data instanceof String) {
-                data = new Blob([data]); // eslint-disable-line no-undef
+                data = new Blob([data]);
             }
 
-            exports.getFile(function (fileEntry) {
-                var blob_ = fileEntry.file_.blob_;
+            exports.getFile(
+                function (fileEntry) {
+                    var blob_ = fileEntry.file_.blob_;
 
-                if (!blob_) {
-                    blob_ = new Blob([data], {type: data.type}); // eslint-disable-line no-undef
-                } else {
-                    // Calc the head and tail fragments
-                    var head = blob_.slice(0, position);
-                    var tail = blob_.slice(position + (data.size || data.byteLength));
+                    if (!blob_) {
+                        blob_ = new Blob([data], { type: data.type });
+                    } else {
+                        // Calc the head and tail fragments
+                        var head = blob_.slice(0, position);
+                        var tail = blob_.slice(position + (data.size || data.byteLength));
 
-                    // Calc the padding
-                    var padding = position - head.size;
-                    if (padding < 0) {
-                        padding = 0;
+                        // Calc the padding
+                        var padding = position - head.size;
+                        if (padding < 0) {
+                            padding = 0;
+                        }
+
+                        // Do the "write". In fact, a full overwrite of the Blob.
+                        blob_ = new Blob([head, new Uint8Array(padding), data, tail], { type: data.type });
                     }
 
-                    // Do the "write". In fact, a full overwrite of the Blob.
-                    blob_ = new Blob([head, new Uint8Array(padding), data, tail], // eslint-disable-line no-undef
-                        {type: data.type});
-                }
+                    // Set the blob we're writing on this file entry so we can recall it later.
+                    fileEntry.file_.blob_ = blob_;
+                    fileEntry.file_.lastModifiedDate = new Date() || null;
+                    fileEntry.file_.size = blob_.size;
+                    fileEntry.file_.name = blob_.name;
+                    fileEntry.file_.type = blob_.type;
 
-                // Set the blob we're writing on this file entry so we can recall it later.
-                fileEntry.file_.blob_ = blob_;
-                fileEntry.file_.lastModifiedDate = new Date() || null;
-                fileEntry.file_.size = blob_.size;
-                fileEntry.file_.name = blob_.name;
-                fileEntry.file_.type = blob_.type;
-
-                idb_.put(fileEntry, fileEntry.file_.storagePath, function () {
-                    successCallback(data.size || data.byteLength);
-                }, errorCallback);
-            }, errorCallback, [fileName, null]);
+                    idb_.put(
+                        fileEntry,
+                        fileEntry.file_.storagePath,
+                        function () {
+                            successCallback(data.size || data.byteLength);
+                        },
+                        errorCallback
+                    );
+                },
+                errorCallback,
+                [fileName, null]
+            );
         };
 
         exports.readAsText = function (successCallback, errorCallback, args) {
@@ -331,20 +363,31 @@
             function deleteEntry (isDirectory) {
                 // TODO: This doesn't protect against directories that have content in it.
                 // Should throw an error instead if the dirEntry is not empty.
-                idb_['delete'](fullPath, function () {
-                    successCallback();
-                }, function () {
-                    if (errorCallback) { errorCallback(); }
-                }, isDirectory);
+                idb_.delete(
+                    fullPath,
+                    function () {
+                        successCallback();
+                    },
+                    function () {
+                        if (errorCallback) {
+                            errorCallback();
+                        }
+                    },
+                    isDirectory
+                );
             }
 
             // We need to to understand what we are deleting:
-            exports.getDirectory(function (entry) {
-                deleteEntry(entry.isDirectory);
-            }, function () {
-                // DirectoryEntry was already deleted or entry is FileEntry
-                deleteEntry(false);
-            }, [fullPath, null, {create: false}]);
+            exports.getDirectory(
+                function (entry) {
+                    deleteEntry(entry.isDirectory);
+                },
+                function () {
+                    // DirectoryEntry was already deleted or entry is FileEntry
+                    deleteEntry(false);
+                },
+                [fullPath, null, { create: false }]
+            );
         };
 
         exports.getDirectory = function (successCallback, errorCallback, args) {
@@ -355,74 +398,77 @@
             // Create an absolute path if we were handed a relative one.
             path = resolveToFullPath_(fullPath, path);
 
-            idb_.get(path.storagePath, function (folderEntry) {
-                if (!options) {
-                    options = {};
-                }
-
-                if (options.create === true && options.exclusive === true && folderEntry) {
-                    // If create and exclusive are both true, and the path already exists,
-                    // getDirectory must fail.
-                    if (errorCallback) {
-                        errorCallback(FileError.PATH_EXISTS_ERR);
+            idb_.get(
+                path.storagePath,
+                function (folderEntry) {
+                    if (!options) {
+                        options = {};
                     }
-                    // There is a strange bug in mobilespec + FF, which results in coming to multiple else-if's
-                    // so we are shielding from it with returns.
-                    return;
-                }
 
-                if (options.create === true && !folderEntry) {
-                    // If create is true, the path doesn't exist, and no other error occurs,
-                    // getDirectory must create it as a zero-length file and return a corresponding
-                    // MyDirectoryEntry.
-                    var dirEntry = new DirectoryEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root));
-
-                    idb_.put(dirEntry, path.storagePath, successCallback, errorCallback);
-                    return;
-                }
-
-                if (options.create === true && folderEntry) {
-
-                    if (folderEntry.isDirectory) {
-                        // IDB won't save methods, so we need re-create the MyDirectoryEntry.
-                        successCallback(new DirectoryEntry(folderEntry.name, folderEntry.fullPath, folderEntry.filesystem));
-                    } else {
+                    if (options.create === true && options.exclusive === true && folderEntry) {
+                        // If create and exclusive are both true, and the path already exists,
+                        // getDirectory must fail.
                         if (errorCallback) {
-                            errorCallback(FileError.INVALID_MODIFICATION_ERR);
+                            errorCallback(FileError.PATH_EXISTS_ERR);
                         }
-                    }
-                    return;
-                }
-
-                if ((!options.create || options.create === false) && !folderEntry) {
-                    // Handle root special. It should always exist.
-                    if (path.fullPath === DIR_SEPARATOR) {
-                        successCallback(fs_.root);
+                        // There is a strange bug in mobilespec + FF, which results in coming to multiple else-if's
+                        // so we are shielding from it with returns.
                         return;
                     }
 
-                    // If create is not true and the path doesn't exist, getDirectory must fail.
-                    if (errorCallback) {
-                        errorCallback(FileError.NOT_FOUND_ERR);
+                    if (options.create === true && !folderEntry) {
+                        // If create is true, the path doesn't exist, and no other error occurs,
+                        // getDirectory must create it as a zero-length file and return a corresponding
+                        // MyDirectoryEntry.
+                        var dirEntry = new DirectoryEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root));
+
+                        idb_.put(dirEntry, path.storagePath, successCallback, errorCallback);
+                        return;
                     }
 
-                    return;
-                }
-                if ((!options.create || options.create === false) && folderEntry && folderEntry.isFile) {
-                    // If create is not true and the path exists, but is a file, getDirectory
-                    // must fail.
-                    if (errorCallback) {
-                        errorCallback(FileError.TYPE_MISMATCH_ERR);
+                    if (options.create === true && folderEntry) {
+                        if (folderEntry.isDirectory) {
+                            // IDB won't save methods, so we need re-create the MyDirectoryEntry.
+                            successCallback(new DirectoryEntry(folderEntry.name, folderEntry.fullPath, folderEntry.filesystem));
+                        } else {
+                            if (errorCallback) {
+                                errorCallback(FileError.INVALID_MODIFICATION_ERR);
+                            }
+                        }
+                        return;
                     }
-                    return;
-                }
 
-                // Otherwise, if no other error occurs, getDirectory must return a
-                // MyDirectoryEntry corresponding to path.
+                    if ((!options.create || options.create === false) && !folderEntry) {
+                        // Handle root special. It should always exist.
+                        if (path.fullPath === DIR_SEPARATOR) {
+                            successCallback(fs_.root);
+                            return;
+                        }
 
-                // IDB won't' save methods, so we need re-create MyDirectoryEntry.
-                successCallback(new DirectoryEntry(folderEntry.name, folderEntry.fullPath, folderEntry.filesystem));
-            }, errorCallback);
+                        // If create is not true and the path doesn't exist, getDirectory must fail.
+                        if (errorCallback) {
+                            errorCallback(FileError.NOT_FOUND_ERR);
+                        }
+
+                        return;
+                    }
+                    if ((!options.create || options.create === false) && folderEntry && folderEntry.isFile) {
+                        // If create is not true and the path exists, but is a file, getDirectory
+                        // must fail.
+                        if (errorCallback) {
+                            errorCallback(FileError.TYPE_MISMATCH_ERR);
+                        }
+                        return;
+                    }
+
+                    // Otherwise, if no other error occurs, getDirectory must return a
+                    // MyDirectoryEntry corresponding to path.
+
+                    // IDB won't' save methods, so we need re-create MyDirectoryEntry.
+                    successCallback(new DirectoryEntry(folderEntry.name, folderEntry.fullPath, folderEntry.filesystem));
+                },
+                errorCallback
+            );
         };
 
         exports.getParent = function (successCallback, errorCallback, args) {
@@ -435,8 +481,7 @@
             // file:///persistent/path/to/file or
             // file:///persistent/path/to/directory/
 
-            if (fullPath === DIR_SEPARATOR || fullPath === pathsPrefix.cacheDirectory ||
-                fullPath === pathsPrefix.dataDirectory) {
+            if (fullPath === DIR_SEPARATOR || fullPath === pathsPrefix.cacheDirectory || fullPath === pathsPrefix.dataDirectory) {
                 successCallback(fs_.root);
                 return;
             }
@@ -452,13 +497,13 @@
             var path = pathArr.join(DIR_SEPARATOR) + DIR_SEPARATOR;
 
             // To get parent of root files
-            var joined = path + parentName + DIR_SEPARATOR;// is like this: file:///persistent/
+            var joined = path + parentName + DIR_SEPARATOR; // is like this: file:///persistent/
             if (joined === pathsPrefix.cacheDirectory || joined === pathsPrefix.dataDirectory) {
-                exports.getDirectory(successCallback, errorCallback, [joined, DIR_SEPARATOR, {create: false}]);
+                exports.getDirectory(successCallback, errorCallback, [joined, DIR_SEPARATOR, { create: false }]);
                 return;
             }
 
-            exports.getDirectory(successCallback, errorCallback, [path, parentName, {create: false}]);
+            exports.getDirectory(successCallback, errorCallback, [path, parentName, { create: false }]);
         };
 
         exports.copyTo = function (successCallback, errorCallback, args) {
@@ -475,41 +520,56 @@
             }
 
             // Read src file
-            exports.getFile(function (srcFileEntry) {
-
-                var path = resolveToFullPath_(parentFullPath);
-                // Check directory
-                exports.getDirectory(function () {
-
-                    // Create dest file
-                    exports.getFile(function (dstFileEntry) {
-
-                        exports.write(function () {
-                            successCallback(dstFileEntry);
-                        }, errorCallback, [dstFileEntry.file_.storagePath, srcFileEntry.file_.blob_, 0]);
-
-                    }, errorCallback, [parentFullPath, name, {create: true}]);
-
-                }, function () { if (errorCallback) { errorCallback(FileError.NOT_FOUND_ERR); } },
-                [path.storagePath, null, {create: false}]);
-
-            }, errorCallback, [srcPath, null]);
+            exports.getFile(
+                function (srcFileEntry) {
+                    var path = resolveToFullPath_(parentFullPath);
+                    // Check directory
+                    exports.getDirectory(
+                        function () {
+                            // Create dest file
+                            exports.getFile(
+                                function (dstFileEntry) {
+                                    exports.write(
+                                        function () {
+                                            successCallback(dstFileEntry);
+                                        },
+                                        errorCallback,
+                                        [dstFileEntry.file_.storagePath, srcFileEntry.file_.blob_, 0]
+                                    );
+                                },
+                                errorCallback,
+                                [parentFullPath, name, { create: true }]
+                            );
+                        },
+                        function () {
+                            if (errorCallback) {
+                                errorCallback(FileError.NOT_FOUND_ERR);
+                            }
+                        },
+                        [path.storagePath, null, { create: false }]
+                    );
+                },
+                errorCallback,
+                [srcPath, null]
+            );
         };
 
         exports.moveTo = function (successCallback, errorCallback, args) {
             var srcPath = args[0];
-            // parentFullPath and name parameters is ignored because
-            // args is being passed downstream to exports.copyTo method
-            var parentFullPath = args[1]; // eslint-disable-line
-            var name = args[2]; // eslint-disable-line
 
-            exports.copyTo(function (fileEntry) {
-
-                exports.remove(function () {
-                    successCallback(fileEntry);
-                }, errorCallback, [srcPath]);
-
-            }, errorCallback, args);
+            exports.copyTo(
+                function (fileEntry) {
+                    exports.remove(
+                        function () {
+                            successCallback(fileEntry);
+                        },
+                        errorCallback,
+                        [srcPath]
+                    );
+                },
+                errorCallback,
+                args
+            );
         };
 
         exports.resolveLocalFileSystemURI = function (successCallback, errorCallback, args) {
@@ -521,7 +581,7 @@
             }
 
             // support for encodeURI
-            if (/\%5/g.test(path) || /\%20/g.test(path)) {  // eslint-disable-line no-useless-escape
+            if (/%5/g.test(path) || /%20/g.test(path)) {
                 path = decodeURI(path);
             }
 
@@ -578,36 +638,54 @@
                 path = path.substring(pathsPrefix.dataDirectory.length - 1);
                 path = handlePathSlashes(path);
 
-                exports.requestFileSystem(function () {
-                    exports.getFile(successCallback, function () {
-                        exports.getDirectory(successCallback, errorCallback, [pathsPrefix.dataDirectory, path,
-                        {create: false}]);
-                    }, [pathsPrefix.dataDirectory, path, {create: false}]);
-                }, errorCallback, [LocalFileSystem.PERSISTENT]);
+                exports.requestFileSystem(
+                    function () {
+                        exports.getFile(
+                            successCallback,
+                            function () {
+                                exports.getDirectory(successCallback, errorCallback, [pathsPrefix.dataDirectory, path, { create: false }]);
+                            },
+                            [pathsPrefix.dataDirectory, path, { create: false }]
+                        );
+                    },
+                    errorCallback,
+                    [LocalFileSystem.PERSISTENT]
+                );
             } else if (path.indexOf(pathsPrefix.cacheDirectory) === 0) {
                 path = path.substring(pathsPrefix.cacheDirectory.length - 1);
                 path = handlePathSlashes(path);
 
-                exports.requestFileSystem(function () {
-                    exports.getFile(successCallback, function () {
-                        exports.getDirectory(successCallback, errorCallback, [pathsPrefix.cacheDirectory, path,
-                        {create: false}]);
-                    }, [pathsPrefix.cacheDirectory, path, {create: false}]);
-                }, errorCallback, [LocalFileSystem.TEMPORARY]);
+                exports.requestFileSystem(
+                    function () {
+                        exports.getFile(
+                            successCallback,
+                            function () {
+                                exports.getDirectory(successCallback, errorCallback, [pathsPrefix.cacheDirectory, path, { create: false }]);
+                            },
+                            [pathsPrefix.cacheDirectory, path, { create: false }]
+                        );
+                    },
+                    errorCallback,
+                    [LocalFileSystem.TEMPORARY]
+                );
             } else if (path.indexOf(pathsPrefix.applicationDirectory) === 0) {
                 path = path.substring(pathsPrefix.applicationDirectory.length);
                 // TODO: need to cut out redundant slashes?
 
-                var xhr = new XMLHttpRequest(); // eslint-disable-line no-undef
+                var xhr = new XMLHttpRequest();
                 xhr.open('GET', path, true);
                 xhr.onreadystatechange = function () {
                     if (xhr.status === 200 && xhr.readyState === 4) {
-                        exports.requestFileSystem(function (fs) {
-                            fs.name = location.hostname; // eslint-disable-line no-undef
+                        exports.requestFileSystem(
+                            function (fs) {
+                                fs.name = location.hostname;
 
-                            // TODO: need to call exports.getFile(...) to handle errors correct
-                            fs.root.getFile(path, {create: true}, writeFile, errorCallback);
-                        }, errorCallback, [LocalFileSystem.PERSISTENT]);
+                                // TODO: need to call exports.getFile(...) to handle errors correct
+                                fs.root.getFile(path, { create: true }, writeFile, errorCallback);
+                            },
+                            errorCallback,
+                            [LocalFileSystem.PERSISTENT]
+                        );
                     }
                 };
 
@@ -628,7 +706,7 @@
                 entry.createWriter(function (fileWriter) {
                     fileWriter.onwriteend = function (evt) {
                         if (!evt.target.error) {
-                            entry.filesystemName = location.hostname; // eslint-disable-line no-undef
+                            entry.filesystemName = location.hostname;
                             successCallback(entry);
                         }
                     };
@@ -637,8 +715,8 @@
                             errorCallback(FileError.NOT_READABLE_ERR);
                         }
                     };
-                    fileWriter.write(new Blob([xhr.response])); // eslint-disable-line no-undef
-                }, errorCallback); // eslint-disable-line no-undef
+                    fileWriter.write(new Blob([xhr.response]));
+                }, errorCallback);
             }
         };
 
@@ -646,7 +724,7 @@
             successCallback(pathsPrefix);
         };
 
-    /** * Helpers ***/
+        /** * Helpers ***/
 
         /**
          * Interface to wrap the native File interface.
@@ -660,7 +738,7 @@
          * @constructor
          */
         function MyFile (opts) {
-            var blob_ = new Blob(); // eslint-disable-line no-undef
+            var blob_ = new Blob();
 
             this.size = opts.size || 0;
             this.name = opts.name || '';
@@ -711,9 +789,11 @@
             },
             setBase64: function (myFile, base64) {
                 if (base64) {
-                    var arrayBuffer = (new Uint8Array(
-                        [].map.call(atob(base64), function (c) { return c.charCodeAt(0); })
-                    )).buffer;
+                    var arrayBuffer = new Uint8Array(
+                        [].map.call(atob(base64), function (c) {
+                            return c.charCodeAt(0);
+                        })
+                    ).buffer;
 
                     myFile.blob_ = new Blob([arrayBuffer], { type: myFile.type });
                 } else {
@@ -759,9 +839,11 @@
                     parts[i] = '';
                 }
             }
-            fullPath = parts.filter(function (el) {
-                return el;
-            }).join(DIR_SEPARATOR);
+            fullPath = parts
+                .filter(function (el) {
+                    return el;
+                })
+                .join(DIR_SEPARATOR);
 
             // Add back in leading slash.
             if (fullPath[0] !== DIR_SEPARATOR) {
@@ -778,8 +860,7 @@
             fullPath = fullPath.replace(/\/\./g, DIR_SEPARATOR);
 
             // Remove '/' if it appears on the end.
-            if (fullPath[fullPath.length - 1] === DIR_SEPARATOR &&
-                fullPath !== DIR_SEPARATOR) {
+            if (fullPath[fullPath.length - 1] === DIR_SEPARATOR && fullPath !== DIR_SEPARATOR) {
                 fullPath = fullPath.substring(0, fullPath.length - 1);
             }
 
@@ -804,41 +885,44 @@
         }
 
         function readAs (what, fullPath, encoding, startPos, endPos, successCallback, errorCallback) {
-            exports.getFile(function (fileEntry) {
-                var fileReader = new FileReader(); // eslint-disable-line no-undef
-                var blob = fileEntry.file_.blob_.slice(startPos, endPos);
+            exports.getFile(
+                function (fileEntry) {
+                    var fileReader = new FileReader();
+                    var blob = fileEntry.file_.blob_.slice(startPos, endPos);
 
-                fileReader.onload = function (e) {
-                    successCallback(e.target.result);
-                };
+                    fileReader.onload = function (e) {
+                        successCallback(e.target.result);
+                    };
 
-                fileReader.onerror = errorCallback;
+                    fileReader.onerror = errorCallback;
 
-                switch (what) {
-                case 'text':
-                    fileReader.readAsText(blob, encoding);
-                    break;
-                case 'dataURL':
-                    fileReader.readAsDataURL(blob);
-                    break;
-                case 'arrayBuffer':
-                    fileReader.readAsArrayBuffer(blob);
-                    break;
-                case 'binaryString':
-                    fileReader.readAsBinaryString(blob);
-                    break;
-                }
-
-            }, errorCallback, [fullPath, null]);
+                    switch (what) {
+                    case 'text':
+                        fileReader.readAsText(blob, encoding);
+                        break;
+                    case 'dataURL':
+                        fileReader.readAsDataURL(blob);
+                        break;
+                    case 'arrayBuffer':
+                        fileReader.readAsArrayBuffer(blob);
+                        break;
+                    case 'binaryString':
+                        fileReader.readAsBinaryString(blob);
+                        break;
+                    }
+                },
+                errorCallback,
+                [fullPath, null]
+            );
         }
 
-    /** * Core logic to handle IDB operations ***/
+        /** * Core logic to handle IDB operations ***/
 
         idb_.open = function (dbName, successCallback, errorCallback) {
             var self = this;
 
             // TODO: FF 12.0a1 isn't liking a db name with : in it.
-            var request = indexedDB.open(dbName.replace(':', '_')/*, 1 /*version */);
+            var request = indexedDB.open(dbName.replace(':', '_') /*, 1 /*version */);
 
             request.onerror = errorCallback || onError;
 
@@ -852,7 +936,7 @@
                 self.db.onerror = onError;
 
                 if (!self.db.objectStoreNames.contains(FILE_STORE_)) {
-                    self.db.createObjectStore(FILE_STORE_/*, {keyPath: 'id', autoIncrement: true} */);
+                    self.db.createObjectStore(FILE_STORE_ /*, {keyPath: 'id', autoIncrement: true} */);
                 }
             };
 
@@ -912,8 +996,10 @@
                 storagePath = storagePath.substring(0, storagePath.length - 1);
             }
 
-            var range = IDBKeyRange.bound(storagePath + DIR_SEPARATOR + ' ',
-                storagePath + DIR_SEPARATOR + String.fromCharCode(unicodeLastChar));
+            var range = IDBKeyRange.bound(
+                storagePath + DIR_SEPARATOR + ' ',
+                storagePath + DIR_SEPARATOR + String.fromCharCode(unicodeLastChar)
+            );
 
             var tx = this.db.transaction([FILE_STORE_], 'readonly');
             tx.onabort = errorCallback || onError;
@@ -956,12 +1042,12 @@
                     var val = cursor.value;
 
                     results.push(val.isFile ? fileEntryFromIdbEntry(val) : new DirectoryEntry(val.name, val.fullPath, val.filesystem));
-                    cursor['continue']();
+                    cursor.continue();
                 }
             };
         };
 
-        idb_['delete'] = function (fullPath, successCallback, errorCallback, isDirectory) {
+        idb_.delete = function (fullPath, successCallback, errorCallback, isDirectory) {
             if (!idb_.db) {
                 if (errorCallback) {
                     errorCallback(FileError.INVALID_MODIFICATION_ERR);
@@ -985,12 +1071,12 @@
                     var newTx = this.db.transaction([FILE_STORE_], 'readwrite');
                     newTx.oncomplete = successCallback;
                     newTx.onabort = errorCallback || onError;
-                    newTx.objectStore(FILE_STORE_)['delete'](range);
+                    newTx.objectStore(FILE_STORE_).delete(range);
                 } else {
                     successCallback();
                 }
             };
-            tx.objectStore(FILE_STORE_)['delete'](fullPath);
+            tx.objectStore(FILE_STORE_).delete(fullPath);
         };
 
         idb_.put = function (entry, storagePath, successCallback, errorCallback, retry) {
@@ -1043,8 +1129,7 @@
         function onError (e) {
             switch (e.target.errorCode) {
             case 12:
-                console.log('Error - Attempt to open db with a lower version than the ' +
-                        'current one.');
+                console.log('Error - Attempt to open db with a lower version than the ' + 'current one.');
                 break;
             default:
                 console.log('errorCode: ' + e.target.errorCode);
@@ -1052,7 +1137,6 @@
 
             console.log(e, e.code, e.message);
         }
-
     })(module.exports, window);
 
     require('cordova/exec/proxy').add('File', module.exports);
diff --git a/src/windows/FileProxy.js b/src/windows/FileProxy.js
index d829d77..ec60e5f 100644
--- a/src/windows/FileProxy.js
+++ b/src/windows/FileProxy.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 /* global Windows, WinJS, MSApp */
 
@@ -53,8 +53,7 @@
 var getFileFromPathAsync = Windows.Storage.StorageFile.getFileFromPathAsync;
 
 function writeBytesAsync (storageFile, data, position) {
-    return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite)
-    .then(function (output) {
+    return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function (output) {
         output.seek(position);
         var dataWriter = new Windows.Storage.Streams.DataWriter(output);
         dataWriter.writeBytes(data);
@@ -69,8 +68,7 @@
 }
 
 function writeTextAsync (storageFile, data, position) {
-    return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite)
-    .then(function (output) {
+    return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function (output) {
         output.seek(position);
         var dataWriter = new Windows.Storage.Streams.DataWriter(output);
         dataWriter.writeString(data);
@@ -85,15 +83,13 @@
 }
 
 function writeBlobAsync (storageFile, data, position) {
-    return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite)
-    .then(function (output) {
+    return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function (output) {
         output.seek(position);
         var dataSize = data.size;
         var input = (data.detachStream || data.msDetachStream).call(data);
 
         // Copy the stream from the blob to the File stream
-        return Windows.Storage.Streams.RandomAccessStream.copyAsync(input, output)
-        .then(function () {
+        return Windows.Storage.Streams.RandomAccessStream.copyAsync(input, output).then(function () {
             output.size = position + dataSize;
             return output.flushAsync().then(function () {
                 input.close();
@@ -106,7 +102,7 @@
 }
 
 function writeArrayBufferAsync (storageFile, data, position) {
-    return writeBlobAsync(storageFile, new Blob([data]), position); // eslint-disable-line no-undef
+    return writeBlobAsync(storageFile, new Blob([data]), position);
 }
 
 function cordovaPathToNative (path) {
@@ -161,7 +157,9 @@
         return FileSystem.encodeURIPath(this.root.nativeURL + sanitizedPath);
     };
     root.fullPath = '/';
-    if (!root.nativeURL) { root.nativeURL = 'file://' + sanitize(this.winpath + root.fullPath).replace(':', '%3A'); }
+    if (!root.nativeURL) {
+        root.nativeURL = 'file://' + sanitize(this.winpath + root.fullPath).replace(':', '%3A');
+    }
     WinFS.__super__.constructor.call(this, name, root);
 };
 
@@ -186,30 +184,34 @@
 function getAllFS () {
     if (!AllFileSystems) {
         AllFileSystems = {
-            'persistent':
-            Object.freeze(new WinFS('persistent', {
-                name: 'persistent',
-                nativeURL: 'ms-appdata:///local',
-                winpath: nativePathToCordova(Windows.Storage.ApplicationData.current.localFolder.path)
-            })),
-            'temporary':
-            Object.freeze(new WinFS('temporary', {
-                name: 'temporary',
-                nativeURL: 'ms-appdata:///temp',
-                winpath: nativePathToCordova(Windows.Storage.ApplicationData.current.temporaryFolder.path)
-            })),
-            'application':
-            Object.freeze(new WinFS('application', {
-                name: 'application',
-                nativeURL: 'ms-appx:///',
-                winpath: nativePathToCordova(Windows.ApplicationModel.Package.current.installedLocation.path)
-            })),
-            'root':
-            Object.freeze(new WinFS('root', {
-                name: 'root',
-                // nativeURL: 'file:///'
-                winpath: ''
-            }))
+            persistent: Object.freeze(
+                new WinFS('persistent', {
+                    name: 'persistent',
+                    nativeURL: 'ms-appdata:///local',
+                    winpath: nativePathToCordova(Windows.Storage.ApplicationData.current.localFolder.path)
+                })
+            ),
+            temporary: Object.freeze(
+                new WinFS('temporary', {
+                    name: 'temporary',
+                    nativeURL: 'ms-appdata:///temp',
+                    winpath: nativePathToCordova(Windows.Storage.ApplicationData.current.temporaryFolder.path)
+                })
+            ),
+            application: Object.freeze(
+                new WinFS('application', {
+                    name: 'application',
+                    nativeURL: 'ms-appx:///',
+                    winpath: nativePathToCordova(Windows.ApplicationModel.Package.current.installedLocation.path)
+                })
+            ),
+            root: Object.freeze(
+                new WinFS('root', {
+                    name: 'root',
+                    // nativeURL: 'file:///'
+                    winpath: ''
+                })
+            )
         };
     }
     return AllFileSystems;
@@ -224,7 +226,9 @@
 };
 
 require('./fileSystems').getFs = function (name, callback) {
-    setTimeout(function () { callback(getFS(name)); });
+    setTimeout(function () {
+        callback(getFS(name));
+    });
 };
 
 function getFilesystemFromPath (path) {
@@ -232,7 +236,9 @@
     var allfs = getAllFS();
     Object.keys(allfs).some(function (fsn) {
         var fs = allfs[fsn];
-        if (path.indexOf(fs.winpath) === 0) { res = fs; }
+        if (path.indexOf(fs.winpath) === 0) {
+            res = fs;
+        }
         return res;
     });
     return res;
@@ -253,7 +259,9 @@
     }
 
     ['file://', 'ms-appdata:///', 'ms-appx://', 'cdvfile://localhost/'].every(function (p) {
-        if (path.indexOf(p) !== 0) { return true; }
+        if (path.indexOf(p) !== 0) {
+            return true;
+        }
         var thirdSlash = path.indexOf('/', p.length);
         if (thirdSlash < 0) {
             path = '';
@@ -268,12 +276,13 @@
 function getFilesystemFromURL (url) {
     url = url.replace(msapplhRE, 'ms-appdata:///');
     var res;
-    if (url.indexOf('file:/') === 0) { res = getFilesystemFromPath(pathFromURL(url)); } else {
+    if (url.indexOf('file:/') === 0) {
+        res = getFilesystemFromPath(pathFromURL(url));
+    } else {
         var allfs = getAllFS();
         Object.keys(allfs).every(function (fsn) {
             var fs = allfs[fsn];
-            if (url.indexOf(fs.root.nativeURL) === 0 ||
-                url.indexOf('cdvfile://localhost/' + fs.name + '/') === 0) {
+            if (url.indexOf(fs.root.nativeURL) === 0 || url.indexOf('cdvfile://localhost/' + fs.name + '/') === 0) {
                 res = fs;
                 return false;
             }
@@ -285,7 +294,9 @@
 
 function getFsPathForWinPath (fs, wpath) {
     var path = nativePathToCordova(wpath);
-    if (path.indexOf(fs.winpath) !== 0) { return null; }
+    if (path.indexOf(fs.winpath) !== 0) {
+        return null;
+    }
     return path.replace(fs.winpath, '/');
 }
 
@@ -300,14 +311,17 @@
     return new WinJS.Promise(function (complete, failed) {
         getFileFromPathAsync(path).done(
             function (file) {
-                complete({file: file});
+                complete({ file: file });
             },
             function (err) {
-                if (err.number !== WinError.fileNotFound && err.number !== WinError.invalidArgument) { failed(FileError.NOT_READABLE_ERR); }
-                getFolderFromPathAsync(path)
-                .done(
+                if (err.number !== WinError.fileNotFound && err.number !== WinError.invalidArgument) {
+                    failed(FileError.NOT_READABLE_ERR);
+                }
+                getFolderFromPathAsync(path).done(
                     function (dir) {
-                        if (!ops.getContent) { complete({folder: dir}); } else {
+                        if (!ops.getContent) {
+                            complete({ folder: dir });
+                        } else {
                             WinJS.Promise.join({
                                 files: dir.getFilesAsync(),
                                 folders: dir.getFoldersAsync()
@@ -319,14 +333,19 @@
                                         folders: a.folders
                                     });
                                 },
-                                function (err) {  // eslint-disable-line handle-callback-err
+                                // eslint-disable-next-line handle-callback-err
+                                function (err) {
                                     failed(FileError.NOT_READABLE_ERR);
                                 }
                             );
                         }
                     },
                     function (err) {
-                        if (err.number === WinError.fileNotFound || err.number === WinError.invalidArgument) { complete({}); } else { failed(FileError.NOT_READABLE_ERR); }
+                        if (err.number === WinError.fileNotFound || err.number === WinError.invalidArgument) {
+                            complete({});
+                        } else {
+                            failed(FileError.NOT_READABLE_ERR);
+                        }
                     }
                 );
             }
@@ -341,34 +360,33 @@
             fld: dst.createFolderAsync(name, Windows.Storage.CreationCollisionOption.openIfExists),
             files: src.getFilesAsync(),
             folders: src.getFoldersAsync()
-        }).done(
-            function (the) {
-                if (!(the.files.length || the.folders.length)) {
+        }).done(function (the) {
+            if (!(the.files.length || the.folders.length)) {
+                complete();
+                return;
+            }
+            var todo = the.files.length;
+            var copyfolders = function () {
+                if (!todo--) {
                     complete();
                     return;
                 }
-                var todo = the.files.length;
-                var copyfolders = function () {
-                    if (!(todo--)) {
-                        complete();
-                        return;
-                    }
-                    copyFolder(the.folders[todo], dst)
-                    .done(function () { copyfolders(); }, failed);
-                };
-                var copyfiles = function () {
-                    if (!(todo--)) {
-                        todo = the.folders.length;
-                        copyfolders();
-                        return;
-                    }
-                    the.files[todo].copyAsync(the.fld)
-                    .done(function () { copyfiles(); }, failed);
-                };
-                copyfiles();
-            },
-            failed
-        );
+                copyFolder(the.folders[todo], dst).done(function () {
+                    copyfolders();
+                }, failed);
+            };
+            var copyfiles = function () {
+                if (!todo--) {
+                    todo = the.folders.length;
+                    copyfolders();
+                    return;
+                }
+                the.files[todo].copyAsync(the.fld).done(function () {
+                    copyfiles();
+                }, failed);
+            };
+            copyfiles();
+        }, failed);
     });
 }
 
@@ -379,38 +397,36 @@
             fld: dst.createFolderAsync(name, Windows.Storage.CreationCollisionOption.openIfExists),
             files: src.getFilesAsync(),
             folders: src.getFoldersAsync()
-        }).done(
-            function (the) {
-                if (!(the.files.length || the.folders.length)) {
-                    complete();
+        }).done(function (the) {
+            if (!(the.files.length || the.folders.length)) {
+                complete();
+                return;
+            }
+            var todo = the.files.length;
+            var movefolders = function () {
+                if (!todo--) {
+                    src.deleteAsync().done(complete, failed);
                     return;
                 }
-                var todo = the.files.length;
-                var movefolders = function () {
-                    if (!(todo--)) {
-                        src.deleteAsync().done(complete, failed);
-                        return;
-                    }
-                    moveFolder(the.folders[todo], the.fld)
-                    .done(movefolders, failed);
-                };
-                var movefiles = function () {
-                    if (!(todo--)) {
-                        todo = the.folders.length;
-                        movefolders();
-                        return;
-                    }
-                    the.files[todo].moveAsync(the.fld)
-                    .done(function () { movefiles(); }, failed);
-                };
-                movefiles();
-            },
-            failed
-        );
+                moveFolder(the.folders[todo], the.fld).done(movefolders, failed);
+            };
+            var movefiles = function () {
+                if (!todo--) {
+                    todo = the.folders.length;
+                    movefolders();
+                    return;
+                }
+                the.files[todo].moveAsync(the.fld).done(function () {
+                    movefiles();
+                }, failed);
+            };
+            movefiles();
+        }, failed);
     });
 }
 
-function transport (success, fail, args, ops) { // ["fullPath","parent", "newName"]
+function transport (success, fail, args, ops) {
+    // ["fullPath","parent", "newName"]
     var src = args[0];
     var parent = args[1];
     var name = args[2];
@@ -436,44 +452,35 @@
     WinJS.Promise.join({
         src: openPath(srcWinPath),
         dst: openPath(dstWinPath),
-        tgt: openPath(tgtWinPath, {getContent: true})
-    })
-    .done(
+        tgt: openPath(tgtWinPath, { getContent: true })
+    }).done(
         function (the) {
-            if ((!the.dst.folder) || !(the.src.folder || the.src.file)) {
+            if (!the.dst.folder || !(the.src.folder || the.src.file)) {
                 fail(FileError.NOT_FOUND_ERR);
                 return;
             }
-            if ((the.src.folder && the.tgt.file) ||
+            if (
+                (the.src.folder && the.tgt.file) ||
                 (the.src.file && the.tgt.folder) ||
-                (the.tgt.folder && (the.tgt.files.length || the.tgt.folders.length))) {
+                (the.tgt.folder && (the.tgt.files.length || the.tgt.folders.length))
+            ) {
                 fail(FileError.INVALID_MODIFICATION_ERR);
                 return;
             }
             if (the.src.file) {
-                ops.fileOp(the.src.file, the.dst.folder, name, Windows.Storage.NameCollisionOption.replaceExisting)
-                .done(
+                ops.fileOp(the.src.file, the.dst.folder, name, Windows.Storage.NameCollisionOption.replaceExisting).done(
                     function (storageFile) {
-                        success(new FileEntry(
-                            name,
-                            tgtFsPath,
-                            dstFS.name,
-                            dstFS.makeNativeURL(tgtFsPath)
-                        ));
+                        success(new FileEntry(name, tgtFsPath, dstFS.name, dstFS.makeNativeURL(tgtFsPath)));
                     },
-                    function (err) {  // eslint-disable-line handle-callback-err
+                    // eslint-disable-next-line handle-callback-err
+                    function (err) {
                         fail(FileError.INVALID_MODIFICATION_ERR);
                     }
                 );
             } else {
                 ops.folderOp(the.src.folder, the.dst.folder, name).done(
                     function () {
-                        success(new DirectoryEntry(
-                            name,
-                            tgtFsPath,
-                            dstFS.name,
-                            dstFS.makeNativeURL(tgtFsPath)
-                        ));
+                        success(new DirectoryEntry(name, tgtFsPath, dstFS.name, dstFS.makeNativeURL(tgtFsPath)));
                     },
                     function () {
                         fail(FileError.INVALID_MODIFICATION_ERR);
@@ -481,7 +488,8 @@
                 );
             }
         },
-        function (err) {  // eslint-disable-line handle-callback-err
+        // eslint-disable-next-line handle-callback-err
+        function (err) {
             fail(FileError.INVALID_MODIFICATION_ERR);
         }
     );
@@ -510,10 +518,19 @@
         var getMetadataForFile = function (storageFile) {
             storageFile.getBasicPropertiesAsync().then(
                 function (basicProperties) {
-                    success(new File(storageFile.name, storageFile.path, storageFile.fileType, basicProperties.dateModified, basicProperties.size));
-                }, function () {
-                fail(FileError.NOT_READABLE_ERR);
-            }
+                    success(
+                        new File(
+                            storageFile.name,
+                            storageFile.path,
+                            storageFile.fileType,
+                            basicProperties.dateModified,
+                            basicProperties.size
+                        )
+                    );
+                },
+                function () {
+                    fail(FileError.NOT_READABLE_ERR);
+                }
             );
         };
 
@@ -532,25 +549,22 @@
             );
         };
 
-        getFileFromPathAsync(fullPath).then(getMetadataForFile,
-            function () {
-                getFolderFromPathAsync(fullPath).then(getMetadataForFolder,
-                    function () {
-                        fail(FileError.NOT_FOUND_ERR);
-                    }
-                );
-            }
-        );
+        getFileFromPathAsync(fullPath).then(getMetadataForFile, function () {
+            getFolderFromPathAsync(fullPath).then(getMetadataForFolder, function () {
+                fail(FileError.NOT_FOUND_ERR);
+            });
+        });
     },
 
-    getParent: function (win, fail, args) { // ["fullPath"]
+    getParent: function (win, fail, args) {
+        // ["fullPath"]
         var fs = getFilesystemFromURL(args[0]);
         var path = pathFromURL(args[0]);
         if (!fs || !validName(path)) {
             fail(FileError.ENCODING_ERR);
             return;
         }
-        if (!path || (new RegExp('/[^/]*/?$')).test(path)) {
+        if (!path || new RegExp('/[^/]*/?$').test(path)) {
             win(new DirectoryEntry(fs.root.name, fs.root.fullPath, fs.name, fs.makeNativeURL(fs.root.fullPath)));
             return;
         }
@@ -561,13 +575,16 @@
 
         var result = new DirectoryEntry(parname, parpath, fs.name, fs.makeNativeURL(parpath));
         getFolderFromPathAsync(fullPath).done(
-            function () { win(result); },
-            function () { fail(FileError.INVALID_STATE_ERR); }
+            function () {
+                win(result);
+            },
+            function () {
+                fail(FileError.INVALID_STATE_ERR);
+            }
         );
     },
 
     readAsText: function (win, fail, args) {
-
         var url = args[0];
         var enc = args[1];
         var startPos = args[2];
@@ -588,26 +605,32 @@
             encoding = Windows.Storage.Streams.UnicodeEncoding.utf16BE;
         }
 
-        getFileFromPathAsync(wpath).then(function (file) {
-            return file.openReadAsync();
-        }).then(function (stream) {
-            startPos = (startPos < 0) ? Math.max(stream.size + startPos, 0) : Math.min(stream.size, startPos);
-            endPos = (endPos < 0) ? Math.max(endPos + stream.size, 0) : Math.min(stream.size, endPos);
-            stream.seek(startPos);
+        getFileFromPathAsync(wpath)
+            .then(function (file) {
+                return file.openReadAsync();
+            })
+            .then(function (stream) {
+                startPos = startPos < 0 ? Math.max(stream.size + startPos, 0) : Math.min(stream.size, startPos);
+                endPos = endPos < 0 ? Math.max(endPos + stream.size, 0) : Math.min(stream.size, endPos);
+                stream.seek(startPos);
 
-            var readSize = endPos - startPos;
-            var buffer = new Windows.Storage.Streams.Buffer(readSize);
+                var readSize = endPos - startPos;
+                var buffer = new Windows.Storage.Streams.Buffer(readSize);
 
-            return stream.readAsync(buffer, readSize, Windows.Storage.Streams.InputStreamOptions.none);
-        }).done(function (buffer) {
-            try {
-                win(Windows.Security.Cryptography.CryptographicBuffer.convertBinaryToString(encoding, buffer));
-            } catch (e) {
-                fail(FileError.ENCODING_ERR);
-            }
-        }, function () {
-            fail(FileError.NOT_FOUND_ERR);
-        });
+                return stream.readAsync(buffer, readSize, Windows.Storage.Streams.InputStreamOptions.none);
+            })
+            .done(
+                function (buffer) {
+                    try {
+                        win(Windows.Security.Cryptography.CryptographicBuffer.convertBinaryToString(encoding, buffer));
+                    } catch (e) {
+                        fail(FileError.ENCODING_ERR);
+                    }
+                },
+                function () {
+                    fail(FileError.NOT_FOUND_ERR);
+                }
+            );
     },
 
     readAsBinaryString: function (win, fail, args) {
@@ -625,26 +648,25 @@
 
         getFileFromPathAsync(wpath).then(
             function (storageFile) {
-                Windows.Storage.FileIO.readBufferAsync(storageFile).done(
-                    function (buffer) {
-                        var dataReader = Windows.Storage.Streams.DataReader.fromBuffer(buffer);
-                        // var fileContent = dataReader.readString(buffer.length);
-                        var byteArray = new Uint8Array(buffer.length);
-                        var byteString = '';
-                        dataReader.readBytes(byteArray);
-                        dataReader.close();
-                        for (var i = 0; i < byteArray.length; i++) {
-                            var charByte = byteArray[i];
-                            // var charRepresentation = charByte <= 127 ? String.fromCharCode(charByte) : charByte.toString(16);
-                            var charRepresentation = String.fromCharCode(charByte);
-                            byteString += charRepresentation;
-                        }
-                        win(byteString.slice(startPos, endPos));
+                Windows.Storage.FileIO.readBufferAsync(storageFile).done(function (buffer) {
+                    var dataReader = Windows.Storage.Streams.DataReader.fromBuffer(buffer);
+                    // var fileContent = dataReader.readString(buffer.length);
+                    var byteArray = new Uint8Array(buffer.length);
+                    var byteString = '';
+                    dataReader.readBytes(byteArray);
+                    dataReader.close();
+                    for (var i = 0; i < byteArray.length; i++) {
+                        var charByte = byteArray[i];
+                        // var charRepresentation = charByte <= 127 ? String.fromCharCode(charByte) : charByte.toString(16);
+                        var charRepresentation = String.fromCharCode(charByte);
+                        byteString += charRepresentation;
                     }
-                );
-            }, function () {
-            fail(FileError.NOT_FOUND_ERR);
-        }
+                    win(byteString.slice(startPos, endPos));
+                });
+            },
+            function () {
+                fail(FileError.NOT_FOUND_ERR);
+            }
         );
     },
 
@@ -661,8 +683,8 @@
         getFileFromPathAsync(wpath).then(
             function (storageFile) {
                 var blob = MSApp.createFileFromStorageFile(storageFile);
-                var url = URL.createObjectURL(blob, { oneTimeOnly: true }); // eslint-disable-line no-undef
-                var xhr = new XMLHttpRequest(); // eslint-disable-line no-undef
+                var url = URL.createObjectURL(blob, { oneTimeOnly: true });
+                var xhr = new XMLHttpRequest();
                 xhr.open('GET', url, true);
                 xhr.responseType = 'arraybuffer';
                 xhr.onload = function () {
@@ -691,9 +713,10 @@
                     win(resultArrayBuffer);
                 };
                 xhr.send();
-            }, function () {
-            fail(FileError.NOT_FOUND_ERR);
-        }
+            },
+            function () {
+                fail(FileError.NOT_FOUND_ERR);
+            }
         );
     },
 
@@ -709,21 +732,20 @@
 
         getFileFromPathAsync(wpath).then(
             function (storageFile) {
-                Windows.Storage.FileIO.readBufferAsync(storageFile).done(
-                    function (buffer) {
-                        var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer);
-                        // the method encodeToBase64String will add "77u/" as a prefix, so we should remove it
-                        if (String(strBase64).substr(0, 4) === '77u/') {
-                            strBase64 = strBase64.substr(4);
-                        }
-                        var mediaType = storageFile.contentType;
-                        var result = 'data:' + mediaType + ';base64,' + strBase64;
-                        win(result);
+                Windows.Storage.FileIO.readBufferAsync(storageFile).done(function (buffer) {
+                    var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer);
+                    // the method encodeToBase64String will add "77u/" as a prefix, so we should remove it
+                    if (String(strBase64).substr(0, 4) === '77u/') {
+                        strBase64 = strBase64.substr(4);
                     }
-                );
-            }, function () {
-            fail(FileError.NOT_FOUND_ERR);
-        }
+                    var mediaType = storageFile.contentType;
+                    var result = 'data:' + mediaType + ';base64,' + strBase64;
+                    win(result);
+                });
+            },
+            function () {
+                fail(FileError.NOT_FOUND_ERR);
+            }
         );
     },
 
@@ -758,17 +780,20 @@
                     storageFolder.createFolderAsync(name, Windows.Storage.CreationCollisionOption.failIfExists).done(
                         function (storageFolder) {
                             win(new DirectoryEntry(storageFolder.name, fspath, fs.name, fs.makeNativeURL(fspath)));
-                        }, function (err) {  // eslint-disable-line handle-callback-err
-                        fail(FileError.PATH_EXISTS_ERR);
-                    }
+                        },
+                        // eslint-disable-next-line handle-callback-err
+                        function (err) {
+                            fail(FileError.PATH_EXISTS_ERR);
+                        }
                     );
                 } else if (flag.create === true && flag.exclusive === false) {
                     storageFolder.createFolderAsync(name, Windows.Storage.CreationCollisionOption.openIfExists).done(
                         function (storageFolder) {
                             win(new DirectoryEntry(storageFolder.name, fspath, fs.name, fs.makeNativeURL(fspath)));
-                        }, function () {
-                        fail(FileError.INVALID_MODIFICATION_ERR);
-                    }
+                        },
+                        function () {
+                            fail(FileError.INVALID_MODIFICATION_ERR);
+                        }
                     );
                 } else if (flag.create === false) {
                     storageFolder.getFolderAsync(name).done(
@@ -780,16 +805,18 @@
                             storageFolder.getFileAsync(name).done(
                                 function () {
                                     fail(FileError.TYPE_MISMATCH_ERR);
-                                }, function () {
-                                fail(FileError.NOT_FOUND_ERR);
-                            }
+                                },
+                                function () {
+                                    fail(FileError.NOT_FOUND_ERR);
+                                }
                             );
                         }
                     );
                 }
-            }, function () {
-            fail(FileError.NOT_FOUND_ERR);
-        }
+            },
+            function () {
+                fail(FileError.NOT_FOUND_ERR);
+            }
         );
     },
 
@@ -817,32 +844,30 @@
             function () {
                 getFolderFromPathAsync(fullPath).done(
                     function (sFolder) {
-                        sFolder.getFilesAsync()
-                        // check for files
-                        .then(function (fileList) {
-                            if (fileList) {
-                                if (fileList.length === 0) {
-                                    return sFolder.getFoldersAsync();
-                                } else {
-                                    fail(FileError.INVALID_MODIFICATION_ERR);
+                        sFolder
+                            .getFilesAsync()
+                            // check for files
+                            .then(function (fileList) {
+                                if (fileList) {
+                                    if (fileList.length === 0) {
+                                        return sFolder.getFoldersAsync();
+                                    } else {
+                                        fail(FileError.INVALID_MODIFICATION_ERR);
+                                    }
                                 }
-                            }
-                        })
-                        // check for folders
-                        .done(function (folderList) {
-                            if (folderList) {
-                                if (folderList.length === 0) {
-                                    sFolder.deleteAsync().done(
-                                        win,
-                                        function () {
+                            })
+                            // check for folders
+                            .done(function (folderList) {
+                                if (folderList) {
+                                    if (folderList.length === 0) {
+                                        sFolder.deleteAsync().done(win, function () {
                                             fail(FileError.INVALID_MODIFICATION_ERR);
-                                        }
-                                    );
-                                } else {
-                                    fail(FileError.INVALID_MODIFICATION_ERR);
+                                        });
+                                    } else {
+                                        fail(FileError.INVALID_MODIFICATION_ERR);
+                                    }
                                 }
-                            }
-                        });
+                            });
                     },
                     function () {
                         fail(FileError.NOT_FOUND_ERR);
@@ -853,7 +878,6 @@
     },
 
     removeRecursively: function (successCallback, fail, args) {
-
         var fs = getFilesystemFromURL(args[0]);
         var path = pathFromURL(args[0]);
         if (!fs || !validName(path)) {
@@ -868,20 +892,24 @@
         }
         var fullPath = cordovaPathToNative(fs.winpath + path);
 
-        getFolderFromPathAsync(fullPath).done(function (storageFolder) {
-            storageFolder.deleteAsync().done(function (res) {
-                successCallback(res);
-            }, function (err) {
-                fail(err);
-            });
-
-        }, function () {
-            fail(FileError.FILE_NOT_FOUND_ERR);
-        });
+        getFolderFromPathAsync(fullPath).done(
+            function (storageFolder) {
+                storageFolder.deleteAsync().done(
+                    function (res) {
+                        successCallback(res);
+                    },
+                    function (err) {
+                        fail(err);
+                    }
+                );
+            },
+            function () {
+                fail(FileError.FILE_NOT_FOUND_ERR);
+            }
+        );
     },
 
     getFile: function (win, fail, args) {
-
         var dirurl = args[0];
         var path = args[1];
         var options = args[2];
@@ -912,44 +940,47 @@
                     storageFolder.createFileAsync(fileName, Windows.Storage.CreationCollisionOption.failIfExists).done(
                         function (storageFile) {
                             win(new FileEntry(storageFile.name, fspath, fs.name, fs.makeNativeURL(fspath)));
-                        }, function () {
-                        fail(FileError.PATH_EXISTS_ERR);
-                    }
+                        },
+                        function () {
+                            fail(FileError.PATH_EXISTS_ERR);
+                        }
                     );
                 } else if (flag.create === true && flag.exclusive === false) {
                     storageFolder.createFileAsync(fileName, Windows.Storage.CreationCollisionOption.openIfExists).done(
                         function (storageFile) {
                             win(new FileEntry(storageFile.name, fspath, fs.name, fs.makeNativeURL(fspath)));
-                        }, function () {
-                        fail(FileError.INVALID_MODIFICATION_ERR);
-                    }
+                        },
+                        function () {
+                            fail(FileError.INVALID_MODIFICATION_ERR);
+                        }
                     );
                 } else if (flag.create === false) {
                     storageFolder.getFileAsync(fileName).done(
                         function (storageFile) {
                             win(new FileEntry(storageFile.name, fspath, fs.name, fs.makeNativeURL(fspath)));
-                        }, function () {
+                        },
+                        function () {
                             // check if path actually points to a folder
-                        storageFolder.getFolderAsync(fileName).done(
+                            storageFolder.getFolderAsync(fileName).done(
                                 function () {
                                     fail(FileError.TYPE_MISMATCH_ERR);
-                                }, function () {
-                            fail(FileError.NOT_FOUND_ERR);
-                        });
-                    }
+                                },
+                                function () {
+                                    fail(FileError.NOT_FOUND_ERR);
+                                }
+                            );
+                        }
                     );
                 }
-            }, function (err) {
-            fail(
-                    err.number === WinError.accessDenied ?
-                    FileError.SECURITY_ERR :
-                    FileError.NOT_FOUND_ERR
-                );
-        }
+            },
+            function (err) {
+                fail(err.number === WinError.accessDenied ? FileError.SECURITY_ERR : FileError.NOT_FOUND_ERR);
+            }
         );
     },
 
-    readEntries: function (win, fail, args) { // ["fullPath"]
+    readEntries: function (win, fail, args) {
+        // ["fullPath"]
         var fs = getFilesystemFromURL(args[0]);
         var path = pathFromURL(args[0]);
         if (!fs || !validName(path)) {
@@ -960,42 +991,45 @@
 
         var result = [];
 
-        getFolderFromPathAsync(fullPath).done(function (storageFolder) {
-            var promiseArr = [];
-            var index = 0;
-            promiseArr[index++] = storageFolder.getFilesAsync().then(function (fileList) {
-                if (fileList !== null) {
-                    for (var i = 0; i < fileList.length; i++) {
-                        var fspath = getFsPathForWinPath(fs, fileList[i].path);
-                        if (!fspath) {
-                            fail(FileError.NOT_FOUND_ERR);
-                            return;
+        getFolderFromPathAsync(fullPath).done(
+            function (storageFolder) {
+                var promiseArr = [];
+                var index = 0;
+                promiseArr[index++] = storageFolder.getFilesAsync().then(function (fileList) {
+                    if (fileList !== null) {
+                        for (var i = 0; i < fileList.length; i++) {
+                            var fspath = getFsPathForWinPath(fs, fileList[i].path);
+                            if (!fspath) {
+                                fail(FileError.NOT_FOUND_ERR);
+                                return;
+                            }
+                            result.push(new FileEntry(fileList[i].name, fspath, fs.name, fs.makeNativeURL(fspath)));
                         }
-                        result.push(new FileEntry(fileList[i].name, fspath, fs.name, fs.makeNativeURL(fspath)));
                     }
-                }
-            });
-            promiseArr[index++] = storageFolder.getFoldersAsync().then(function (folderList) {
-                if (folderList !== null) {
-                    for (var j = 0; j < folderList.length; j++) {
-                        var fspath = getFsPathForWinPath(fs, folderList[j].path);
-                        if (!fspath) {
-                            fail(FileError.NOT_FOUND_ERR);
-                            return;
+                });
+                promiseArr[index++] = storageFolder.getFoldersAsync().then(function (folderList) {
+                    if (folderList !== null) {
+                        for (var j = 0; j < folderList.length; j++) {
+                            var fspath = getFsPathForWinPath(fs, folderList[j].path);
+                            if (!fspath) {
+                                fail(FileError.NOT_FOUND_ERR);
+                                return;
+                            }
+                            result.push(new DirectoryEntry(folderList[j].name, fspath, fs.name, fs.makeNativeURL(fspath)));
                         }
-                        result.push(new DirectoryEntry(folderList[j].name, fspath, fs.name, fs.makeNativeURL(fspath)));
                     }
-                }
-            });
-            WinJS.Promise.join(promiseArr).then(function () {
-                win(result);
-            });
-
-        }, function () { fail(FileError.NOT_FOUND_ERR); });
+                });
+                WinJS.Promise.join(promiseArr).then(function () {
+                    win(result);
+                });
+            },
+            function () {
+                fail(FileError.NOT_FOUND_ERR);
+            }
+        );
     },
 
     write: function (win, fail, args) {
-
         var url = args[0];
         var data = args[1];
         var position = args[2];
@@ -1013,8 +1047,7 @@
         var wpath = cordovaPathToNative(dirpath);
 
         function getWriteMethodForData (data, isBinary) {
-
-            if (data instanceof Blob) {  // eslint-disable-line no-undef
+            if (data instanceof Blob) {
                 return writeBlobAsync;
             }
 
@@ -1053,7 +1086,6 @@
                         fail(FileError.INVALID_MODIFICATION_ERR);
                     }
                 );
-
             },
             function () {
                 fail(FileError.NOT_FOUND_ERR);
@@ -1061,7 +1093,8 @@
         );
     },
 
-    truncate: function (win, fail, args) { // ["fileName","size"]
+    truncate: function (win, fail, args) {
+        // ["fileName","size"]
         var url = args[0];
         var size = args[1];
 
@@ -1075,68 +1108,85 @@
         var wpath = cordovaPathToNative(completePath);
         var dirwpath = cordovaPathToNative(completePath.substring(0, completePath.lastIndexOf('/')));
 
-        getFileFromPathAsync(wpath).done(function (storageFile) {
-            // the current length of the file.
-            var leng = 0;
+        getFileFromPathAsync(wpath).done(
+            function (storageFile) {
+                // the current length of the file.
+                var leng = 0;
 
-            storageFile.getBasicPropertiesAsync().then(function (basicProperties) {
-                leng = basicProperties.size;
-                if (Number(size) >= leng) {
-                    win(this.length);
-                    return;
-                }
-                if (Number(size) >= 0) {
-                    Windows.Storage.FileIO.readTextAsync(storageFile, Windows.Storage.Streams.UnicodeEncoding.utf8).then(function (fileContent) {
-                        fileContent = fileContent.substr(0, size);
-                        var name = storageFile.name;
-                        storageFile.deleteAsync().then(function () {
-                            return getFolderFromPathAsync(dirwpath);
-                        }).done(function (storageFolder) {
-                            storageFolder.createFileAsync(name).then(function (newStorageFile) {
-                                Windows.Storage.FileIO.writeTextAsync(newStorageFile, fileContent).done(function () {
-                                    win(String(fileContent).length);
-                                }, function () {
-                                    fail(FileError.NO_MODIFICATION_ALLOWED_ERR);
-                                });
-                            }, function () {
-                                fail(FileError.NO_MODIFICATION_ALLOWED_ERR);
-                            });
-                        });
-                    }, function () { fail(FileError.NOT_FOUND_ERR); });
-                }
-            });
-        }, function () { fail(FileError.NOT_FOUND_ERR); });
+                storageFile.getBasicPropertiesAsync().then(function (basicProperties) {
+                    leng = basicProperties.size;
+                    if (Number(size) >= leng) {
+                        win(this.length);
+                        return;
+                    }
+                    if (Number(size) >= 0) {
+                        Windows.Storage.FileIO.readTextAsync(storageFile, Windows.Storage.Streams.UnicodeEncoding.utf8).then(
+                            function (fileContent) {
+                                fileContent = fileContent.substr(0, size);
+                                var name = storageFile.name;
+                                storageFile
+                                    .deleteAsync()
+                                    .then(function () {
+                                        return getFolderFromPathAsync(dirwpath);
+                                    })
+                                    .done(function (storageFolder) {
+                                        storageFolder.createFileAsync(name).then(
+                                            function (newStorageFile) {
+                                                Windows.Storage.FileIO.writeTextAsync(newStorageFile, fileContent).done(
+                                                    function () {
+                                                        win(String(fileContent).length);
+                                                    },
+                                                    function () {
+                                                        fail(FileError.NO_MODIFICATION_ALLOWED_ERR);
+                                                    }
+                                                );
+                                            },
+                                            function () {
+                                                fail(FileError.NO_MODIFICATION_ALLOWED_ERR);
+                                            }
+                                        );
+                                    });
+                            },
+                            function () {
+                                fail(FileError.NOT_FOUND_ERR);
+                            }
+                        );
+                    }
+                });
+            },
+            function () {
+                fail(FileError.NOT_FOUND_ERR);
+            }
+        );
     },
 
-    copyTo: function (success, fail, args) { // ["fullPath","parent", "newName"]
-        transport(success, fail, args,
-            {
-                fileOp: function (file, folder, name, coll) {
-                    return file.copyAsync(folder, name, coll);
-                },
-                folderOp: function (src, dst, name) {
-                    return copyFolder(src, dst, name);
-                }}
-        );
+    copyTo: function (success, fail, args) {
+        // ["fullPath","parent", "newName"]
+        transport(success, fail, args, {
+            fileOp: function (file, folder, name, coll) {
+                return file.copyAsync(folder, name, coll);
+            },
+            folderOp: function (src, dst, name) {
+                return copyFolder(src, dst, name);
+            }
+        });
     },
 
     moveTo: function (success, fail, args) {
-        transport(success, fail, args,
-            {
-                fileOp: function (file, folder, name, coll) {
-                    return file.moveAsync(folder, name, coll);
-                },
-                folderOp: function (src, dst, name) {
-                    return moveFolder(src, dst, name);
-                }}
-        );
+        transport(success, fail, args, {
+            fileOp: function (file, folder, name, coll) {
+                return file.moveAsync(folder, name, coll);
+            },
+            folderOp: function (src, dst, name) {
+                return moveFolder(src, dst, name);
+            }
+        });
     },
     tempFileSystem: null,
 
     persistentFileSystem: null,
 
     requestFileSystem: function (win, fail, args) {
-
         var type = args[0];
         var size = args[1];
         var MAX_SIZE = 10000000000;
@@ -1154,11 +1204,14 @@
             fs = getFS('persistent');
             break;
         }
-        if (fs) { win(fs); } else { fail(FileError.NOT_FOUND_ERR); }
+        if (fs) {
+            win(fs);
+        } else {
+            fail(FileError.NOT_FOUND_ERR);
+        }
     },
 
     resolveLocalFileSystemURI: function (success, fail, args) {
-
         var uri = args[0];
 
         var path = pathFromURL(uri);
@@ -1167,24 +1220,27 @@
             fail(FileError.ENCODING_ERR);
             return;
         }
-        if (path.indexOf(fs.winpath) === 0) { path = path.substr(fs.winpath.length); }
+        if (path.indexOf(fs.winpath) === 0) {
+            path = path.substr(fs.winpath.length);
+        }
         var abspath = cordovaPathToNative(fs.winpath + path);
 
         getFileFromPathAsync(abspath).done(
             function (storageFile) {
                 success(new FileEntry(storageFile.name, path, fs.name, fs.makeNativeURL(path)));
-            }, function () {
-            getFolderFromPathAsync(abspath).done(
+            },
+            function () {
+                getFolderFromPathAsync(abspath).done(
                     function (storageFolder) {
                         success(new DirectoryEntry(storageFolder.name, path, fs.name, fs.makeNativeURL(path)));
-                    }, function () {
-                fail(FileError.NOT_FOUND_ERR);
-            }
+                    },
+                    function () {
+                        fail(FileError.NOT_FOUND_ERR);
+                    }
                 );
-        }
+            }
         );
     }
-
 };
 
 require('cordova/exec/proxy').add('File', module.exports);
diff --git a/tests/tests.js b/tests/tests.js
index a9ae20a..a2c6942 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -18,19 +18,16 @@
  *
  */
 
-/* eslint-env jasmine */
-/* global WebKitBlobBuilder */
+/* global WebKitBlobBuilder, cordova, FileError, resolveLocalFileSystemURL, LocalFileSystem, Flags, Metadata, FileSystem, FileWriter, DirectoryEntry, requestFileSystem */
 
 exports.defineAutoTests = function () {
-    /* eslint-disable no-undef */
-    var isBrowser = (cordova.platformId === 'browser');
+    var isBrowser = cordova.platformId === 'browser';
     // Use feature detection to determine current browser instead of checking user-agent
     var isChrome = isBrowser && window.webkitRequestFileSystem && window.webkitResolveLocalFileSystemURL;
-    var isIE = isBrowser && (window.msIndexedDB);
-    var isIndexedDBShim = isBrowser && !isChrome;   // Firefox and IE for example
+    var isIE = isBrowser && window.msIndexedDB;
+    var isIndexedDBShim = isBrowser && !isChrome; // Firefox and IE for example
 
-    var isWindows = (cordova.platformId === 'windows' || cordova.platformId === 'windows8');
-    /* eslint-enable no-undef */
+    var isWindows = cordova.platformId === 'windows' || cordova.platformId === 'windows8';
     var MEDIUM_TIMEOUT = 15000;
 
     describe('File API', function () {
@@ -61,7 +58,16 @@
                             var pass = error.code === code;
                             return {
                                 pass: pass,
-                                message: 'Expected FileError with code ' + fileErrorMap[error.code] + ' (' + error.code + ') to be ' + fileErrorMap[code] + '(' + code + ')'
+                                message:
+                                    'Expected FileError with code ' +
+                                    fileErrorMap[error.code] +
+                                    ' (' +
+                                    error.code +
+                                    ') to be ' +
+                                    fileErrorMap[code] +
+                                    '(' +
+                                    code +
+                                    ')'
                             };
                         }
                     };
@@ -81,7 +87,8 @@
                 },
                 toFailWithMessage: function () {
                     return {
-                        compare: function (error, message) { // eslint-disable-line handle-callback-err
+                        // eslint-disable-next-line handle-callback-err
+                        compare: function (error, message) {
                             var pass = false;
                             return {
                                 pass: pass,
@@ -97,9 +104,7 @@
                             // "data:application/octet-stream;base64,"
                             var header = url.substr(0, url.indexOf(','));
                             var headerParts = header.split(/[:;]/);
-                            if (headerParts.length === 3 &&
-                                headerParts[0] === 'data' &&
-                                headerParts[2] === 'base64') {
+                            if (headerParts.length === 3 && headerParts[0] === 'data' && headerParts[2] === 'base64') {
                                 pass = true;
                             }
                             var message = 'Expected ' + url + ' to be a valid data url. ' + header + ' is not valid header for data uris';
@@ -116,16 +121,26 @@
                 console.log('[ERROR] Problem setting up root filesystem for test running! Error to follow.');
                 console.log(JSON.stringify(e));
             };
-            window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { // eslint-disable-line no-undef
-                root = fileSystem.root;
-                // set in file.tests.js
-                persistent_root = root;
-                window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, function (fileSystem) { // eslint-disable-line no-undef
-                    temp_root = fileSystem.root;
+            window.requestFileSystem(
+                LocalFileSystem.PERSISTENT,
+                0,
+                function (fileSystem) {
+                    root = fileSystem.root;
                     // set in file.tests.js
-                    done();
-                }, onError);
-            }, onError);
+                    persistent_root = root;
+                    window.requestFileSystem(
+                        LocalFileSystem.TEMPORARY,
+                        0,
+                        function (fileSystem) {
+                            temp_root = fileSystem.root;
+                            // set in file.tests.js
+                            done();
+                        },
+                        onError
+                    );
+                },
+                onError
+            );
         });
         // HELPER FUNCTIONS
         // deletes specified file or directory
@@ -135,46 +150,71 @@
             success = success || function () {};
             error = error || failed.bind(null, success, 'deleteEntry failed.');
 
-            window.resolveLocalFileSystemURL(root.toURL() + '/' + name, function (entry) {
-                if (entry.isDirectory === true) {
-                    entry.removeRecursively(success, error);
-                } else {
-                    entry.remove(success, error);
-                }
-            }, success);
+            window.resolveLocalFileSystemURL(
+                root.toURL() + '/' + name,
+                function (entry) {
+                    if (entry.isDirectory === true) {
+                        entry.removeRecursively(success, error);
+                    } else {
+                        entry.remove(success, error);
+                    }
+                },
+                success
+            );
         };
         // deletes file, if it exists, then invokes callback
         var deleteFile = function (fileName, callback) {
             // entry.remove success callback is required: http://www.w3.org/TR/2011/WD-file-system-api-20110419/#the-entry-interface
             callback = callback || function () {};
 
-            root.getFile(fileName, null, // remove file system entry
+            root.getFile(
+                fileName,
+                null, // remove file system entry
                 function (entry) {
                     entry.remove(callback, function () {
                         console.log('[ERROR] deleteFile cleanup method invoked fail callback.');
                     });
                 }, // doesn't exist
-                callback);
+                callback
+            );
         };
         // deletes and re-creates the specified file
         var createFile = function (fileName, success, error) {
-            deleteEntry(fileName, function () {
-                root.getFile(fileName, {
-                    create: true
-                }, success, error);
-            }, error);
+            deleteEntry(
+                fileName,
+                function () {
+                    root.getFile(
+                        fileName,
+                        {
+                            create: true
+                        },
+                        success,
+                        error
+                    );
+                },
+                error
+            );
         };
         // deletes and re-creates the specified directory
         var createDirectory = function (dirName, success, error) {
-            deleteEntry(dirName, function () {
-                root.getDirectory(dirName, {
-                    create: true
-                }, success, error);
-            }, error);
+            deleteEntry(
+                dirName,
+                function () {
+                    root.getDirectory(
+                        dirName,
+                        {
+                            create: true
+                        },
+                        success,
+                        error
+                    );
+                },
+                error
+            );
         };
         function failed (done, msg, error) {
             var info = typeof msg === 'undefined' ? 'Unexpected error callback' : msg;
-            var codeMsg = (error && error.code) ? (': ' + fileErrorMap[error.code]) : '';
+            var codeMsg = error && error.code ? ': ' + fileErrorMap[error.code] : '';
             expect(true).toFailWithMessage(info + '\n' + JSON.stringify(error) + codeMsg);
             done();
         }
@@ -193,7 +233,6 @@
             return base + extension;
         };
         describe('FileError object', function () {
-            /* eslint-disable no-undef */
             it('file.spec.1 should define FileError constants', function () {
                 expect(FileError.NOT_FOUND_ERR).toBe(1);
                 expect(FileError.SECURITY_ERR).toBe(2);
@@ -213,7 +252,6 @@
             it('file.spec.2 should define LocalFileSystem constants', function () {
                 expect(LocalFileSystem.TEMPORARY).toBe(0);
                 expect(LocalFileSystem.PERSISTENT).toBe(1);
-                /* eslint-enable no-undef */
             });
             describe('window.requestFileSystem', function () {
                 it('file.spec.3 should be defined', function () {
@@ -241,7 +279,12 @@
                     var spaceRequired = isBrowser ? 0 : 1024;
 
                     // retrieve PERSISTENT file system
-                    window.requestFileSystem(LocalFileSystem.PERSISTENT, spaceRequired, win, failed.bind(null, done, 'window.requestFileSystem - Error retrieving PERSISTENT file system')); // eslint-disable-line no-undef
+                    window.requestFileSystem(
+                        LocalFileSystem.PERSISTENT,
+                        spaceRequired,
+                        win,
+                        failed.bind(null, done, 'window.requestFileSystem - Error retrieving PERSISTENT file system')
+                    );
                 });
                 it('file.spec.5 should be able to retrieve a TEMPORARY file system', function (done) {
                     var win = function (fileSystem) {
@@ -257,7 +300,12 @@
                         done();
                     };
                     // retrieve TEMPORARY file system
-                    window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, win, failed.bind(null, done, 'window.requestFileSystem - Error retrieving TEMPORARY file system')); // eslint-disable-line no-undef
+                    window.requestFileSystem(
+                        LocalFileSystem.TEMPORARY,
+                        0,
+                        win,
+                        failed.bind(null, done, 'window.requestFileSystem - Error retrieving TEMPORARY file system')
+                    );
                 });
                 it('file.spec.6 should error if you request a file system that is too large', function (done) {
                     if (isBrowser) {
@@ -272,15 +320,19 @@
 
                     var fail = function (error) {
                         expect(error).toBeDefined();
-                        expect(error).toBeFileError(FileError.QUOTA_EXCEEDED_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.QUOTA_EXCEEDED_ERR);
                         done();
                     };
                     // win = createWin('window.requestFileSystem');
                     // Request the file system
-                    window.requestFileSystem(LocalFileSystem.TEMPORARY, 1000000000000000, failed.bind(null, done, 'window.requestFileSystem - Error retrieving TEMPORARY file system'), fail); // eslint-disable-line no-undef
+                    window.requestFileSystem(
+                        LocalFileSystem.TEMPORARY,
+                        1000000000000000,
+                        failed.bind(null, done, 'window.requestFileSystem - Error retrieving TEMPORARY file system'),
+                        fail
+                    );
                 });
                 it('file.spec.7 should error out if you request a file system that does not exist', function (done) {
-
                     var fail = function (error) {
                         expect(error).toBeDefined();
                         if (isChrome) {
@@ -288,7 +340,7 @@
                             on requesting of a non-existant filesystem. */
                             // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
                         } else {
-                            expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
+                            expect(error).toBeFileError(FileError.SYNTAX_ERR);
                         }
                         done();
                     };
@@ -312,9 +364,18 @@
                         // Clean-up
                         deleteEntry(fileName, done);
                     };
-                    createFile(fileName, function (entry) {
-                        window.resolveLocalFileSystemURL(entry.toURL(), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL()));
-                    }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName), failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                    createFile(
+                        fileName,
+                        function (entry) {
+                            window.resolveLocalFileSystemURL(
+                                entry.toURL(),
+                                win,
+                                failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL())
+                            );
+                        },
+                        failed.bind(null, done, 'createFile - Error creating file: ' + fileName),
+                        failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                    );
                 });
                 it('file.spec.9.1 should resolve a file even with a terminating slash', function (done) {
                     var fileName = 'file.spec.9.1';
@@ -328,10 +389,19 @@
                         // Clean-up
                         deleteEntry(fileName, done);
                     };
-                    createFile(fileName, function (entry) {
-                        var entryURL = entry.toURL() + '/';
-                        window.resolveLocalFileSystemURL(entryURL, win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entryURL));
-                    }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName), failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                    createFile(
+                        fileName,
+                        function (entry) {
+                            var entryURL = entry.toURL() + '/';
+                            window.resolveLocalFileSystemURL(
+                                entryURL,
+                                win,
+                                failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entryURL)
+                            );
+                        },
+                        failed.bind(null, done, 'createFile - Error creating file: ' + fileName),
+                        failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                    );
                 });
                 it('file.spec.9.5 should resolve a directory', function (done) {
                     var fileName = 'file.spec.9.5';
@@ -347,9 +417,18 @@
                     };
                     function gotDirectory (entry) {
                         // lookup file system entry
-                        window.resolveLocalFileSystemURL(entry.toURL(), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving directory URL: ' + entry.toURL()));
+                        window.resolveLocalFileSystemURL(
+                            entry.toURL(),
+                            win,
+                            failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving directory URL: ' + entry.toURL())
+                        );
                     }
-                    createDirectory(fileName, gotDirectory, failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName), failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName));
+                    createDirectory(
+                        fileName,
+                        gotDirectory,
+                        failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName),
+                        failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName)
+                    );
                 });
                 it('file.spec.9.6 should resolve a directory even without a terminating slash', function (done) {
                     var fileName = 'file.spec.9.6';
@@ -367,14 +446,23 @@
                         // lookup file system entry
                         var entryURL = entry.toURL();
                         entryURL = entryURL.substring(0, entryURL.length - 1);
-                        window.resolveLocalFileSystemURL(entryURL, win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving directory URL: ' + entryURL));
+                        window.resolveLocalFileSystemURL(
+                            entryURL,
+                            win,
+                            failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving directory URL: ' + entryURL)
+                        );
                     }
-                    createDirectory(fileName, gotDirectory, failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName), failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName));
+                    createDirectory(
+                        fileName,
+                        gotDirectory,
+                        failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName),
+                        failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName)
+                    );
                 });
 
                 it('file.spec.9.7 should resolve a file with valid nativeURL', function (done) {
                     if (isBrowser) {
-                        pending('browsers doesn\'t return nativeURL');
+                        pending("browsers doesn't return nativeURL");
                     }
                     var fileName = 'de.create.file';
                     var win = function (entry) {
@@ -383,9 +471,14 @@
                         // cleanup
                         deleteEntry(entry.name, done);
                     };
-                    root.getFile(fileName, {
-                        create: true
-                    }, win, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName));
+                    root.getFile(
+                        fileName,
+                        {
+                            create: true
+                        },
+                        win,
+                        succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName)
+                    );
                 });
 
                 it('file.spec.10 resolve valid file name with parameters', function (done) {
@@ -400,51 +493,78 @@
                         deleteEntry(fileName, done);
                     };
                     // create a new file entry
-                    createFile(fileName, function (entry) {
-                        window.resolveLocalFileSystemURL(entry.toURL() + '?1234567890', win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URI: ' + entry.toURL()));
-                    }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                    createFile(
+                        fileName,
+                        function (entry) {
+                            window.resolveLocalFileSystemURL(
+                                entry.toURL() + '?1234567890',
+                                win,
+                                failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URI: ' + entry.toURL())
+                            );
+                        },
+                        failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                    );
                 });
                 it('file.spec.11 should error (NOT_FOUND_ERR) when resolving (non-existent) invalid file name', function (done) {
-                    var fileName = cordova.platformId === 'windowsphone' ? root.toURL() + '/' + 'this.is.not.a.valid.file.txt' : joinURL(root.toURL(), 'this.is.not.a.valid.file.txt'); // eslint-disable-line no-undef
+                    var fileName =
+                        cordova.platformId === 'windowsphone'
+                            ? root.toURL() + '/' + 'this.is.not.a.valid.file.txt'
+                            : joinURL(root.toURL(), 'this.is.not.a.valid.file.txt');
                     var fail = function (error) {
                         expect(error).toBeDefined();
                         if (isChrome) {
-                            expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
+                            expect(error).toBeFileError(FileError.SYNTAX_ERR);
                         } else {
-                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
+                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
                         }
                         done();
                     };
                     // lookup file system entry
-                    window.resolveLocalFileSystemURL(fileName, succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Error unexpected callback resolving file URI: ' + fileName), fail);
+                    window.resolveLocalFileSystemURL(
+                        fileName,
+                        succeed.bind(
+                            null,
+                            done,
+                            'window.resolveLocalFileSystemURL - Error unexpected callback resolving file URI: ' + fileName
+                        ),
+                        fail
+                    );
                 });
                 it('file.spec.12 should error (ENCODING_ERR) when resolving invalid URI with leading /', function (done) {
                     var fileName = '/this.is.not.a.valid.url';
                     var fail = function (error) {
                         expect(error).toBeDefined();
                         if (isChrome) {
-                        // O.o chrome returns error code 0
+                            // O.o chrome returns error code 0
                         } else {
-                            expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef
+                            expect(error).toBeFileError(FileError.ENCODING_ERR);
                         }
                         done();
                     };
                     // lookup file system entry
-                    window.resolveLocalFileSystemURL(fileName, succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Error unexpected callback resolving file URI: ' + fileName), fail);
+                    window.resolveLocalFileSystemURL(
+                        fileName,
+                        succeed.bind(
+                            null,
+                            done,
+                            'window.resolveLocalFileSystemURL - Error unexpected callback resolving file URI: ' + fileName
+                        ),
+                        fail
+                    );
                 });
             });
         });
         // LocalFileSystem
         describe('Metadata interface', function () {
             it('file.spec.13 should exist and have the right properties', function () {
-                var metadata = new Metadata(); // eslint-disable-line no-undef
+                var metadata = new Metadata();
                 expect(metadata).toBeDefined();
                 expect(metadata.modificationTime).toBeDefined();
             });
         });
         describe('Flags interface', function () {
             it('file.spec.14 should exist and have the right properties', function () {
-                var flags = new Flags(false, true); // eslint-disable-line no-undef
+                var flags = new Flags(false, true);
                 expect(flags).toBeDefined();
                 expect(flags.create).toBeDefined();
                 expect(flags.create).toBe(false);
@@ -472,7 +592,11 @@
                     expect(entry.removeRecursively).toBeDefined();
                     done();
                 };
-                window.resolveLocalFileSystemURL(root.toURL(), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URI: ' + root.toURL()));
+                window.resolveLocalFileSystemURL(
+                    root.toURL(),
+                    win,
+                    failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URI: ' + root.toURL())
+                );
             });
         });
         describe('DirectoryEntry', function () {
@@ -481,16 +605,21 @@
                 var fail = function (error) {
                     expect(error).toBeDefined();
                     if (isChrome) {
-                        expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.SYNTAX_ERR);
                     } else {
-                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
                     }
                     done();
                 };
                 // create:false, exclusive:false, file does not exist
-                root.getFile(fileName, {
-                    create: false
-                }, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName), fail);
+                root.getFile(
+                    fileName,
+                    {
+                        create: false
+                    },
+                    succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName),
+                    fail
+                );
             });
             it('file.spec.17 getFile: create new file', function (done) {
                 var fileName = 'de.create.file';
@@ -505,9 +634,14 @@
                     deleteEntry(entry.name, done);
                 };
                 // create:true, exclusive:false, file does not exist
-                root.getFile(fileName, {
-                    create: true
-                }, win, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    win,
+                    succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName)
+                );
             });
             it('file.spec.18 getFile: create new file (exclusive)', function (done) {
                 var fileName = 'de.create.exclusive.file';
@@ -522,10 +656,15 @@
                     deleteEntry(entry.name, done);
                 };
                 // create:true, exclusive:true, file does not exist
-                root.getFile(fileName, {
-                    create: true,
-                    exclusive: true
-                }, win, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true,
+                        exclusive: true
+                    },
+                    win,
+                    failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.19 getFile: create file that already exists', function (done) {
                 var fileName = 'de.create.existing.file';
@@ -543,15 +682,25 @@
 
                 function getFile (file) {
                     // create:true, exclusive:false, file exists
-                    root.getFile(fileName, {
-                        create: true
-                    }, win, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName));
+                    root.getFile(
+                        fileName,
+                        {
+                            create: true
+                        },
+                        win,
+                        failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)
+                    );
                 }
 
                 // create file to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, getFile, failed.bind(null, done, 'root.getFile - Error on initial creating file: ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    getFile,
+                    failed.bind(null, done, 'root.getFile - Error on initial creating file: ' + fileName)
+                );
             });
             it('file.spec.20 getFile: create file that already exists (exclusive)', function (done) {
                 var fileName = 'de.create.exclusive.existing.file';
@@ -564,7 +713,7 @@
                         on trying to exclusively create a file, which already exists in Chrome. */
                         // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
                     } else {
-                        expect(error).toBeFileError(FileError.PATH_EXISTS_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.PATH_EXISTS_ERR);
                     }
                     // cleanup
                     deleteEntry(existingFile.name, done);
@@ -573,16 +722,30 @@
                 function getFile (file) {
                     existingFile = file;
                     // create:true, exclusive:true, file exists
-                    root.getFile(fileName, {
-                        create: true,
-                        exclusive: true
-                    }, succeed.bind(null, done, 'root.getFile - getFile function - Error unexpected callback, file should exists: ' + fileName), fail);
+                    root.getFile(
+                        fileName,
+                        {
+                            create: true,
+                            exclusive: true
+                        },
+                        succeed.bind(
+                            null,
+                            done,
+                            'root.getFile - getFile function - Error unexpected callback, file should exists: ' + fileName
+                        ),
+                        fail
+                    );
                 }
 
                 // create file to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, getFile, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    getFile,
+                    failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.21 DirectoryEntry.getFile: get Entry for existing file', function (done) {
                 var fileName = 'de.get.file';
@@ -600,14 +763,24 @@
                 };
                 var getFile = function (file) {
                     // create:false, exclusive:false, file exists
-                    root.getFile(fileName, {
-                        create: false
-                    }, win, failed.bind(null, done, 'root.getFile - Error getting file entry: ' + fileName));
+                    root.getFile(
+                        fileName,
+                        {
+                            create: false
+                        },
+                        win,
+                        failed.bind(null, done, 'root.getFile - Error getting file entry: ' + fileName)
+                    );
                 };
                 // create file to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, getFile, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    getFile,
+                    failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.22 DirectoryEntry.getFile: get FileEntry for invalid path', function (done) {
                 if (isBrowser) {
@@ -619,29 +792,39 @@
                 var fileName = 'de:invalid:path';
                 var fail = function (error) {
                     expect(error).toBeDefined();
-                    expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef
+                    expect(error).toBeFileError(FileError.ENCODING_ERR);
                     done();
                 };
                 // create:false, exclusive:false, invalid path
-                root.getFile(fileName, {
-                    create: false
-                }, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName), fail);
+                root.getFile(
+                    fileName,
+                    {
+                        create: false
+                    },
+                    succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName),
+                    fail
+                );
             });
             it('file.spec.23 DirectoryEntry.getDirectory: get Entry for directory that does not exist', function (done) {
                 var dirName = 'de.no.dir';
                 var fail = function (error) {
                     expect(error).toBeDefined();
                     if (isChrome) {
-                        expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.SYNTAX_ERR);
                     } else {
-                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
                     }
                     done();
                 };
                 // create:false, exclusive:false, directory does not exist
-                root.getDirectory(dirName, {
-                    create: false
-                }, succeed.bind(null, done, 'root.getDirectory - Error unexpected callback, directory should not exists: ' + dirName), fail);
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: false
+                    },
+                    succeed.bind(null, done, 'root.getDirectory - Error unexpected callback, directory should not exists: ' + dirName),
+                    fail
+                );
             });
             it('file.spec.24 DirectoryEntry.getDirectory: create new dir with space then resolveLocalFileSystemURL', function (done) {
                 var dirName = 'de create dir';
@@ -661,13 +844,22 @@
                     expect(dirEntry.filesystem).toBe(root.filesystem);
                     var dirURI = dirEntry.toURL();
                     // now encode URI and try to resolve
-                    window.resolveLocalFileSystemURL(dirURI, win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - getDir function - Error resolving directory: ' + dirURI));
+                    window.resolveLocalFileSystemURL(
+                        dirURI,
+                        win,
+                        failed.bind(null, done, 'window.resolveLocalFileSystemURL - getDir function - Error resolving directory: ' + dirURI)
+                    );
                 }
 
                 // create:true, exclusive:false, directory does not exist
-                root.getDirectory(dirName, {
-                    create: true
-                }, getDir, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true
+                    },
+                    getDir,
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             // This test is excluded, and should probably be removed. Filesystem
             // should always be properly encoded URLs, and *not* raw paths, and it
@@ -692,13 +884,22 @@
                 function getDir (dirEntry) {
                     var dirURI = dirEntry.toURL();
                     // now encode URI and try to resolve
-                    window.resolveLocalFileSystemURL(encodeURI(dirURI), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - getDir function - Error resolving directory: ' + dirURI));
+                    window.resolveLocalFileSystemURL(
+                        encodeURI(dirURI),
+                        win,
+                        failed.bind(null, done, 'window.resolveLocalFileSystemURL - getDir function - Error resolving directory: ' + dirURI)
+                    );
                 }
 
                 // create:true, exclusive:false, directory does not exist
-                root.getDirectory(dirName, {
-                    create: true
-                }, getDir, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true
+                    },
+                    getDir,
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.26 DirectoryEntry.getDirectory: create new directory', function (done) {
                 var dirName = 'de.create.dir';
@@ -715,9 +916,14 @@
                     deleteEntry(directory.name, done);
                 };
                 // create:true, exclusive:false, directory does not exist
-                root.getDirectory(dirName, {
-                    create: true
-                }, win, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true
+                    },
+                    win,
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.27 DirectoryEntry.getDirectory: create new directory (exclusive)', function (done) {
                 var dirName = 'de.create.exclusive.dir';
@@ -734,10 +940,15 @@
                     deleteEntry(directory.name, done);
                 };
                 // create:true, exclusive:true, directory does not exist
-                root.getDirectory(dirName, {
-                    create: true,
-                    exclusive: true
-                }, win, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true,
+                        exclusive: true
+                    },
+                    win,
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.28 DirectoryEntry.getDirectory: create directory that already exists', function (done) {
                 var dirName = 'de.create.existing.dir';
@@ -752,41 +963,64 @@
                     deleteEntry(directory.name, done);
                 };
                 // create directory to kick off it
-                root.getDirectory(dirName, {
-                    create: true
-                }, function () {
-                    root.getDirectory(dirName, {
+                root.getDirectory(
+                    dirName,
+                    {
                         create: true
-                    }, win, failed.bind(null, done, 'root.getDirectory - Error creating existent second directory : ' + dirName));
-                }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                    },
+                    function () {
+                        root.getDirectory(
+                            dirName,
+                            {
+                                create: true
+                            },
+                            win,
+                            failed.bind(null, done, 'root.getDirectory - Error creating existent second directory : ' + dirName)
+                        );
+                    },
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.29 DirectoryEntry.getDirectory: create directory that already exists (exclusive)', function (done) {
-
                 var dirName = 'de.create.exclusive.existing.dir';
                 var existingDir;
                 var fail = function (error) {
                     expect(error).toBeDefined();
                     if (isChrome) {
-                    /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of PATH_EXISTS_ERR(code: 12)
+                        /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of PATH_EXISTS_ERR(code: 12)
                     on trying to exclusively create a file or directory, which already exists (Chrome). */
-                    // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                        // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
                     } else {
-                        expect(error).toBeFileError(FileError.PATH_EXISTS_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.PATH_EXISTS_ERR);
                     }
                     // cleanup
                     deleteEntry(existingDir.name, done);
                 };
                 // create directory to kick off it
-                root.getDirectory(dirName, {
-                    create: true
-                }, function (directory) {
-                    existingDir = directory;
-                    // create:true, exclusive:true, directory exists
-                    root.getDirectory(dirName, {
-                        create: true,
-                        exclusive: true
-                    }, failed.bind(null, done, 'root.getDirectory - Unexpected success callback, second directory should not be created : ' + dirName), fail);
-                }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true
+                    },
+                    function (directory) {
+                        existingDir = directory;
+                        // create:true, exclusive:true, directory exists
+                        root.getDirectory(
+                            dirName,
+                            {
+                                create: true,
+                                exclusive: true
+                            },
+                            failed.bind(
+                                null,
+                                done,
+                                'root.getDirectory - Unexpected success callback, second directory should not be created : ' + dirName
+                            ),
+                            fail
+                        );
+                    },
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.30 DirectoryEntry.getDirectory: get Entry for existing directory', function (done) {
                 var dirName = 'de.get.dir';
@@ -801,13 +1035,23 @@
                     deleteEntry(directory.name, done);
                 };
                 // create directory to kick it off
-                root.getDirectory(dirName, {
-                    create: true
-                }, function () {
-                    root.getDirectory(dirName, {
-                        create: false
-                    }, win, failed.bind(null, done, 'root.getDirectory - Error getting directory entry : ' + dirName));
-                }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true
+                    },
+                    function () {
+                        root.getDirectory(
+                            dirName,
+                            {
+                                create: false
+                            },
+                            win,
+                            failed.bind(null, done, 'root.getDirectory - Error getting directory entry : ' + dirName)
+                        );
+                    },
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.31 DirectoryEntry.getDirectory: get DirectoryEntry for invalid path', function (done) {
                 if (isBrowser) {
@@ -819,13 +1063,18 @@
                 var dirName = 'de:invalid:path';
                 var fail = function (error) {
                     expect(error).toBeDefined();
-                    expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef
+                    expect(error).toBeFileError(FileError.ENCODING_ERR);
                     done();
                 };
                 // create:false, exclusive:false, invalid path
-                root.getDirectory(dirName, {
-                    create: false
-                }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory should not exists: ' + dirName), fail);
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: false
+                    },
+                    succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory should not exists: ' + dirName),
+                    fail
+                );
             });
             it('file.spec.32 DirectoryEntry.getDirectory: get DirectoryEntry for existing file', function (done) {
                 var fileName = 'de.existing.file';
@@ -833,22 +1082,36 @@
                 var fail = function (error) {
                     expect(error).toBeDefined();
                     if (isChrome) {
-                    // chrome returns an unknown error with code 17
+                        // chrome returns an unknown error with code 17
                     } else {
-                        expect(error).toBeFileError(FileError.TYPE_MISMATCH_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.TYPE_MISMATCH_ERR);
                     }
                     // cleanup
                     deleteEntry(existingFile.name, done);
                 };
                 // create file to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, function (file) {
-                    existingFile = file;
-                    root.getDirectory(fileName, {
-                        create: false
-                    }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory should not exists: ' + fileName), fail);
-                }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    function (file) {
+                        existingFile = file;
+                        root.getDirectory(
+                            fileName,
+                            {
+                                create: false
+                            },
+                            succeed.bind(
+                                null,
+                                done,
+                                'root.getDirectory - Unexpected success callback, directory should not exists: ' + fileName
+                            ),
+                            fail
+                        );
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.33 DirectoryEntry.getFile: get FileEntry for existing directory', function (done) {
                 var dirName = 'de.existing.dir';
@@ -856,22 +1119,32 @@
                 var fail = function (error) {
                     expect(error).toBeDefined();
                     if (isChrome) {
-                    // chrome returns an unknown error with code 17
+                        // chrome returns an unknown error with code 17
                     } else {
-                        expect(error).toBeFileError(FileError.TYPE_MISMATCH_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.TYPE_MISMATCH_ERR);
                     }
                     // cleanup
                     deleteEntry(existingDir.name, done);
                 };
                 // create directory to kick off it
-                root.getDirectory(dirName, {
-                    create: true
-                }, function (directory) {
-                    existingDir = directory;
-                    root.getFile(dirName, {
-                        create: false
-                    }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, file should not exists: ' + dirName), fail);
-                }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true
+                    },
+                    function (directory) {
+                        existingDir = directory;
+                        root.getFile(
+                            dirName,
+                            {
+                                create: false
+                            },
+                            succeed.bind(null, done, 'root.getFile - Unexpected success callback, file should not exists: ' + dirName),
+                            fail
+                        );
+                    },
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.34 DirectoryEntry.removeRecursively on directory', function (done) {
                 var dirName = 'de.removeRecursively';
@@ -879,26 +1152,45 @@
                 var dirExists = function (error) {
                     expect(error).toBeDefined();
                     if (isChrome) {
-                        expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.SYNTAX_ERR);
                     } else {
-                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
                     }
                     done();
                 };
                 // create a new directory entry to kick off it
-                root.getDirectory(dirName, {
-                    create: true
-                }, function (entry) {
-                    entry.getDirectory(subDirName, {
+                root.getDirectory(
+                    dirName,
+                    {
                         create: true
-                    }, function (dir) {
-                        entry.removeRecursively(function () {
-                            root.getDirectory(dirName, {
-                                create: false
-                            }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory should not exists: ' + dirName), dirExists);
-                        }, failed.bind(null, done, 'entry.removeRecursively - Error removing directory recursively : ' + dirName));
-                    }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + subDirName));
-                }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                    },
+                    function (entry) {
+                        entry.getDirectory(
+                            subDirName,
+                            {
+                                create: true
+                            },
+                            function (dir) {
+                                entry.removeRecursively(function () {
+                                    root.getDirectory(
+                                        dirName,
+                                        {
+                                            create: false
+                                        },
+                                        succeed.bind(
+                                            null,
+                                            done,
+                                            'root.getDirectory - Unexpected success callback, directory should not exists: ' + dirName
+                                        ),
+                                        dirExists
+                                    );
+                                }, failed.bind(null, done, 'entry.removeRecursively - Error removing directory recursively : ' + dirName));
+                            },
+                            failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + subDirName)
+                        );
+                    },
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.35 createReader: create reader on existing directory', function () {
                 // create reader for root directory
@@ -907,7 +1199,6 @@
                 expect(typeof reader.readEntries).toBe('function');
             });
             it('file.spec.36 removeRecursively on root file system', function (done) {
-
                 var remove = function (error) {
                     expect(error).toBeDefined();
                     if (isChrome) {
@@ -916,12 +1207,15 @@
                         on the root file system (Chrome). */
                         // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
                     } else {
-                        expect(error).toBeFileError(FileError.NO_MODIFICATION_ALLOWED_ERR); // eslint-disable-line no-undef
+                        expect(error).toBeFileError(FileError.NO_MODIFICATION_ALLOWED_ERR);
                     }
                     done();
                 };
                 // remove root file system
-                root.removeRecursively(succeed.bind(null, done, 'root.removeRecursively - Unexpected success callback, root cannot be removed'), remove);
+                root.removeRecursively(
+                    succeed.bind(null, done, 'root.removeRecursively - Unexpected success callback, root cannot be removed'),
+                    remove
+                );
             });
         });
         describe('DirectoryReader interface', function () {
@@ -941,96 +1235,138 @@
                 it('file.spec.37.1 should read contents of existing directory', function (done) {
                     var dirName = 'readEntries.dir';
                     var fileName = 'readeEntries.file';
-                    root.getDirectory(dirName, {
-                        create: true
-                    }, function (directory) {
-                        directory.getFile(fileName, {
+                    root.getDirectory(
+                        dirName,
+                        {
                             create: true
-                        }, function (fileEntry) {
-                            var reader = directory.createReader();
-                            reader.readEntries(function (entries) {
-                                expect(entries).toBeDefined();
-                                expect(entries instanceof Array).toBe(true);
-                                expect(entries.length).toBe(1);
-                                expect(entries[0].fullPath).toCanonicallyMatch(fileEntry.fullPath);
-                                expect(entries[0].filesystem).not.toBe(null);
-                                if (isChrome) {
-                                    // Slicing '[object {type}]' -> '{type}'
-                                    expect(entries[0].filesystem.toString().slice(8, -1)).toEqual('DOMFileSystem');
-                                } else {
-                                    expect(entries[0].filesystem instanceof FileSystem).toBe(true); // eslint-disable-line no-undef
-                                }
+                        },
+                        function (directory) {
+                            directory.getFile(
+                                fileName,
+                                {
+                                    create: true
+                                },
+                                function (fileEntry) {
+                                    var reader = directory.createReader();
+                                    reader.readEntries(function (entries) {
+                                        expect(entries).toBeDefined();
+                                        expect(entries instanceof Array).toBe(true);
+                                        expect(entries.length).toBe(1);
+                                        expect(entries[0].fullPath).toCanonicallyMatch(fileEntry.fullPath);
+                                        expect(entries[0].filesystem).not.toBe(null);
+                                        if (isChrome) {
+                                            // Slicing '[object {type}]' -> '{type}'
+                                            expect(entries[0].filesystem.toString().slice(8, -1)).toEqual('DOMFileSystem');
+                                        } else {
+                                            expect(entries[0].filesystem instanceof FileSystem).toBe(true);
+                                        }
 
-                                // cleanup
-                                deleteEntry(directory.name, done);
-                            }, failed.bind(null, done, 'reader.readEntries - Error reading entries from directory: ' + dirName));
-                        }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + fileName));
-                    }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                                        // cleanup
+                                        deleteEntry(directory.name, done);
+                                    }, failed.bind(null, done, 'reader.readEntries - Error reading entries from directory: ' + dirName));
+                                },
+                                failed.bind(null, done, 'directory.getFile - Error creating file : ' + fileName)
+                            );
+                        },
+                        failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                    );
                 });
                 it('file.spec.109 should return an empty entry list on the second call', function (done) {
                     var reader;
                     var fileName = 'test109.txt';
                     // Add a file to ensure the root directory is non-empty and then read the contents of the directory.
-                    root.getFile(fileName, {
-                        create: true
-                    }, function (entry) {
-                        reader = root.createReader();
-                        // First read
-                        reader.readEntries(function (entries) {
-                            expect(entries).toBeDefined();
-                            expect(entries instanceof Array).toBe(true);
-                            expect(entries.length).not.toBe(0);
-                            // Second read
-                            reader.readEntries(function (entries_) {
-                                expect(entries_).toBeDefined();
-                                expect(entries_ instanceof Array).toBe(true);
-                                expect(entries_.length).toBe(0);
-                                // Clean up
-                                deleteEntry(entry.name, done);
-                            }, failed.bind(null, done, 'reader.readEntries - Error during SECOND reading of entries from [root] directory'));
-                        }, failed.bind(null, done, 'reader.readEntries - Error during FIRST reading of entries from [root] directory'));
-                    }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName));
+                    root.getFile(
+                        fileName,
+                        {
+                            create: true
+                        },
+                        function (entry) {
+                            reader = root.createReader();
+                            // First read
+                            reader.readEntries(function (entries) {
+                                expect(entries).toBeDefined();
+                                expect(entries instanceof Array).toBe(true);
+                                expect(entries.length).not.toBe(0);
+                                // Second read
+                                reader.readEntries(function (entries_) {
+                                    expect(entries_).toBeDefined();
+                                    expect(entries_ instanceof Array).toBe(true);
+                                    expect(entries_.length).toBe(0);
+                                    // Clean up
+                                    deleteEntry(entry.name, done);
+                                }, failed.bind(
+                                    null,
+                                    done,
+                                    'reader.readEntries - Error during SECOND reading of entries from [root] directory'
+                                ));
+                            }, failed.bind(null, done, 'reader.readEntries - Error during FIRST reading of entries from [root] directory'));
+                        },
+                        failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)
+                    );
                 });
             });
             it('file.spec.38 should read contents of directory that has been removed', function (done) {
                 var dirName = 'de.createReader.notfound';
                 // create a new directory entry to kick off it
-                root.getDirectory(dirName, {
-                    create: true
-                }, function (directory) {
-                    directory.removeRecursively(function () {
-                        var reader = directory.createReader();
-                        reader.readEntries(succeed.bind(null, done, 'reader.readEntries - Unexpected success callback, it should not read entries from deleted dir: ' + dirName), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                            } else {
-                                expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                            }
-                            root.getDirectory(dirName, {
-                                create: false
-                            }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, it should not get deleted directory: ' + dirName), function (err) {
-                                expect(err).toBeDefined();
-                                if (isChrome) {
-                                    expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                } else {
-                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
+                root.getDirectory(
+                    dirName,
+                    {
+                        create: true
+                    },
+                    function (directory) {
+                        directory.removeRecursively(function () {
+                            var reader = directory.createReader();
+                            reader.readEntries(
+                                succeed.bind(
+                                    null,
+                                    done,
+                                    'reader.readEntries - Unexpected success callback, it should not read entries from deleted dir: ' +
+                                        dirName
+                                ),
+                                function (error) {
+                                    expect(error).toBeDefined();
+                                    if (isChrome) {
+                                        expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                    } else {
+                                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                    }
+                                    root.getDirectory(
+                                        dirName,
+                                        {
+                                            create: false
+                                        },
+                                        succeed.bind(
+                                            null,
+                                            done,
+                                            'root.getDirectory - Unexpected success callback, it should not get deleted directory: ' +
+                                                dirName
+                                        ),
+                                        function (err) {
+                                            expect(err).toBeDefined();
+                                            if (isChrome) {
+                                                expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                            } else {
+                                                expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                            }
+                                            done();
+                                        }
+                                    );
                                 }
-                                done();
-                            });
-                        });
-                    }, failed.bind(null, done, 'directory.removeRecursively - Error removing directory recursively : ' + dirName));
-                }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                            );
+                        }, failed.bind(null, done, 'directory.removeRecursively - Error removing directory recursively : ' + dirName));
+                    },
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
         });
         // DirectoryReader interface
         describe('File', function () {
             it('file.spec.39 constructor should be defined', function () {
-                expect(File).toBeDefined(); // eslint-disable-line no-undef
+                expect(File).toBeDefined();
                 expect(typeof File).toBe('function');
             });
             it('file.spec.40 should be define File attributes', function () {
-                var file = new File(); // eslint-disable-line no-undef
+                var file = new File();
                 expect(file.name).toBeDefined();
                 expect(file.type).toBeDefined();
                 expect(file.lastModifiedDate).toBeDefined();
@@ -1039,7 +1375,6 @@
         });
         // File
         describe('FileEntry', function () {
-
             it('file.spec.41 should be define FileEntry methods', function (done) {
                 var fileName = 'fe.methods';
                 var testFileEntry = function (fileEntry) {
@@ -1050,9 +1385,14 @@
                     deleteEntry(fileEntry.name, done);
                 };
                 // create a new file entry to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, testFileEntry, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    testFileEntry,
+                    failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.42 createWriter should return a FileWriter object', function (done) {
                 var fileName = 'fe.createWriter';
@@ -1060,22 +1400,30 @@
                 var testWriter = function (writer) {
                     expect(writer).toBeDefined();
                     if (isChrome) {
-                    // Slicing '[object {type}]' -> '{type}'
+                        // Slicing '[object {type}]' -> '{type}'
                         expect(writer.toString().slice(8, -1)).toEqual('FileWriter');
                     } else {
-                        expect(writer instanceof FileWriter).toBe(true); // eslint-disable-line no-undef
+                        expect(writer instanceof FileWriter).toBe(true);
                     }
 
                     // cleanup
                     deleteEntry(testFile.name, done);
                 };
                 // create a new file entry to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, function (fileEntry) {
-                    testFile = fileEntry;
-                    fileEntry.createWriter(testWriter, failed.bind(null, done, 'fileEntry.createWriter - Error creating Writer from entry'));
-                }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    function (fileEntry) {
+                        testFile = fileEntry;
+                        fileEntry.createWriter(
+                            testWriter,
+                            failed.bind(null, done, 'fileEntry.createWriter - Error creating Writer from entry')
+                        );
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.43 file should return a File object', function (done) {
                 var fileName = 'fe.file';
@@ -1083,41 +1431,61 @@
                 var testFile = function (file) {
                     expect(file).toBeDefined();
                     if (isChrome) {
-                    // Slicing '[object {type}]' -> '{type}'
+                        // Slicing '[object {type}]' -> '{type}'
                         expect(file.toString().slice(8, -1)).toEqual('File');
                     } else {
-                        expect(file instanceof File).toBe(true); // eslint-disable-line no-undef
+                        expect(file instanceof File).toBe(true);
                     }
 
                     // cleanup
                     deleteEntry(newFile.name, done);
                 };
                 // create a new file entry to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, function (fileEntry) {
-                    newFile = fileEntry;
-                    fileEntry.file(testFile, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    function (fileEntry) {
+                        newFile = fileEntry;
+                        fileEntry.file(
+                            testFile,
+                            failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)
+                        );
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.44 file: on File that has been removed', function (done) {
                 var fileName = 'fe.no.file';
                 // create a new file entry to kick off it
-                root.getFile(fileName, {
-                    create: true
-                }, function (fileEntry) {
-                    fileEntry.remove(function () {
-                        fileEntry.file(succeed.bind(null, done, 'fileEntry.file - Unexpected success callback, file it should not be created from removed entry'), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                            } else {
-                                expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                            }
-                            done();
-                        });
-                    }, failed.bind(null, done, 'fileEntry.remove - Error removing entry : ' + fileName));
-                }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    function (fileEntry) {
+                        fileEntry.remove(function () {
+                            fileEntry.file(
+                                succeed.bind(
+                                    null,
+                                    done,
+                                    'fileEntry.file - Unexpected success callback, file it should not be created from removed entry'
+                                ),
+                                function (error) {
+                                    expect(error).toBeDefined();
+                                    if (isChrome) {
+                                        expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                    } else {
+                                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                    }
+                                    done();
+                                }
+                            );
+                        }, failed.bind(null, done, 'fileEntry.remove - Error removing entry : ' + fileName));
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)
+                );
             });
         });
         // FileEntry
@@ -1149,15 +1517,19 @@
             it('file.spec.46 Entry.getMetadata on file', function (done) {
                 var fileName = 'entry.metadata.file';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    entry.getMetadata(function (metadata) {
-                        expect(metadata).toBeDefined();
-                        expect(metadata.modificationTime instanceof Date).toBe(true);
-                        expect(typeof metadata.size).toBe('number');
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'entry.getMetadata - Error getting metadata from entry : ' + fileName));
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        entry.getMetadata(function (metadata) {
+                            expect(metadata).toBeDefined();
+                            expect(metadata.modificationTime instanceof Date).toBe(true);
+                            expect(typeof metadata.size).toBe('number');
+                            // cleanup
+                            deleteEntry(fileName, done);
+                        }, failed.bind(null, done, 'entry.getMetadata - Error getting metadata from entry : ' + fileName));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.47 Entry.getMetadata on directory', function (done) {
                 if (isIndexedDBShim) {
@@ -1167,42 +1539,54 @@
 
                 var dirName = 'entry.metadata.dir';
                 // create a new directory entry
-                createDirectory(dirName, function (entry) {
-                    entry.getMetadata(function (metadata) {
-                        expect(metadata).toBeDefined();
-                        expect(metadata.modificationTime instanceof Date).toBe(true);
-                        expect(typeof metadata.size).toBe('number');
-                        expect(metadata.size).toBe(0);
-                        // cleanup
-                        deleteEntry(dirName, done);
-                    }, failed.bind(null, done, 'entry.getMetadata - Error getting metadata from entry : ' + dirName));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName));
+                createDirectory(
+                    dirName,
+                    function (entry) {
+                        entry.getMetadata(function (metadata) {
+                            expect(metadata).toBeDefined();
+                            expect(metadata.modificationTime instanceof Date).toBe(true);
+                            expect(typeof metadata.size).toBe('number');
+                            expect(metadata.size).toBe(0);
+                            // cleanup
+                            deleteEntry(dirName, done);
+                        }, failed.bind(null, done, 'entry.getMetadata - Error getting metadata from entry : ' + dirName));
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.48 Entry.getParent on file in root file system', function (done) {
                 var fileName = 'entry.parent.file';
                 var rootPath = root.fullPath;
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    entry.getParent(function (parent) {
-                        expect(parent).toBeDefined();
-                        expect(parent.fullPath).toCanonicallyMatch(rootPath);
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'entry.getParent - Error getting parent directory of file : ' + fileName));
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        entry.getParent(function (parent) {
+                            expect(parent).toBeDefined();
+                            expect(parent.fullPath).toCanonicallyMatch(rootPath);
+                            // cleanup
+                            deleteEntry(fileName, done);
+                        }, failed.bind(null, done, 'entry.getParent - Error getting parent directory of file : ' + fileName));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.49 Entry.getParent on directory in root file system', function (done) {
                 var dirName = 'entry.parent.dir';
                 var rootPath = root.fullPath;
                 // create a new directory entry
-                createDirectory(dirName, function (entry) {
-                    entry.getParent(function (parent) {
-                        expect(parent).toBeDefined();
-                        expect(parent.fullPath).toCanonicallyMatch(rootPath);
-                        // cleanup
-                        deleteEntry(dirName, done);
-                    }, failed.bind(null, done, 'entry.getParent - Error getting parent directory of directory : ' + dirName));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName));
+                createDirectory(
+                    dirName,
+                    function (entry) {
+                        entry.getParent(function (parent) {
+                            expect(parent).toBeDefined();
+                            expect(parent.fullPath).toCanonicallyMatch(rootPath);
+                            // cleanup
+                            deleteEntry(dirName, done);
+                        }, failed.bind(null, done, 'entry.getParent - Error getting parent directory of directory : ' + dirName));
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.50 Entry.getParent on root file system', function (done) {
                 var rootPath = root.fullPath;
@@ -1231,74 +1615,122 @@
                 var dirName_1 = 'num 1';
                 var dirName_2 = 'num 2';
                 var rootPath = root.fullPath;
-                createDirectory(dirName_1, function (entry) {
-                    entry.getDirectory(dirName_2, {
-                        create: true
-                    }, function (entryFile) {
-                        var uri = entryFile.toURL();
-                        expect(uri).toBeDefined();
-                        expect(uri).toContain('/num%201/num%202/');
-                        expect(uri.indexOf(rootPath)).not.toBe(-1);
-                        // cleanup
-                        deleteEntry(dirName_1, done);
-                    }, failed.bind(null, done, 'entry.getDirectory - Error creating directory : ' + dirName_2));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName_1));
+                createDirectory(
+                    dirName_1,
+                    function (entry) {
+                        entry.getDirectory(
+                            dirName_2,
+                            {
+                                create: true
+                            },
+                            function (entryFile) {
+                                var uri = entryFile.toURL();
+                                expect(uri).toBeDefined();
+                                expect(uri).toContain('/num%201/num%202/');
+                                expect(uri.indexOf(rootPath)).not.toBe(-1);
+                                // cleanup
+                                deleteEntry(dirName_1, done);
+                            },
+                            failed.bind(null, done, 'entry.getDirectory - Error creating directory : ' + dirName_2)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName_1)
+                );
             });
             it('file.spec.53 Entry.remove on file', function (done) {
                 var fileName = 'entr .rm.file';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    expect(entry).toBeDefined();
-                    entry.remove(function () {
-                        root.getFile(fileName, null, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get deleted file : ' + fileName), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                            } else {
-                                expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                            }
-                            // cleanup
-                            deleteEntry(fileName, done);
-                        });
-                    }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + fileName));
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        expect(entry).toBeDefined();
+                        entry.remove(function () {
+                            root.getFile(
+                                fileName,
+                                null,
+                                succeed.bind(
+                                    null,
+                                    done,
+                                    'root.getFile - Unexpected success callback, it should not get deleted file : ' + fileName
+                                ),
+                                function (error) {
+                                    expect(error).toBeDefined();
+                                    if (isChrome) {
+                                        expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                    } else {
+                                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                    }
+                                    // cleanup
+                                    deleteEntry(fileName, done);
+                                }
+                            );
+                        }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + fileName));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.53.1 Entry.remove on filename with #s', function (done) {
                 if (isBrowser) {
-                    pending('Browsers can\'t do that');
+                    pending("Browsers can't do that");
                 }
                 var fileName = 'entry.#rm#.file';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    expect(entry).toBeDefined();
-                    entry.remove(function () {
-                        root.getFile(fileName, null, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get deleted file : ' + fileName), function (error) {
-                            expect(error).toBeDefined();
-                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                            // cleanup
-                            deleteEntry(fileName, done);
-                        });
-                    }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + fileName));
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        expect(entry).toBeDefined();
+                        entry.remove(function () {
+                            root.getFile(
+                                fileName,
+                                null,
+                                succeed.bind(
+                                    null,
+                                    done,
+                                    'root.getFile - Unexpected success callback, it should not get deleted file : ' + fileName
+                                ),
+                                function (error) {
+                                    expect(error).toBeDefined();
+                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                    // cleanup
+                                    deleteEntry(fileName, done);
+                                }
+                            );
+                        }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + fileName));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + fileName)
+                );
             });
             it('file.spec.54 remove on empty directory', function (done) {
                 var dirName = 'entry.rm.dir';
                 // create a new directory entry
-                createDirectory(dirName, function (entry) {
-                    expect(entry).toBeDefined();
-                    entry.remove(function () {
-                        root.getDirectory(dirName, null, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, it should not get deleted directory : ' + dirName), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                            } else {
-                                expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                            }
-                            // cleanup
-                            deleteEntry(dirName, done);
-                        });
-                    }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + dirName));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName));
+                createDirectory(
+                    dirName,
+                    function (entry) {
+                        expect(entry).toBeDefined();
+                        entry.remove(function () {
+                            root.getDirectory(
+                                dirName,
+                                null,
+                                succeed.bind(
+                                    null,
+                                    done,
+                                    'root.getDirectory - Unexpected success callback, it should not get deleted directory : ' + dirName
+                                ),
+                                function (error) {
+                                    expect(error).toBeDefined();
+                                    if (isChrome) {
+                                        expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                    } else {
+                                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                    }
+                                    // cleanup
+                                    deleteEntry(dirName, done);
+                                }
+                            );
+                        }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + dirName));
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.55 remove on non-empty directory', function (done) {
                 if (isIndexedDBShim) {
@@ -1312,90 +1744,145 @@
                 var fileName = 're ove.txt';
                 var fullPath = joinURL(root.fullPath, dirName);
                 // create a new directory entry
-                createDirectory(dirName, function (entry) {
-                    entry.getFile(fileName, {
-                        create: true
-                    }, function (fileEntry) {
-                        entry.remove(succeed.bind(null, done, 'entry.remove - Unexpected success callback, it should not remove a directory that contains files : ' + dirName), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                // chrome is returning unknown error with code 13
-                            } else {
-                                expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                            }
-                            root.getDirectory(dirName, null, function (entry) {
-                                expect(entry).toBeDefined();
-                                expect(entry.fullPath).toCanonicallyMatch(fullPath);
-                                // cleanup
-                                deleteEntry(dirName, done);
-                            }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + dirName));
-                        });
-                    }, failed.bind(null, done, 'entry.getFile - Error creating file : ' + fileName + ' inside of ' + dirName));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName));
+                createDirectory(
+                    dirName,
+                    function (entry) {
+                        entry.getFile(
+                            fileName,
+                            {
+                                create: true
+                            },
+                            function (fileEntry) {
+                                entry.remove(
+                                    succeed.bind(
+                                        null,
+                                        done,
+                                        'entry.remove - Unexpected success callback, it should not remove a directory that contains files : ' +
+                                            dirName
+                                    ),
+                                    function (error) {
+                                        expect(error).toBeDefined();
+                                        if (isChrome) {
+                                            // chrome is returning unknown error with code 13
+                                        } else {
+                                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                        }
+                                        root.getDirectory(
+                                            dirName,
+                                            null,
+                                            function (entry) {
+                                                expect(entry).toBeDefined();
+                                                expect(entry.fullPath).toCanonicallyMatch(fullPath);
+                                                // cleanup
+                                                deleteEntry(dirName, done);
+                                            },
+                                            failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + dirName)
+                                        );
+                                    }
+                                );
+                            },
+                            failed.bind(null, done, 'entry.getFile - Error creating file : ' + fileName + ' inside of ' + dirName)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)
+                );
             });
             it('file.spec.56 remove on root file system', function (done) {
-
                 // remove entry that doesn't exist
-                root.remove(succeed.bind(null, done, 'entry.remove - Unexpected success callback, it should not remove entry that it does not exists'), function (error) {
-                    expect(error).toBeDefined();
-                    if (isChrome) {
-                        /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of
+                root.remove(
+                    succeed.bind(
+                        null,
+                        done,
+                        'entry.remove - Unexpected success callback, it should not remove entry that it does not exists'
+                    ),
+                    function (error) {
+                        expect(error).toBeDefined();
+                        if (isChrome) {
+                            /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of
                         NO_MODIFICATION_ALLOWED_ERR(code: 6) on trying to call removeRecursively
                         on the root file system. */
-                        // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
-                    } else {
-                        expect(error).toBeFileError(FileError.NO_MODIFICATION_ALLOWED_ERR); // eslint-disable-line no-undef
+                            // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                        } else {
+                            expect(error).toBeFileError(FileError.NO_MODIFICATION_ALLOWED_ERR);
+                        }
+                        done();
                     }
-                    done();
-                });
+                );
             });
             it('file.spec.57 copyTo: file', function (done) {
                 var file1 = 'entry copy.file1';
                 var file2 = 'entry copy.file2';
                 var fullPath = joinURL(root.fullPath, file2);
                 // create a new file entry to kick off it
-                deleteEntry(file2, function () {
-                    createFile(file1, function (fileEntry) {
-                        // copy file1 to file2
-                        fileEntry.copyTo(root, file2, function (entry) {
-                            expect(entry).toBeDefined();
-                            expect(entry.isFile).toBe(true);
-                            expect(entry.isDirectory).toBe(false);
-                            expect(entry.fullPath).toCanonicallyMatch(fullPath);
-                            expect(entry.name).toCanonicallyMatch(file2);
-                            root.getFile(file2, {
-                                create: false
-                            }, function (entry2) {
-                                expect(entry2).toBeDefined();
-                                expect(entry2.isFile).toBe(true);
-                                expect(entry2.isDirectory).toBe(false);
-                                expect(entry2.fullPath).toCanonicallyMatch(fullPath);
-                                expect(entry2.name).toCanonicallyMatch(file2);
-                                // cleanup
-                                deleteEntry(file1, function () {
-                                    deleteEntry(file2, done);
-                                });
-                            }, failed.bind(null, done, 'root.getFile - Error getting copied file : ' + file2));
-                        }, failed.bind(null, done, 'fileEntry.copyTo - Error copying file : ' + file2));
-                    }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
-                }, failed.bind(null, done, 'deleteEntry - Error removing file : ' + file2));
+                deleteEntry(
+                    file2,
+                    function () {
+                        createFile(
+                            file1,
+                            function (fileEntry) {
+                                // copy file1 to file2
+                                fileEntry.copyTo(
+                                    root,
+                                    file2,
+                                    function (entry) {
+                                        expect(entry).toBeDefined();
+                                        expect(entry.isFile).toBe(true);
+                                        expect(entry.isDirectory).toBe(false);
+                                        expect(entry.fullPath).toCanonicallyMatch(fullPath);
+                                        expect(entry.name).toCanonicallyMatch(file2);
+                                        root.getFile(
+                                            file2,
+                                            {
+                                                create: false
+                                            },
+                                            function (entry2) {
+                                                expect(entry2).toBeDefined();
+                                                expect(entry2.isFile).toBe(true);
+                                                expect(entry2.isDirectory).toBe(false);
+                                                expect(entry2.fullPath).toCanonicallyMatch(fullPath);
+                                                expect(entry2.name).toCanonicallyMatch(file2);
+                                                // cleanup
+                                                deleteEntry(file1, function () {
+                                                    deleteEntry(file2, done);
+                                                });
+                                            },
+                                            failed.bind(null, done, 'root.getFile - Error getting copied file : ' + file2)
+                                        );
+                                    },
+                                    failed.bind(null, done, 'fileEntry.copyTo - Error copying file : ' + file2)
+                                );
+                            },
+                            failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing file : ' + file2)
+                );
             });
             it('file.spec.58 copyTo: file onto itself', function (done) {
                 var file1 = 'entry.copy.fos.file1';
                 // create a new file entry to kick off it
-                createFile(file1, function (entry) {
-                    // copy file1 onto itself
-                    entry.copyTo(root, null, succeed.bind(null, done, 'entry.copyTo - Unexpected success callback, it should not copy a null file'), function (error) {
-                        expect(error).toBeDefined();
-                        if (isChrome) {
-                            // chrome returns unknown error with code 13
-                        } else {
-                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                        }
-                        // cleanup
-                        deleteEntry(file1, done);
-                    });
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
+                createFile(
+                    file1,
+                    function (entry) {
+                        // copy file1 onto itself
+                        entry.copyTo(
+                            root,
+                            null,
+                            succeed.bind(null, done, 'entry.copyTo - Unexpected success callback, it should not copy a null file'),
+                            function (error) {
+                                expect(error).toBeDefined();
+                                if (isChrome) {
+                                    // chrome returns unknown error with code 13
+                                } else {
+                                    expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                }
+                                // cleanup
+                                deleteEntry(file1, done);
+                            }
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                );
             });
             it('file.spec.59 copyTo: directory', function (done) {
                 if (isIndexedDBShim) {
@@ -1409,44 +1896,80 @@
                 var dstPath = joinURL(root.fullPath, dstDir);
                 var filePath = joinURL(dstPath, file1);
                 // create a new directory entry to kick off it
-                deleteEntry(dstDir, function () {
-                    createDirectory(srcDir, function (directory) {
-                        // create a file within new directory
-                        directory.getFile(file1, {
-                            create: true
-                        }, function () {
-                            directory.copyTo(root, dstDir, function (directory) {
-                                expect(directory).toBeDefined();
-                                expect(directory.isFile).toBe(false);
-                                expect(directory.isDirectory).toBe(true);
-                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
-                                expect(directory.name).toCanonicallyMatch(dstDir);
-                                root.getDirectory(dstDir, {
-                                    create: false
-                                }, function (dirEntry) {
-                                    expect(dirEntry).toBeDefined();
-                                    expect(dirEntry.isFile).toBe(false);
-                                    expect(dirEntry.isDirectory).toBe(true);
-                                    expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
-                                    expect(dirEntry.name).toCanonicallyMatch(dstDir);
-                                    dirEntry.getFile(file1, {
-                                        create: false
-                                    }, function (fileEntry) {
-                                        expect(fileEntry).toBeDefined();
-                                        expect(fileEntry.isFile).toBe(true);
-                                        expect(fileEntry.isDirectory).toBe(false);
-                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                        expect(fileEntry.name).toCanonicallyMatch(file1);
-                                        // cleanup
-                                        deleteEntry(srcDir, function () {
-                                            deleteEntry(dstDir, done);
-                                        });
-                                    }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1));
-                                }, failed.bind(null, done, 'root.getDirectory - Error getting copied directory : ' + dstDir));
-                            }, failed.bind(null, done, 'directory.copyTo - Error copying directory : ' + srcDir + ' to :' + dstDir));
-                        }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        createDirectory(
+                            srcDir,
+                            function (directory) {
+                                // create a file within new directory
+                                directory.getFile(
+                                    file1,
+                                    {
+                                        create: true
+                                    },
+                                    function () {
+                                        directory.copyTo(
+                                            root,
+                                            dstDir,
+                                            function (directory) {
+                                                expect(directory).toBeDefined();
+                                                expect(directory.isFile).toBe(false);
+                                                expect(directory.isDirectory).toBe(true);
+                                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
+                                                expect(directory.name).toCanonicallyMatch(dstDir);
+                                                root.getDirectory(
+                                                    dstDir,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (dirEntry) {
+                                                        expect(dirEntry).toBeDefined();
+                                                        expect(dirEntry.isFile).toBe(false);
+                                                        expect(dirEntry.isDirectory).toBe(true);
+                                                        expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
+                                                        expect(dirEntry.name).toCanonicallyMatch(dstDir);
+                                                        dirEntry.getFile(
+                                                            file1,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            function (fileEntry) {
+                                                                expect(fileEntry).toBeDefined();
+                                                                expect(fileEntry.isFile).toBe(true);
+                                                                expect(fileEntry.isDirectory).toBe(false);
+                                                                expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                                expect(fileEntry.name).toCanonicallyMatch(file1);
+                                                                // cleanup
+                                                                deleteEntry(srcDir, function () {
+                                                                    deleteEntry(dstDir, done);
+                                                                });
+                                                            },
+                                                            failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1)
+                                                        );
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'root.getDirectory - Error getting copied directory : ' + dstDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'directory.copyTo - Error copying directory : ' + srcDir + ' to :' + dstDir
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
             it('file.spec.60 copyTo: directory to backup at same root directory', function (done) {
                 if (isIndexedDBShim) {
@@ -1460,43 +1983,79 @@
                 var dstPath = joinURL(root.fullPath, dstDir);
                 var filePath = joinURL(dstPath, file1);
                 // create a new directory entry to kick off it
-                deleteEntry(dstDir, function () {
-                    createDirectory(srcDir, function (directory) {
-                        directory.getFile(file1, {
-                            create: true
-                        }, function () {
-                            directory.copyTo(root, dstDir, function (directory) {
-                                expect(directory).toBeDefined();
-                                expect(directory.isFile).toBe(false);
-                                expect(directory.isDirectory).toBe(true);
-                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
-                                expect(directory.name).toCanonicallyMatch(dstDir);
-                                root.getDirectory(dstDir, {
-                                    create: false
-                                }, function (dirEntry) {
-                                    expect(dirEntry).toBeDefined();
-                                    expect(dirEntry.isFile).toBe(false);
-                                    expect(dirEntry.isDirectory).toBe(true);
-                                    expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
-                                    expect(dirEntry.name).toCanonicallyMatch(dstDir);
-                                    dirEntry.getFile(file1, {
-                                        create: false
-                                    }, function (fileEntry) {
-                                        expect(fileEntry).toBeDefined();
-                                        expect(fileEntry.isFile).toBe(true);
-                                        expect(fileEntry.isDirectory).toBe(false);
-                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                        expect(fileEntry.name).toCanonicallyMatch(file1);
-                                        // cleanup
-                                        deleteEntry(srcDir, function () {
-                                            deleteEntry(dstDir, done);
-                                        });
-                                    }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1));
-                                }, failed.bind(null, done, 'root.getDirectory - Error getting copied directory : ' + dstDir));
-                            }, failed.bind(null, done, 'directory.copyTo - Error copying directory : ' + srcDir + ' to :' + dstDir));
-                        }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        createDirectory(
+                            srcDir,
+                            function (directory) {
+                                directory.getFile(
+                                    file1,
+                                    {
+                                        create: true
+                                    },
+                                    function () {
+                                        directory.copyTo(
+                                            root,
+                                            dstDir,
+                                            function (directory) {
+                                                expect(directory).toBeDefined();
+                                                expect(directory.isFile).toBe(false);
+                                                expect(directory.isDirectory).toBe(true);
+                                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
+                                                expect(directory.name).toCanonicallyMatch(dstDir);
+                                                root.getDirectory(
+                                                    dstDir,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (dirEntry) {
+                                                        expect(dirEntry).toBeDefined();
+                                                        expect(dirEntry.isFile).toBe(false);
+                                                        expect(dirEntry.isDirectory).toBe(true);
+                                                        expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
+                                                        expect(dirEntry.name).toCanonicallyMatch(dstDir);
+                                                        dirEntry.getFile(
+                                                            file1,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            function (fileEntry) {
+                                                                expect(fileEntry).toBeDefined();
+                                                                expect(fileEntry.isFile).toBe(true);
+                                                                expect(fileEntry.isDirectory).toBe(false);
+                                                                expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                                expect(fileEntry.name).toCanonicallyMatch(file1);
+                                                                // cleanup
+                                                                deleteEntry(srcDir, function () {
+                                                                    deleteEntry(dstDir, done);
+                                                                });
+                                                            },
+                                                            failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1)
+                                                        );
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'root.getDirectory - Error getting copied directory : ' + dstDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'directory.copyTo - Error copying directory : ' + srcDir + ' to :' + dstDir
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
             it('file.spec.61 copyTo: directory onto itself', function (done) {
                 if (isIndexedDBShim) {
@@ -1509,36 +2068,66 @@
                 var srcPath = joinURL(root.fullPath, srcDir);
                 var filePath = joinURL(srcPath, file1);
                 // create a new directory entry to kick off it
-                createDirectory(srcDir, function (directory) {
-                    // create a file within new directory
-                    directory.getFile(file1, {
-                        create: true
-                    }, function (fileEntry) {
-                        // copy srcDir onto itself
-                        directory.copyTo(root, null, succeed.bind(null, done, 'directory.copyTo - Unexpected success callback, it should not copy file: ' + srcDir + ' to a null destination'), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                // chrome returns unknown error with code 13
-                            } else {
-                                expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                            }
-                            root.getDirectory(srcDir, {
-                                create: false
-                            }, function (dirEntry) {
-                                expect(dirEntry).toBeDefined();
-                                expect(dirEntry.fullPath).toCanonicallyMatch(srcPath);
-                                dirEntry.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                    // cleanup
-                                    deleteEntry(srcDir, done);
-                                }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1));
-                            }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir));
-                        });
-                    }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
+                createDirectory(
+                    srcDir,
+                    function (directory) {
+                        // create a file within new directory
+                        directory.getFile(
+                            file1,
+                            {
+                                create: true
+                            },
+                            function (fileEntry) {
+                                // copy srcDir onto itself
+                                directory.copyTo(
+                                    root,
+                                    null,
+                                    succeed.bind(
+                                        null,
+                                        done,
+                                        'directory.copyTo - Unexpected success callback, it should not copy file: ' +
+                                            srcDir +
+                                            ' to a null destination'
+                                    ),
+                                    function (error) {
+                                        expect(error).toBeDefined();
+                                        if (isChrome) {
+                                            // chrome returns unknown error with code 13
+                                        } else {
+                                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                        }
+                                        root.getDirectory(
+                                            srcDir,
+                                            {
+                                                create: false
+                                            },
+                                            function (dirEntry) {
+                                                expect(dirEntry).toBeDefined();
+                                                expect(dirEntry.fullPath).toCanonicallyMatch(srcPath);
+                                                dirEntry.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                        // cleanup
+                                                        deleteEntry(srcDir, done);
+                                                    },
+                                                    failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1)
+                                                );
+                                            },
+                                            failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir)
+                                        );
+                                    }
+                                );
+                            },
+                            failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                );
             });
             it('file.spec.62 copyTo: directory into itself', function (done) {
                 if (isIndexedDBShim) {
@@ -1550,45 +2139,82 @@
                 var dstDir = 'entry.copy.dis.dstDir';
                 var srcPath = joinURL(root.fullPath, srcDir);
                 // create a new directory entry to kick off it
-                createDirectory(srcDir, function (directory) {
-                    // copy source directory into itself
-                    directory.copyTo(directory, dstDir, succeed.bind(null, done, 'directory.copyTo - Unexpected success callback, it should not copy a directory ' + srcDir + ' into itself'), function (error) {
-                        expect(error).toBeDefined();
-                        if (isChrome) {
-                            // chrome returns unknown error with code 13
-                        } else {
-                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                        }
-                        root.getDirectory(srcDir, {
-                            create: false
-                        }, function (dirEntry) {
-                            // returning confirms existence so just check fullPath entry
-                            expect(dirEntry).toBeDefined();
-                            expect(dirEntry.fullPath).toCanonicallyMatch(srcPath);
-                            // cleanup
-                            deleteEntry(srcDir, done);
-                        }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir));
-                    });
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
+                createDirectory(
+                    srcDir,
+                    function (directory) {
+                        // copy source directory into itself
+                        directory.copyTo(
+                            directory,
+                            dstDir,
+                            succeed.bind(
+                                null,
+                                done,
+                                'directory.copyTo - Unexpected success callback, it should not copy a directory ' + srcDir + ' into itself'
+                            ),
+                            function (error) {
+                                expect(error).toBeDefined();
+                                if (isChrome) {
+                                    // chrome returns unknown error with code 13
+                                } else {
+                                    expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                }
+                                root.getDirectory(
+                                    srcDir,
+                                    {
+                                        create: false
+                                    },
+                                    function (dirEntry) {
+                                        // returning confirms existence so just check fullPath entry
+                                        expect(dirEntry).toBeDefined();
+                                        expect(dirEntry.fullPath).toCanonicallyMatch(srcPath);
+                                        // cleanup
+                                        deleteEntry(srcDir, done);
+                                    },
+                                    failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir)
+                                );
+                            }
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                );
             });
             it('file.spec.63 copyTo: directory that does not exist', function (done) {
                 var file1 = 'entry.copy.dnf.file1';
                 var dirName = 'dir-foo';
-                createFile(file1, function (fileEntry) {
-                    createDirectory(dirName, function (dirEntry) {
-                        dirEntry.remove(function () {
-                            fileEntry.copyTo(dirEntry, null, succeed.bind(null, done, 'fileEntry.copyTo - Unexpected success callback, it should not copy a file ' + file1 + ' into a removed directory'), function (error) {
-                                expect(error).toBeDefined();
-                                if (isChrome) {
-                                    expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                } else {
-                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                }
-                                done();
-                            });
-                        }, failed.bind(null, done, 'dirEntry.remove - Error removing directory : ' + dirName));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName));
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
+                createFile(
+                    file1,
+                    function (fileEntry) {
+                        createDirectory(
+                            dirName,
+                            function (dirEntry) {
+                                dirEntry.remove(function () {
+                                    fileEntry.copyTo(
+                                        dirEntry,
+                                        null,
+                                        succeed.bind(
+                                            null,
+                                            done,
+                                            'fileEntry.copyTo - Unexpected success callback, it should not copy a file ' +
+                                                file1 +
+                                                ' into a removed directory'
+                                        ),
+                                        function (error) {
+                                            expect(error).toBeDefined();
+                                            if (isChrome) {
+                                                expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                            } else {
+                                                expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                            }
+                                            done();
+                                        }
+                                    );
+                                }, failed.bind(null, done, 'dirEntry.remove - Error removing directory : ' + dirName));
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                );
             });
             it('file.spec.64 copyTo: invalid target name', function (done) {
                 if (isBrowser) {
@@ -1600,98 +2226,179 @@
                 var file1 = 'entry.copy.itn.file1';
                 var file2 = 'bad:file:name';
                 // create a new file entry
-                createFile(file1, function (entry) {
-                    // copy file1 to file2
-                    entry.copyTo(root, file2, succeed.bind(null, done, 'entry.copyTo - Unexpected success callback, it should not copy a file ' + file1 + ' to an invalid file name: ' + file2), function (error) {
-                        expect(error).toBeDefined();
-                        expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef
-                        // cleanup
-                        deleteEntry(file1, done);
-                    });
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
+                createFile(
+                    file1,
+                    function (entry) {
+                        // copy file1 to file2
+                        entry.copyTo(
+                            root,
+                            file2,
+                            succeed.bind(
+                                null,
+                                done,
+                                'entry.copyTo - Unexpected success callback, it should not copy a file ' +
+                                    file1 +
+                                    ' to an invalid file name: ' +
+                                    file2
+                            ),
+                            function (error) {
+                                expect(error).toBeDefined();
+                                expect(error).toBeFileError(FileError.ENCODING_ERR);
+                                // cleanup
+                                deleteEntry(file1, done);
+                            }
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                );
             });
             it('file.spec.65 moveTo: file to same parent', function (done) {
                 var file1 = 'entry.move.fsp.file1';
                 var file2 = 'entry.move.fsp.file2';
                 var dstPath = joinURL(root.fullPath, file2);
                 // create a new file entry to kick off it
-                createFile(file1, function (entry) {
-                    // move file1 to file2
-                    entry.moveTo(root, file2, function (entry) {
-                        expect(entry).toBeDefined();
-                        expect(entry.isFile).toBe(true);
-                        expect(entry.isDirectory).toBe(false);
-                        expect(entry.fullPath).toCanonicallyMatch(dstPath);
-                        expect(entry.name).toCanonicallyMatch(file2);
-                        root.getFile(file2, {
-                            create: false
-                        }, function (fileEntry) {
-                            expect(fileEntry).toBeDefined();
-                            expect(fileEntry.fullPath).toCanonicallyMatch(dstPath);
-                            root.getFile(file1, {
-                                create: false
-                            }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) {
-                                // expect(navigator.fileMgr.testFileExists(srcPath) === false, "original file should not exist.");
-                                expect(error).toBeDefined();
-                                if (isChrome) {
-                                    expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                } else {
-                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                }
-                                // cleanup
-                                deleteEntry(file1, function () {
-                                    deleteEntry(file2, done);
-                                });
-                            });
-                        }, failed.bind(null, done, 'root.getFile - Error getting file : ' + file2));
-                    }, failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to root as: ' + file2));
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
+                createFile(
+                    file1,
+                    function (entry) {
+                        // move file1 to file2
+                        entry.moveTo(
+                            root,
+                            file2,
+                            function (entry) {
+                                expect(entry).toBeDefined();
+                                expect(entry.isFile).toBe(true);
+                                expect(entry.isDirectory).toBe(false);
+                                expect(entry.fullPath).toCanonicallyMatch(dstPath);
+                                expect(entry.name).toCanonicallyMatch(file2);
+                                root.getFile(
+                                    file2,
+                                    {
+                                        create: false
+                                    },
+                                    function (fileEntry) {
+                                        expect(fileEntry).toBeDefined();
+                                        expect(fileEntry.fullPath).toCanonicallyMatch(dstPath);
+                                        root.getFile(
+                                            file1,
+                                            {
+                                                create: false
+                                            },
+                                            succeed.bind(
+                                                null,
+                                                done,
+                                                'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' +
+                                                    file1
+                                            ),
+                                            function (error) {
+                                                // expect(navigator.fileMgr.testFileExists(srcPath) === false, "original file should not exist.");
+                                                expect(error).toBeDefined();
+                                                if (isChrome) {
+                                                    expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                                } else {
+                                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                                }
+                                                // cleanup
+                                                deleteEntry(file1, function () {
+                                                    deleteEntry(file2, done);
+                                                });
+                                            }
+                                        );
+                                    },
+                                    failed.bind(null, done, 'root.getFile - Error getting file : ' + file2)
+                                );
+                            },
+                            failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to root as: ' + file2)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                );
             });
             it('file.spec.66 moveTo: file to new parent', function (done) {
                 var file1 = 'entry.move.fnp.file1';
                 var dir = 'entry.move.fnp.dir';
                 var dstPath = joinURL(joinURL(root.fullPath, dir), file1);
                 // ensure destination directory is cleaned up first
-                deleteEntry(dir, function () {
-                    // create a new file entry to kick off it
-                    createFile(file1, function (entry) {
-                        // create a parent directory to move file to
-                        root.getDirectory(dir, {
-                            create: true
-                        }, function (directory) {
-                            // move file1 to new directory
-                            // move the file
-                            entry.moveTo(directory, null, function (entry) {
-                                expect(entry).toBeDefined();
-                                expect(entry.isFile).toBe(true);
-                                expect(entry.isDirectory).toBe(false);
-                                expect(entry.fullPath).toCanonicallyMatch(dstPath);
-                                expect(entry.name).toCanonicallyMatch(file1);
-                                // test the moved file exists
-                                directory.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(dstPath);
-                                    root.getFile(file1, {
-                                        create: false
-                                    }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) {
-                                        expect(error).toBeDefined();
-                                        if (isChrome) {
-                                            expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                        } else {
-                                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                        }
-                                        // cleanup
-                                        deleteEntry(file1, function () {
-                                            deleteEntry(dir, done);
-                                        });
-                                    });
-                                }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + dir));
-                            }, failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to: ' + dir + ' with the same name'));
-                        }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dir));
-                    }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dir));
+                deleteEntry(
+                    dir,
+                    function () {
+                        // create a new file entry to kick off it
+                        createFile(
+                            file1,
+                            function (entry) {
+                                // create a parent directory to move file to
+                                root.getDirectory(
+                                    dir,
+                                    {
+                                        create: true
+                                    },
+                                    function (directory) {
+                                        // move file1 to new directory
+                                        // move the file
+                                        entry.moveTo(
+                                            directory,
+                                            null,
+                                            function (entry) {
+                                                expect(entry).toBeDefined();
+                                                expect(entry.isFile).toBe(true);
+                                                expect(entry.isDirectory).toBe(false);
+                                                expect(entry.fullPath).toCanonicallyMatch(dstPath);
+                                                expect(entry.name).toCanonicallyMatch(file1);
+                                                // test the moved file exists
+                                                directory.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(dstPath);
+                                                        root.getFile(
+                                                            file1,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            succeed.bind(
+                                                                null,
+                                                                done,
+                                                                'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' +
+                                                                    file1
+                                                            ),
+                                                            function (error) {
+                                                                expect(error).toBeDefined();
+                                                                if (isChrome) {
+                                                                    expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                                                } else {
+                                                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                                                }
+                                                                // cleanup
+                                                                deleteEntry(file1, function () {
+                                                                    deleteEntry(dir, done);
+                                                                });
+                                                            }
+                                                        );
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'directory.getFile - Error getting file : ' + file1 + ' from: ' + dir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'entry.moveTo - Error moving file : ' + file1 + ' to: ' + dir + ' with the same name'
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dir)
+                                );
+                            },
+                            failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dir)
+                );
             });
             it('file.spec.67 moveTo: directory to same parent', function (done) {
                 if (isIndexedDBShim) {
@@ -1705,46 +2412,87 @@
                 var dstPath = joinURL(root.fullPath, dstDir);
                 var filePath = joinURL(dstPath, file1);
                 // ensure destination directory is cleaned up before it
-                deleteEntry(dstDir, function () {
-                    // create a new directory entry to kick off it
-                    createDirectory(srcDir, function (directory) {
-                        // create a file within directory
-                        directory.getFile(file1, {
-                            create: true
-                        }, function () {
-                            // move srcDir to dstDir
-                            directory.moveTo(root, dstDir, function (directory) {
-                                expect(directory).toBeDefined();
-                                expect(directory.isFile).toBe(false);
-                                expect(directory.isDirectory).toBe(true);
-                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
-                                expect(directory.name).toCanonicallyMatch(dstDir);
-                                // test that moved file exists in destination dir
-                                directory.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                    // check that the moved file no longer exists in original dir
-                                    root.getFile(file1, {
-                                        create: false
-                                    }, succeed.bind(null, done, 'directory.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) {
-                                        expect(error).toBeDefined();
-                                        if (isChrome) {
-                                            expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                        } else {
-                                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                        }
-                                        // cleanup
-                                        deleteEntry(srcDir, function () {
-                                            deleteEntry(dstDir, done);
-                                        });
-                                    });
-                                }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + srcDir));
-                            }, failed.bind(null, done, 'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir));
-                        }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        // create a new directory entry to kick off it
+                        createDirectory(
+                            srcDir,
+                            function (directory) {
+                                // create a file within directory
+                                directory.getFile(
+                                    file1,
+                                    {
+                                        create: true
+                                    },
+                                    function () {
+                                        // move srcDir to dstDir
+                                        directory.moveTo(
+                                            root,
+                                            dstDir,
+                                            function (directory) {
+                                                expect(directory).toBeDefined();
+                                                expect(directory.isFile).toBe(false);
+                                                expect(directory.isDirectory).toBe(true);
+                                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
+                                                expect(directory.name).toCanonicallyMatch(dstDir);
+                                                // test that moved file exists in destination dir
+                                                directory.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                        // check that the moved file no longer exists in original dir
+                                                        root.getFile(
+                                                            file1,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            succeed.bind(
+                                                                null,
+                                                                done,
+                                                                'directory.getFile - Unexpected success callback, it should not get invalid or moved file: ' +
+                                                                    file1
+                                                            ),
+                                                            function (error) {
+                                                                expect(error).toBeDefined();
+                                                                if (isChrome) {
+                                                                    expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                                                } else {
+                                                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                                                }
+                                                                // cleanup
+                                                                deleteEntry(srcDir, function () {
+                                                                    deleteEntry(dstDir, done);
+                                                                });
+                                                            }
+                                                        );
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'directory.getFile - Error getting file : ' + file1 + ' from: ' + srcDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
             it('file.spec.68 moveTo: directory to same parent with same name', function (done) {
                 if (isIndexedDBShim) {
@@ -1758,46 +2506,87 @@
                 var dstPath = joinURL(root.fullPath, dstDir);
                 var filePath = joinURL(dstPath, file1);
                 // ensure destination directory is cleaned up before it
-                deleteEntry(dstDir, function () {
-                    // create a new directory entry to kick off it
-                    createDirectory(srcDir, function (directory) {
-                        // create a file within directory
-                        directory.getFile(file1, {
-                            create: true
-                        }, function () {
-                            // move srcDir to dstDir
-                            directory.moveTo(root, dstDir, function (directory) {
-                                expect(directory).toBeDefined();
-                                expect(directory.isFile).toBe(false);
-                                expect(directory.isDirectory).toBe(true);
-                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
-                                expect(directory.name).toCanonicallyMatch(dstDir);
-                                // check that moved file exists in destination dir
-                                directory.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                    // check that the moved file no longer exists in original dir
-                                    root.getFile(file1, {
-                                        create: false
-                                    }, succeed.bind(null, done, 'directory.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) {
-                                        expect(error).toBeDefined();
-                                        if (isChrome) {
-                                            expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                        } else {
-                                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                        }
-                                        // cleanup
-                                        deleteEntry(srcDir, function () {
-                                            deleteEntry(dstDir, done);
-                                        });
-                                    });
-                                }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + srcDir));
-                            }, failed.bind(null, done, 'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir));
-                        }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        // create a new directory entry to kick off it
+                        createDirectory(
+                            srcDir,
+                            function (directory) {
+                                // create a file within directory
+                                directory.getFile(
+                                    file1,
+                                    {
+                                        create: true
+                                    },
+                                    function () {
+                                        // move srcDir to dstDir
+                                        directory.moveTo(
+                                            root,
+                                            dstDir,
+                                            function (directory) {
+                                                expect(directory).toBeDefined();
+                                                expect(directory.isFile).toBe(false);
+                                                expect(directory.isDirectory).toBe(true);
+                                                expect(directory.fullPath).toCanonicallyMatch(dstPath);
+                                                expect(directory.name).toCanonicallyMatch(dstDir);
+                                                // check that moved file exists in destination dir
+                                                directory.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                        // check that the moved file no longer exists in original dir
+                                                        root.getFile(
+                                                            file1,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            succeed.bind(
+                                                                null,
+                                                                done,
+                                                                'directory.getFile - Unexpected success callback, it should not get invalid or moved file: ' +
+                                                                    file1
+                                                            ),
+                                                            function (error) {
+                                                                expect(error).toBeDefined();
+                                                                if (isChrome) {
+                                                                    expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                                                } else {
+                                                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                                                }
+                                                                // cleanup
+                                                                deleteEntry(srcDir, function () {
+                                                                    deleteEntry(dstDir, done);
+                                                                });
+                                                            }
+                                                        );
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'directory.getFile - Error getting file : ' + file1 + ' from: ' + srcDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
             it('file.spec.69 moveTo: directory to new parent', function (done) {
                 if (isIndexedDBShim) {
@@ -1811,46 +2600,87 @@
                 var dstPath = joinURL(root.fullPath, dstDir);
                 var filePath = joinURL(dstPath, file1);
                 // ensure destination directory is cleaned up before it
-                deleteEntry(dstDir, function () {
-                    // create a new directory entry to kick off it
-                    createDirectory(srcDir, function (directory) {
-                        // create a file within directory
-                        directory.getFile(file1, {
-                            create: true
-                        }, function () {
-                            // move srcDir to dstDir
-                            directory.moveTo(root, dstDir, function (dirEntry) {
-                                expect(dirEntry).toBeDefined();
-                                expect(dirEntry.isFile).toBe(false);
-                                expect(dirEntry.isDirectory).toBe(true);
-                                expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
-                                expect(dirEntry.name).toCanonicallyMatch(dstDir);
-                                // test that moved file exists in destination dir
-                                dirEntry.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                    // test that the moved file no longer exists in original dir
-                                    root.getFile(file1, {
-                                        create: false
-                                    }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) {
-                                        expect(error).toBeDefined();
-                                        if (isChrome) {
-                                            expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                        } else {
-                                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                        }
-                                        // cleanup
-                                        deleteEntry(srcDir, function () {
-                                            deleteEntry(dstDir, done);
-                                        });
-                                    });
-                                }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + dstDir));
-                            }, failed.bind(null, done, 'directory.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir));
-                        }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        // create a new directory entry to kick off it
+                        createDirectory(
+                            srcDir,
+                            function (directory) {
+                                // create a file within directory
+                                directory.getFile(
+                                    file1,
+                                    {
+                                        create: true
+                                    },
+                                    function () {
+                                        // move srcDir to dstDir
+                                        directory.moveTo(
+                                            root,
+                                            dstDir,
+                                            function (dirEntry) {
+                                                expect(dirEntry).toBeDefined();
+                                                expect(dirEntry.isFile).toBe(false);
+                                                expect(dirEntry.isDirectory).toBe(true);
+                                                expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
+                                                expect(dirEntry.name).toCanonicallyMatch(dstDir);
+                                                // test that moved file exists in destination dir
+                                                dirEntry.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                        // test that the moved file no longer exists in original dir
+                                                        root.getFile(
+                                                            file1,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            succeed.bind(
+                                                                null,
+                                                                done,
+                                                                'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' +
+                                                                    file1
+                                                            ),
+                                                            function (error) {
+                                                                expect(error).toBeDefined();
+                                                                if (isChrome) {
+                                                                    expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                                                } else {
+                                                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                                                }
+                                                                // cleanup
+                                                                deleteEntry(srcDir, function () {
+                                                                    deleteEntry(dstDir, done);
+                                                                });
+                                                            }
+                                                        );
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'directory.getFile - Error getting file : ' + file1 + ' from: ' + dstDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'directory.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
 
             it('file.spec.131 moveTo: directories tree to new parent', function (done) {
@@ -1864,25 +2694,56 @@
                 var srcDirNestedSecond = 'entry.move.dnp.srcDir.Nested2';
                 var dstDir = 'entry.move.dnp.dstDir';
 
-                createDirectory(dstDir, function (dstDirectory) {
-                    createDirectory(srcDir, function (srcDirectory) {
-                        srcDirectory.getDirectory(srcDirNestedFirst, { create: true }, function () {
-                            srcDirectory.getDirectory(srcDirNestedSecond, { create: true }, function () {
-                                srcDirectory.moveTo(dstDirectory, srcDir, function successMove (transferredDirectory) {
-                                    var directoryReader = transferredDirectory.createReader();
-                                    directoryReader.readEntries(function successRead (entries) {
-                                        expect(entries.length).toBe(2);
-                                        if (!isChrome) {
-                                            expect(entries[0].name).toBe(srcDirNestedFirst);
-                                            expect(entries[1].name).toBe(srcDirNestedSecond);
-                                        }
-                                        deleteEntry(dstDir, done);
-                                    }, failed.bind(null, done, 'Error getting entries from: ' + transferredDirectory));
-                                }, failed.bind(null, done, 'directory.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir));
-                            }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + srcDirNestedSecond));
-                        }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + srcDirNestedFirst));
-                    }, failed.bind(null, done, 'createDirectory - Error creating source directory : ' + srcDir));
-                }, failed.bind(null, done, 'createDirectory - Error creating dest directory : ' + dstDir));
+                createDirectory(
+                    dstDir,
+                    function (dstDirectory) {
+                        createDirectory(
+                            srcDir,
+                            function (srcDirectory) {
+                                srcDirectory.getDirectory(
+                                    srcDirNestedFirst,
+                                    { create: true },
+                                    function () {
+                                        srcDirectory.getDirectory(
+                                            srcDirNestedSecond,
+                                            { create: true },
+                                            function () {
+                                                srcDirectory.moveTo(
+                                                    dstDirectory,
+                                                    srcDir,
+                                                    function successMove (transferredDirectory) {
+                                                        var directoryReader = transferredDirectory.createReader();
+                                                        directoryReader.readEntries(function successRead (entries) {
+                                                            expect(entries.length).toBe(2);
+                                                            if (!isChrome) {
+                                                                expect(entries[0].name).toBe(srcDirNestedFirst);
+                                                                expect(entries[1].name).toBe(srcDirNestedSecond);
+                                                            }
+                                                            deleteEntry(dstDir, done);
+                                                        }, failed.bind(null, done, 'Error getting entries from: ' + transferredDirectory));
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'directory.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'directory.getDirectory - Error creating directory : ' + srcDirNestedSecond
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + srcDirNestedFirst)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating source directory : ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating dest directory : ' + dstDir)
+                );
             });
 
             it('file.spec.70 moveTo: directory onto itself', function (done) {
@@ -1896,38 +2757,70 @@
                 var srcPath = joinURL(root.fullPath, srcDir);
                 var filePath = joinURL(srcPath, file1);
                 // create a new directory entry to kick off it
-                createDirectory(srcDir, function (directory) {
-                    // create a file within new directory
-                    directory.getFile(file1, {
-                        create: true
-                    }, function () {
-                        // move srcDir onto itself
-                        directory.moveTo(root, null, succeed.bind(null, done, 'directory.moveTo - Unexpected success callback, it should not move directory to invalid path'), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                // chrome returns unknown error with code 13
-                            } else {
-                                expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                            }
-                            // test that original dir still exists
-                            root.getDirectory(srcDir, {
-                                create: false
-                            }, function (dirEntry) {
-                                // returning confirms existence so just check fullPath entry
-                                expect(dirEntry).toBeDefined();
-                                expect(dirEntry.fullPath).toCanonicallyMatch(srcPath);
-                                dirEntry.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                    // cleanup
-                                    deleteEntry(srcDir, done);
-                                }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1 + ' from: ' + srcDir));
-                            }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir));
-                        });
-                    }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
+                createDirectory(
+                    srcDir,
+                    function (directory) {
+                        // create a file within new directory
+                        directory.getFile(
+                            file1,
+                            {
+                                create: true
+                            },
+                            function () {
+                                // move srcDir onto itself
+                                directory.moveTo(
+                                    root,
+                                    null,
+                                    succeed.bind(
+                                        null,
+                                        done,
+                                        'directory.moveTo - Unexpected success callback, it should not move directory to invalid path'
+                                    ),
+                                    function (error) {
+                                        expect(error).toBeDefined();
+                                        if (isChrome) {
+                                            // chrome returns unknown error with code 13
+                                        } else {
+                                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                        }
+                                        // test that original dir still exists
+                                        root.getDirectory(
+                                            srcDir,
+                                            {
+                                                create: false
+                                            },
+                                            function (dirEntry) {
+                                                // returning confirms existence so just check fullPath entry
+                                                expect(dirEntry).toBeDefined();
+                                                expect(dirEntry.fullPath).toCanonicallyMatch(srcPath);
+                                                dirEntry.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                        // cleanup
+                                                        deleteEntry(srcDir, done);
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'dirEntry.getFile - Error getting file : ' + file1 + ' from: ' + srcDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir)
+                                        );
+                                    }
+                                );
+                            },
+                            failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                );
             });
             it('file.spec.71 moveTo: directory into itself', function (done) {
                 if (isIndexedDBShim) {
@@ -1939,26 +2832,49 @@
                 var dstDir = 'entry.move.dis.dstDir';
                 var srcPath = joinURL(root.fullPath, srcDir);
                 // create a new directory entry to kick off it
-                createDirectory(srcDir, function (directory) {
-                    // move source directory into itself
-                    directory.moveTo(directory, dstDir, succeed.bind(null, done, 'directory.moveTo - Unexpected success callback, it should not move a directory into itself: ' + srcDir), function (error) {
-                        expect(error).toBeDefined();
-                        if (isChrome) {
-                            // chrome returns unknown error with code 13
-                        } else {
-                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                        }
-                        // make sure original directory still exists
-                        root.getDirectory(srcDir, {
-                            create: false
-                        }, function (entry) {
-                            expect(entry).toBeDefined();
-                            expect(entry.fullPath).toCanonicallyMatch(srcPath);
-                            // cleanup
-                            deleteEntry(srcDir, done);
-                        }, failed.bind(null, done, 'root.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir));
-                    });
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
+                createDirectory(
+                    srcDir,
+                    function (directory) {
+                        // move source directory into itself
+                        directory.moveTo(
+                            directory,
+                            dstDir,
+                            succeed.bind(
+                                null,
+                                done,
+                                'directory.moveTo - Unexpected success callback, it should not move a directory into itself: ' + srcDir
+                            ),
+                            function (error) {
+                                expect(error).toBeDefined();
+                                if (isChrome) {
+                                    // chrome returns unknown error with code 13
+                                } else {
+                                    expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                }
+                                // make sure original directory still exists
+                                root.getDirectory(
+                                    srcDir,
+                                    {
+                                        create: false
+                                    },
+                                    function (entry) {
+                                        expect(entry).toBeDefined();
+                                        expect(entry.fullPath).toCanonicallyMatch(srcPath);
+                                        // cleanup
+                                        deleteEntry(srcDir, done);
+                                    },
+                                    failed.bind(
+                                        null,
+                                        done,
+                                        'root.getDirectory - Error getting directory, making sure that original directory still exists: ' +
+                                            srcDir
+                                    )
+                                );
+                            }
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                );
             });
             it('file.spec.130 moveTo: directory into similar directory', function (done) {
                 if (isIndexedDBShim) {
@@ -1969,42 +2885,85 @@
                 var srcDir = 'entry.move.dis.srcDir';
                 var dstDir = 'entry.move.dis.srcDir-backup';
                 // create a new directory entry to kick off it
-                createDirectory(srcDir, function (srcDirEntry) {
-                    deleteEntry(dstDir, function () {
-                        createDirectory(dstDir, function (dstDirEntry) {
-                    // move source directory into itself
-                            srcDirEntry.moveTo(dstDirEntry, 'file', function (newDirEntry) {
-                                expect(newDirEntry).toBeDefined();
-                                deleteEntry(dstDir, done);
-                            }, failed.bind(null, done, 'directory.moveTo - Error moving a directory into a similarly-named directory: ' + srcDir));
-                        }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dstDir));
-                    }, failed.bind(null, done, 'deleteEntry - Error deleting directory : ' + dstDir));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
+                createDirectory(
+                    srcDir,
+                    function (srcDirEntry) {
+                        deleteEntry(
+                            dstDir,
+                            function () {
+                                createDirectory(
+                                    dstDir,
+                                    function (dstDirEntry) {
+                                        // move source directory into itself
+                                        srcDirEntry.moveTo(
+                                            dstDirEntry,
+                                            'file',
+                                            function (newDirEntry) {
+                                                expect(newDirEntry).toBeDefined();
+                                                deleteEntry(dstDir, done);
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'directory.moveTo - Error moving a directory into a similarly-named directory: ' + srcDir
+                                            )
+                                        );
+                                    },
+                                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + dstDir)
+                                );
+                            },
+                            failed.bind(null, done, 'deleteEntry - Error deleting directory : ' + dstDir)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                );
             });
             it('file.spec.72 moveTo: file onto itself', function (done) {
                 var file1 = 'entry.move.fos.file1';
                 var filePath = joinURL(root.fullPath, file1);
                 // create a new file entry to kick off it
-                createFile(file1, function (entry) {
-                    // move file1 onto itself
-                    entry.moveTo(root, null, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not move a file: ' + file1 + ' into the same parent'), function (error) {
-                        expect(error).toBeDefined();
-                        if (isChrome) {
-                            // chrome returns unknown error with code 13
-                        } else {
-                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                        }
-                        // test that original file still exists
-                        root.getFile(file1, {
-                            create: false
-                        }, function (fileEntry) {
-                            expect(fileEntry).toBeDefined();
-                            expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                            // cleanup
-                            deleteEntry(file1, done);
-                        }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1));
-                    });
-                }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
+                createFile(
+                    file1,
+                    function (entry) {
+                        // move file1 onto itself
+                        entry.moveTo(
+                            root,
+                            null,
+                            succeed.bind(
+                                null,
+                                done,
+                                'entry.moveTo - Unexpected success callback, it should not move a file: ' + file1 + ' into the same parent'
+                            ),
+                            function (error) {
+                                expect(error).toBeDefined();
+                                if (isChrome) {
+                                    // chrome returns unknown error with code 13
+                                } else {
+                                    expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                }
+                                // test that original file still exists
+                                root.getFile(
+                                    file1,
+                                    {
+                                        create: false
+                                    },
+                                    function (fileEntry) {
+                                        expect(fileEntry).toBeDefined();
+                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                        // cleanup
+                                        deleteEntry(file1, done);
+                                    },
+                                    failed.bind(
+                                        null,
+                                        done,
+                                        'root.getFile - Error getting file, making sure that original file still exists: ' + file1
+                                    )
+                                );
+                            }
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                );
             });
             it('file.spec.73 moveTo: file onto existing directory', function (done) {
                 var file1 = 'entry.move.fod.file1';
@@ -2013,48 +2972,101 @@
                 var dirPath = joinURL(joinURL(root.fullPath, dstDir), subDir);
                 var filePath = joinURL(root.fullPath, file1);
                 // ensure destination directory is cleaned up before it
-                deleteEntry(dstDir, function () {
-                    // create a new file entry to kick off it
-                    createFile(file1, function (entry) {
-                        // create top level directory
-                        root.getDirectory(dstDir, {
-                            create: true
-                        }, function (directory) {
-                            // create sub-directory
-                            directory.getDirectory(subDir, {
-                                create: true
-                            }, function (subDirectory) {
-                                // move file1 onto sub-directory
-                                entry.moveTo(directory, subDir, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not move a file: ' + file1 + ' into directory: ' + dstDir + '\n' + subDir + ' directory already exists'), function (error) {
-                                    expect(error).toBeDefined();
-                                    if (isChrome) {
-                                        // chrome returns unknown error with code 13
-                                    } else {
-                                        expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                                    }
-                                    // check that original dir still exists
-                                    directory.getDirectory(subDir, {
-                                        create: false
-                                    }, function (dirEntry) {
-                                        expect(dirEntry).toBeDefined();
-                                        expect(dirEntry.fullPath).toCanonicallyMatch(dirPath);
-                                        // check that original file still exists
-                                        root.getFile(file1, {
-                                            create: false
-                                        }, function (fileEntry) {
-                                            expect(fileEntry).toBeDefined();
-                                            expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                            // cleanup
-                                            deleteEntry(file1, function () {
-                                                deleteEntry(dstDir, done);
-                                            });
-                                        }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1));
-                                    }, failed.bind(null, done, 'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' + subDir));
-                                });
-                            }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir));
-                        }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dstDir));
-                    }, failed.bind(null, done, 'createFile - Error creating file : ' + file1));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        // create a new file entry to kick off it
+                        createFile(
+                            file1,
+                            function (entry) {
+                                // create top level directory
+                                root.getDirectory(
+                                    dstDir,
+                                    {
+                                        create: true
+                                    },
+                                    function (directory) {
+                                        // create sub-directory
+                                        directory.getDirectory(
+                                            subDir,
+                                            {
+                                                create: true
+                                            },
+                                            function (subDirectory) {
+                                                // move file1 onto sub-directory
+                                                entry.moveTo(
+                                                    directory,
+                                                    subDir,
+                                                    succeed.bind(
+                                                        null,
+                                                        done,
+                                                        'entry.moveTo - Unexpected success callback, it should not move a file: ' +
+                                                            file1 +
+                                                            ' into directory: ' +
+                                                            dstDir +
+                                                            '\n' +
+                                                            subDir +
+                                                            ' directory already exists'
+                                                    ),
+                                                    function (error) {
+                                                        expect(error).toBeDefined();
+                                                        if (isChrome) {
+                                                            // chrome returns unknown error with code 13
+                                                        } else {
+                                                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                                        }
+                                                        // check that original dir still exists
+                                                        directory.getDirectory(
+                                                            subDir,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            function (dirEntry) {
+                                                                expect(dirEntry).toBeDefined();
+                                                                expect(dirEntry.fullPath).toCanonicallyMatch(dirPath);
+                                                                // check that original file still exists
+                                                                root.getFile(
+                                                                    file1,
+                                                                    {
+                                                                        create: false
+                                                                    },
+                                                                    function (fileEntry) {
+                                                                        expect(fileEntry).toBeDefined();
+                                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                                        // cleanup
+                                                                        deleteEntry(file1, function () {
+                                                                            deleteEntry(dstDir, done);
+                                                                        });
+                                                                    },
+                                                                    failed.bind(
+                                                                        null,
+                                                                        done,
+                                                                        'root.getFile - Error getting file, making sure that original file still exists: ' +
+                                                                            file1
+                                                                    )
+                                                                );
+                                                            },
+                                                            failed.bind(
+                                                                null,
+                                                                done,
+                                                                'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' +
+                                                                    subDir
+                                                            )
+                                                        );
+                                                    }
+                                                );
+                                            },
+                                            failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir)
+                                        );
+                                    },
+                                    failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dstDir)
+                                );
+                            },
+                            failed.bind(null, done, 'createFile - Error creating file : ' + file1)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
             it('file.spec.74 moveTo: directory onto existing file', function (done) {
                 if (isIndexedDBShim) {
@@ -2067,41 +3079,85 @@
                 var dirPath = joinURL(root.fullPath, srcDir);
                 var filePath = joinURL(root.fullPath, file1);
                 // create a new directory entry to kick off it
-                createDirectory(srcDir, function (entry) {
-                    // create file
-                    root.getFile(file1, {
-                        create: true
-                    }, function (fileEntry) {
-                        // move directory onto file
-                        entry.moveTo(root, file1, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not move : \n' + srcDir + ' into root directory renamed as ' + file1 + '\n' + file1 + ' file already exists'), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                // chrome returns unknown error with code 13
-                            } else {
-                                expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                            }
-                            // test that original directory exists
-                            root.getDirectory(srcDir, {
-                                create: false
-                            }, function (dirEntry) {
-                                // returning confirms existence so just check fullPath entry
-                                expect(dirEntry).toBeDefined();
-                                expect(dirEntry.fullPath).toCanonicallyMatch(dirPath);
-                                // test that original file exists
-                                root.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                    // cleanup
-                                    deleteEntry(file1, function () {
-                                        deleteEntry(srcDir, done);
-                                    });
-                                }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1));
-                            }, failed.bind(null, done, 'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir));
-                        });
-                    }, failed.bind(null, done, 'root.getFile - Error creating file : ' + file1));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
+                createDirectory(
+                    srcDir,
+                    function (entry) {
+                        // create file
+                        root.getFile(
+                            file1,
+                            {
+                                create: true
+                            },
+                            function (fileEntry) {
+                                // move directory onto file
+                                entry.moveTo(
+                                    root,
+                                    file1,
+                                    succeed.bind(
+                                        null,
+                                        done,
+                                        'entry.moveTo - Unexpected success callback, it should not move : \n' +
+                                            srcDir +
+                                            ' into root directory renamed as ' +
+                                            file1 +
+                                            '\n' +
+                                            file1 +
+                                            ' file already exists'
+                                    ),
+                                    function (error) {
+                                        expect(error).toBeDefined();
+                                        if (isChrome) {
+                                            // chrome returns unknown error with code 13
+                                        } else {
+                                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                        }
+                                        // test that original directory exists
+                                        root.getDirectory(
+                                            srcDir,
+                                            {
+                                                create: false
+                                            },
+                                            function (dirEntry) {
+                                                // returning confirms existence so just check fullPath entry
+                                                expect(dirEntry).toBeDefined();
+                                                expect(dirEntry.fullPath).toCanonicallyMatch(dirPath);
+                                                // test that original file exists
+                                                root.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                        // cleanup
+                                                        deleteEntry(file1, function () {
+                                                            deleteEntry(srcDir, done);
+                                                        });
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'root.getFile - Error getting file, making sure that original file still exists: ' +
+                                                            file1
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' +
+                                                    srcDir
+                                            )
+                                        );
+                                    }
+                                );
+                            },
+                            failed.bind(null, done, 'root.getFile - Error creating file : ' + file1)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                );
             });
             it('file.spec.75 copyTo: directory onto existing file', function (done) {
                 if (isIndexedDBShim) {
@@ -2114,41 +3170,85 @@
                 var dirPath = joinURL(root.fullPath, srcDir);
                 var filePath = joinURL(root.fullPath, file1);
                 // create a new directory entry to kick off it
-                createDirectory(srcDir, function (entry) {
-                    // create file
-                    root.getFile(file1, {
-                        create: true
-                    }, function () {
-                        // copy directory onto file
-                        entry.copyTo(root, file1, succeed.bind(null, done, 'entry.copyTo - Unexpected success callback, it should not copy : \n' + srcDir + ' into root directory renamed as ' + file1 + '\n' + file1 + ' file already exists'), function (error) {
-                            expect(error).toBeDefined();
-                            if (isChrome) {
-                                // chrome returns unknown error with code 13
-                            } else {
-                                expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                            }
-                            // check that original dir still exists
-                            root.getDirectory(srcDir, {
-                                create: false
-                            }, function (dirEntry) {
-                                // returning confirms existence so just check fullPath entry
-                                expect(dirEntry).toBeDefined();
-                                expect(dirEntry.fullPath).toCanonicallyMatch(dirPath);
-                                // test that original file still exists
-                                root.getFile(file1, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                    // cleanup
-                                    deleteEntry(file1, function () {
-                                        deleteEntry(srcDir, done);
-                                    });
-                                }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1));
-                            }, failed.bind(null, done, 'root.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir));
-                        });
-                    }, failed.bind(null, done, 'root.getFile - Error creating file : ' + file1));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
+                createDirectory(
+                    srcDir,
+                    function (entry) {
+                        // create file
+                        root.getFile(
+                            file1,
+                            {
+                                create: true
+                            },
+                            function () {
+                                // copy directory onto file
+                                entry.copyTo(
+                                    root,
+                                    file1,
+                                    succeed.bind(
+                                        null,
+                                        done,
+                                        'entry.copyTo - Unexpected success callback, it should not copy : \n' +
+                                            srcDir +
+                                            ' into root directory renamed as ' +
+                                            file1 +
+                                            '\n' +
+                                            file1 +
+                                            ' file already exists'
+                                    ),
+                                    function (error) {
+                                        expect(error).toBeDefined();
+                                        if (isChrome) {
+                                            // chrome returns unknown error with code 13
+                                        } else {
+                                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                        }
+                                        // check that original dir still exists
+                                        root.getDirectory(
+                                            srcDir,
+                                            {
+                                                create: false
+                                            },
+                                            function (dirEntry) {
+                                                // returning confirms existence so just check fullPath entry
+                                                expect(dirEntry).toBeDefined();
+                                                expect(dirEntry.fullPath).toCanonicallyMatch(dirPath);
+                                                // test that original file still exists
+                                                root.getFile(
+                                                    file1,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                        // cleanup
+                                                        deleteEntry(file1, function () {
+                                                            deleteEntry(srcDir, done);
+                                                        });
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'root.getFile - Error getting file, making sure that original file still exists: ' +
+                                                            file1
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(
+                                                null,
+                                                done,
+                                                'root.getDirectory - Error getting directory, making sure that original directory still exists: ' +
+                                                    srcDir
+                                            )
+                                        );
+                                    }
+                                );
+                            },
+                            failed.bind(null, done, 'root.getFile - Error creating file : ' + file1)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                );
             });
             it('file.spec.76 moveTo: directory onto directory that is not empty', function (done) {
                 if (isIndexedDBShim) {
@@ -2162,92 +3262,173 @@
                 var srcPath = joinURL(root.fullPath, srcDir);
                 var dstPath = joinURL(joinURL(root.fullPath, dstDir), subDir);
                 // ensure destination directory is cleaned up before it
-                deleteEntry(dstDir, function () {
-                    // create a new file entry to kick off it
-                    createDirectory(srcDir, function (entry) {
-                        // create top level directory
-                        root.getDirectory(dstDir, {
-                            create: true
-                        }, function (directory) {
-                            // create sub-directory
-                            directory.getDirectory(subDir, {
-                                create: true
-                            }, function () {
-                                // move srcDir onto dstDir (not empty)
-                                entry.moveTo(root, dstDir, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not copy : \n' + srcDir + ' into root directory renamed as ' + dstDir + '\n' + dstDir + ' directory already exists'), function (error) {
-                                    expect(error).toBeDefined();
-                                    if (isChrome) {
-                                        // chrome returns unknown error with code 13
-                                    } else {
-                                        expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                                    }
-                                    // making sure destination directory still exists
-                                    directory.getDirectory(subDir, {
-                                        create: false
-                                    }, function (dirEntry) {
-                                        // returning confirms existence so just check fullPath entry
-                                        expect(dirEntry).toBeDefined();
-                                        expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
-                                        // making sure source directory exists
-                                        root.getDirectory(srcDir, {
-                                            create: false
-                                        }, function (srcEntry) {
-                                            expect(srcEntry).toBeDefined();
-                                            expect(srcEntry.fullPath).toCanonicallyMatch(srcPath);
-                                            // cleanup
-                                            deleteEntry(srcDir, function () {
-                                                deleteEntry(dstDir, done);
-                                            });
-                                        }, failed.bind(null, done, 'root.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir));
-                                    }, failed.bind(null, done, 'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' + subDir));
-                                });
-                            }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir));
-                        }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        // create a new file entry to kick off it
+                        createDirectory(
+                            srcDir,
+                            function (entry) {
+                                // create top level directory
+                                root.getDirectory(
+                                    dstDir,
+                                    {
+                                        create: true
+                                    },
+                                    function (directory) {
+                                        // create sub-directory
+                                        directory.getDirectory(
+                                            subDir,
+                                            {
+                                                create: true
+                                            },
+                                            function () {
+                                                // move srcDir onto dstDir (not empty)
+                                                entry.moveTo(
+                                                    root,
+                                                    dstDir,
+                                                    succeed.bind(
+                                                        null,
+                                                        done,
+                                                        'entry.moveTo - Unexpected success callback, it should not copy : \n' +
+                                                            srcDir +
+                                                            ' into root directory renamed as ' +
+                                                            dstDir +
+                                                            '\n' +
+                                                            dstDir +
+                                                            ' directory already exists'
+                                                    ),
+                                                    function (error) {
+                                                        expect(error).toBeDefined();
+                                                        if (isChrome) {
+                                                            // chrome returns unknown error with code 13
+                                                        } else {
+                                                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                                        }
+                                                        // making sure destination directory still exists
+                                                        directory.getDirectory(
+                                                            subDir,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            function (dirEntry) {
+                                                                // returning confirms existence so just check fullPath entry
+                                                                expect(dirEntry).toBeDefined();
+                                                                expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
+                                                                // making sure source directory exists
+                                                                root.getDirectory(
+                                                                    srcDir,
+                                                                    {
+                                                                        create: false
+                                                                    },
+                                                                    function (srcEntry) {
+                                                                        expect(srcEntry).toBeDefined();
+                                                                        expect(srcEntry.fullPath).toCanonicallyMatch(srcPath);
+                                                                        // cleanup
+                                                                        deleteEntry(srcDir, function () {
+                                                                            deleteEntry(dstDir, done);
+                                                                        });
+                                                                    },
+                                                                    failed.bind(
+                                                                        null,
+                                                                        done,
+                                                                        'root.getDirectory - Error getting directory, making sure that original directory still exists: ' +
+                                                                            srcDir
+                                                                    )
+                                                                );
+                                                            },
+                                                            failed.bind(
+                                                                null,
+                                                                done,
+                                                                'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' +
+                                                                    subDir
+                                                            )
+                                                        );
+                                                    }
+                                                );
+                                            },
+                                            failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir)
+                                        );
+                                    },
+                                    failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
             it('file.spec.77 moveTo: file replace existing file', function (done) {
                 var file1 = 'entry.move.frf.file1';
                 var file2 = 'entry.move.frf.file2';
                 var file2Path = joinURL(root.fullPath, file2);
                 // create a new directory entry to kick off it
-                createFile(file1, function (entry) {
-                    // create file
-                    root.getFile(file2, {
-                        create: true
-                    }, function () {
-                        // replace file2 with file1
-                        entry.moveTo(root, file2, function (entry2) {
-                            expect(entry2).toBeDefined();
-                            expect(entry2.isFile).toBe(true);
-                            expect(entry2.isDirectory).toBe(false);
-                            expect(entry2.fullPath).toCanonicallyMatch(file2Path);
-                            expect(entry2.name).toCanonicallyMatch(file2);
-                            // old file should not exists
-                            root.getFile(file1, {
-                                create: false
-                            }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, file: ' + file1 + ' should not exists'), function (error) {
-                                expect(error).toBeDefined();
-                                if (isChrome) {
-                                    expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                } else {
-                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                }
-                                // test that new file exists
-                                root.getFile(file2, {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.fullPath).toCanonicallyMatch(file2Path);
-                                    // cleanup
-                                    deleteEntry(file1, function () {
-                                        deleteEntry(file2, done);
-                                    });
-                                }, failed.bind(null, done, 'root.getFile - Error getting moved file: ' + file2));
-                            });
-                        }, failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to root as: ' + file2));
-                    }, failed.bind(null, done, 'root.getFile - Error creating file: ' + file2));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + file1));
+                createFile(
+                    file1,
+                    function (entry) {
+                        // create file
+                        root.getFile(
+                            file2,
+                            {
+                                create: true
+                            },
+                            function () {
+                                // replace file2 with file1
+                                entry.moveTo(
+                                    root,
+                                    file2,
+                                    function (entry2) {
+                                        expect(entry2).toBeDefined();
+                                        expect(entry2.isFile).toBe(true);
+                                        expect(entry2.isDirectory).toBe(false);
+                                        expect(entry2.fullPath).toCanonicallyMatch(file2Path);
+                                        expect(entry2.name).toCanonicallyMatch(file2);
+                                        // old file should not exists
+                                        root.getFile(
+                                            file1,
+                                            {
+                                                create: false
+                                            },
+                                            succeed.bind(
+                                                null,
+                                                done,
+                                                'root.getFile - Unexpected success callback, file: ' + file1 + ' should not exists'
+                                            ),
+                                            function (error) {
+                                                expect(error).toBeDefined();
+                                                if (isChrome) {
+                                                    expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                                } else {
+                                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                                }
+                                                // test that new file exists
+                                                root.getFile(
+                                                    file2,
+                                                    {
+                                                        create: false
+                                                    },
+                                                    function (fileEntry) {
+                                                        expect(fileEntry).toBeDefined();
+                                                        expect(fileEntry.fullPath).toCanonicallyMatch(file2Path);
+                                                        // cleanup
+                                                        deleteEntry(file1, function () {
+                                                            deleteEntry(file2, done);
+                                                        });
+                                                    },
+                                                    failed.bind(null, done, 'root.getFile - Error getting moved file: ' + file2)
+                                                );
+                                            }
+                                        );
+                                    },
+                                    failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to root as: ' + file2)
+                                );
+                            },
+                            failed.bind(null, done, 'root.getFile - Error creating file: ' + file2)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + file1)
+                );
             });
             it('file.spec.78 moveTo: directory replace empty directory', function (done) {
                 if (isIndexedDBShim) {
@@ -2261,51 +3442,94 @@
                 var dstPath = joinURL(root.fullPath, dstDir);
                 var filePath = dstPath + '/' + file1;
                 // ensure destination directory is cleaned up before it
-                deleteEntry(dstDir, function () {
-                    // create a new directory entry to kick off it
-                    createDirectory(srcDir, function (directory) {
-                        // create a file within source directory
-                        directory.getFile(file1, {
-                            create: true
-                        }, function () {
-                            // create destination directory
-                            root.getDirectory(dstDir, {
-                                create: true
-                            }, function () {
-                                // move srcDir to dstDir
-                                directory.moveTo(root, dstDir, function (dirEntry) {
-                                    expect(dirEntry).toBeDefined();
-                                    expect(dirEntry.isFile).toBe(false);
-                                    expect(dirEntry.isDirectory).toBe(true);
-                                    expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
-                                    expect(dirEntry.name).toCanonicallyMatch(dstDir);
-                                    // check that old directory contents have been moved
-                                    dirEntry.getFile(file1, {
-                                        create: false
-                                    }, function (fileEntry) {
-                                        expect(fileEntry).toBeDefined();
-                                        expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
-                                        // check that old directory no longer exists
-                                        root.getDirectory(srcDir, {
-                                            create: false
-                                        }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory: ' + srcDir + ' should not exists'), function (error) {
-                                            expect(error).toBeDefined();
-                                            if (isChrome) {
-                                                expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                                            } else {
-                                                expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                                            }
-                                            // cleanup
-                                            deleteEntry(srcDir, function () {
-                                                deleteEntry(dstDir, done);
-                                            });
-                                        });
-                                    }, failed.bind(null, done, 'dirEntry.getFile - Error getting moved file: ' + file1));
-                                }, failed.bind(null, done, 'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir));
-                            }, failed.bind(null, done, 'root.getDirectory - Error creating directory: ' + dstDir));
-                        }, failed.bind(null, done, 'root.getFile - Error creating file: ' + file1));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory: ' + srcDir));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
+                deleteEntry(
+                    dstDir,
+                    function () {
+                        // create a new directory entry to kick off it
+                        createDirectory(
+                            srcDir,
+                            function (directory) {
+                                // create a file within source directory
+                                directory.getFile(
+                                    file1,
+                                    {
+                                        create: true
+                                    },
+                                    function () {
+                                        // create destination directory
+                                        root.getDirectory(
+                                            dstDir,
+                                            {
+                                                create: true
+                                            },
+                                            function () {
+                                                // move srcDir to dstDir
+                                                directory.moveTo(
+                                                    root,
+                                                    dstDir,
+                                                    function (dirEntry) {
+                                                        expect(dirEntry).toBeDefined();
+                                                        expect(dirEntry.isFile).toBe(false);
+                                                        expect(dirEntry.isDirectory).toBe(true);
+                                                        expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
+                                                        expect(dirEntry.name).toCanonicallyMatch(dstDir);
+                                                        // check that old directory contents have been moved
+                                                        dirEntry.getFile(
+                                                            file1,
+                                                            {
+                                                                create: false
+                                                            },
+                                                            function (fileEntry) {
+                                                                expect(fileEntry).toBeDefined();
+                                                                expect(fileEntry.fullPath).toCanonicallyMatch(filePath);
+                                                                // check that old directory no longer exists
+                                                                root.getDirectory(
+                                                                    srcDir,
+                                                                    {
+                                                                        create: false
+                                                                    },
+                                                                    succeed.bind(
+                                                                        null,
+                                                                        done,
+                                                                        'root.getDirectory - Unexpected success callback, directory: ' +
+                                                                            srcDir +
+                                                                            ' should not exists'
+                                                                    ),
+                                                                    function (error) {
+                                                                        expect(error).toBeDefined();
+                                                                        if (isChrome) {
+                                                                            expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                                                                        } else {
+                                                                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                                                        }
+                                                                        // cleanup
+                                                                        deleteEntry(srcDir, function () {
+                                                                            deleteEntry(dstDir, done);
+                                                                        });
+                                                                    }
+                                                                );
+                                                            },
+                                                            failed.bind(null, done, 'dirEntry.getFile - Error getting moved file: ' + file1)
+                                                        );
+                                                    },
+                                                    failed.bind(
+                                                        null,
+                                                        done,
+                                                        'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir
+                                                    )
+                                                );
+                                            },
+                                            failed.bind(null, done, 'root.getDirectory - Error creating directory: ' + dstDir)
+                                        );
+                                    },
+                                    failed.bind(null, done, 'root.getFile - Error creating file: ' + file1)
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory: ' + srcDir)
+                        );
+                    },
+                    failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                );
             });
             it('file.spec.79 moveTo: directory that does not exist', function (done) {
                 if (isChrome) {
@@ -2315,24 +3539,37 @@
                 var dstDir = 'entry.move.dnf.dstDir';
                 var dstPath = joinURL(root.fullPath, dstDir);
                 // create a new file entry to kick off it
-                createFile(file1, function (entry) {
-                    // move file to directory that does not exist
-                    var directory = new DirectoryEntry(); // eslint-disable-line no-undef
-                    directory.filesystem = root.filesystem;
-                    directory.fullPath = dstPath;
-                    entry.moveTo(directory, null, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, parent directory: ' + dstPath + ' should not exists'), function (error) {
-                        expect(error).toBeDefined();
-                        if (isChrome) {
-                            /* INVALID_MODIFICATION_ERR (code: 9) is thrown instead of NOT_FOUND_ERR(code: 1)
+                createFile(
+                    file1,
+                    function (entry) {
+                        // move file to directory that does not exist
+                        var directory = new DirectoryEntry();
+                        directory.filesystem = root.filesystem;
+                        directory.fullPath = dstPath;
+                        entry.moveTo(
+                            directory,
+                            null,
+                            succeed.bind(
+                                null,
+                                done,
+                                'entry.moveTo - Unexpected success callback, parent directory: ' + dstPath + ' should not exists'
+                            ),
+                            function (error) {
+                                expect(error).toBeDefined();
+                                if (isChrome) {
+                                    /* INVALID_MODIFICATION_ERR (code: 9) is thrown instead of NOT_FOUND_ERR(code: 1)
                             on trying to moveTo directory that does not exist. */
-                            expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef
-                        } else {
-                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
-                        }
-                        // cleanup
-                        deleteEntry(file1, done);
-                    });
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + file1));
+                                    expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR);
+                                } else {
+                                    expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                                }
+                                // cleanup
+                                deleteEntry(file1, done);
+                            }
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + file1)
+                );
             });
             it('file.spec.80 moveTo: invalid target name', function (done) {
                 if (isBrowser) {
@@ -2344,21 +3581,30 @@
                 var file1 = 'entry.move.itn.file1';
                 var file2 = 'bad:file:name';
                 // create a new file entry to kick off it
-                createFile(file1, function (entry) {
-                    // move file1 to file2
-                    entry.moveTo(root, file2, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, : ' + file1 + ' to root as: ' + file2), function (error) {
-                        expect(error).toBeDefined();
-                        expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef
-                        // cleanup
-                        deleteEntry(file1, done);
-                    });
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + file1));
+                createFile(
+                    file1,
+                    function (entry) {
+                        // move file1 to file2
+                        entry.moveTo(
+                            root,
+                            file2,
+                            succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, : ' + file1 + ' to root as: ' + file2),
+                            function (error) {
+                                expect(error).toBeDefined();
+                                expect(error).toBeFileError(FileError.ENCODING_ERR);
+                                // cleanup
+                                deleteEntry(file1, done);
+                            }
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + file1)
+                );
             });
         });
         // Entry
         describe('FileReader', function () {
             it('file.spec.81 should have correct methods', function () {
-                var reader = new FileReader(); // eslint-disable-line no-undef
+                var reader = new FileReader();
                 expect(reader).toBeDefined();
                 expect(typeof reader.readAsBinaryString).toBe('function');
                 expect(typeof reader.readAsDataURL).toBe('function');
@@ -2371,29 +3617,42 @@
         // FileReader
         describe('Read method', function () {
             it('file.spec.82 should error out on non-existent file', function (done) {
-                var fileName = cordova.platformId === 'windowsphone' ? root.toURL() + '/' + 'somefile.txt' : 'somefile.txt'; // eslint-disable-line no-undef
+                var fileName = cordova.platformId === 'windowsphone' ? root.toURL() + '/' + 'somefile.txt' : 'somefile.txt';
                 var verifier = function (evt) {
                     expect(evt).toBeDefined();
                     if (isChrome) {
-                        expect(evt.target.error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
+                        expect(evt.target.error).toBeFileError(FileError.SYNTAX_ERR);
                     } else {
-                        expect(evt.target.error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
+                        expect(evt.target.error).toBeFileError(FileError.NOT_FOUND_ERR);
                     }
                     done();
                 };
-                root.getFile(fileName, {
-                    create: true
-                }, function (entry) {
-                    entry.file(function (file) {
-                        deleteEntry(fileName, function () {
-                            // Create FileReader
-                            var reader = new FileReader(); // eslint-disable-line no-undef
-                            reader.onerror = verifier;
-                            reader.onload = succeed.bind(null, done, 'reader.onload - Unexpected success callback, file: ' + fileName + ' it should not exists');
-                            reader.readAsText(file);
-                        }, failed.bind(null, done, 'deleteEntry - Error removing file: ' + fileName));
-                    }, failed.bind(null, done, 'entry.file - Error reading file: ' + fileName));
-                }, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    function (entry) {
+                        entry.file(function (file) {
+                            deleteEntry(
+                                fileName,
+                                function () {
+                                    // Create FileReader
+                                    var reader = new FileReader();
+                                    reader.onerror = verifier;
+                                    reader.onload = succeed.bind(
+                                        null,
+                                        done,
+                                        'reader.onload - Unexpected success callback, file: ' + fileName + ' it should not exists'
+                                    );
+                                    reader.readAsText(file);
+                                },
+                                failed.bind(null, done, 'deleteEntry - Error removing file: ' + fileName)
+                            );
+                        }, failed.bind(null, done, 'entry.file - Error reading file: ' + fileName));
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.83 should be able to read native blob objects', function (done) {
                 // Skip test if blobs are not supported (e.g.: Android 2.3).
@@ -2416,7 +3675,7 @@
                 } else {
                     try {
                         // iOS 6 does not support Views, so pass in the buffer.
-                        blob = new Blob([uint8Array.buffer, contents]); // eslint-disable-line no-undef
+                        blob = new Blob([uint8Array.buffer, contents]);
                     } catch (e) {
                         // Skip the test if we can't create a blob (e.g.: iOS 5).
                         if (e instanceof TypeError) {
@@ -2431,7 +3690,7 @@
                     expect(evt.target.result).toBe('asdfasdf');
                     done();
                 };
-                var reader = new FileReader(); // eslint-disable-line no-undef
+                var reader = new FileReader();
                 reader.onloadend = verifier;
                 reader.readAsText(blob);
             });
@@ -2439,10 +3698,12 @@
                 var fileName = 'dummy.txt';
                 var fileEntry = null;
                 // use default string if file data is not provided
-                var fileData = fileContents !== undefined ? fileContents :
-                    '\u20AC\xEB - There is an exception to every rule. Except this one.';
-                var fileDataAsBinaryString = fileContents !== undefined ? fileContents :
-                    '\xe2\x82\xac\xc3\xab - There is an exception to every rule. Except this one.';
+                var fileData =
+                    fileContents !== undefined ? fileContents : '\u20AC\xEB - There is an exception to every rule. Except this one.';
+                var fileDataAsBinaryString =
+                    fileContents !== undefined
+                        ? fileContents
+                        : '\xe2\x82\xac\xc3\xab - There is an exception to every rule. Except this one.';
 
                 function createWriter (fe) {
                     fileEntry = fe;
@@ -2465,24 +3726,33 @@
                 createFile(fileName, createWriter, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
             }
             function runReaderTest (funcName, writeBinary, done, progressFunc, verifierFunc, sliceStart, sliceEnd, fileContents) {
-                writeDummyFile(writeBinary, function (fileEntry, file, fileData, fileDataAsBinaryString) {
-                    var verifier = function (evt) {
-                        expect(evt).toBeDefined();
-                        verifierFunc(evt, fileData, fileDataAsBinaryString);
-                    };
-                    var reader = new FileReader(); // eslint-disable-line no-undef
-                    reader.onprogress = progressFunc;
-                    reader.onload = verifier;
-                    reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + file + ' using function: ' + funcName);
-                    if (sliceEnd !== undefined) {
-                        // 'type' is specified so that is will be preserved in the resulting file:
-                        // http://www.w3.org/TR/FileAPI/#slice-method-algo -> "6.4.1. The slice method" -> 4. A), 6. c)
-                        file = file.slice(sliceStart, sliceEnd, file.type);
-                    } else if (sliceStart !== undefined) {
-                        file = file.slice(sliceStart, file.size, file.type);
-                    }
-                    reader[funcName](file);
-                }, done, fileContents);
+                writeDummyFile(
+                    writeBinary,
+                    function (fileEntry, file, fileData, fileDataAsBinaryString) {
+                        var verifier = function (evt) {
+                            expect(evt).toBeDefined();
+                            verifierFunc(evt, fileData, fileDataAsBinaryString);
+                        };
+                        var reader = new FileReader();
+                        reader.onprogress = progressFunc;
+                        reader.onload = verifier;
+                        reader.onerror = failed.bind(
+                            null,
+                            done,
+                            'reader.onerror - Error reading file: ' + file + ' using function: ' + funcName
+                        );
+                        if (sliceEnd !== undefined) {
+                            // 'type' is specified so that is will be preserved in the resulting file:
+                            // http://www.w3.org/TR/FileAPI/#slice-method-algo -> "6.4.1. The slice method" -> 4. A), 6. c)
+                            file = file.slice(sliceStart, sliceEnd, file.type);
+                        } else if (sliceStart !== undefined) {
+                            file = file.slice(sliceStart, file.size, file.type);
+                        }
+                        reader[funcName](file);
+                    },
+                    done,
+                    fileContents
+                );
             }
             function arrayBufferEqualsString (ab, str) {
                 var buf = new Uint8Array(ab);
@@ -2499,11 +3769,20 @@
                 });
             });
             it('file.spec.84.1 should read JSON file properly, readAsText', function (done) {
-                var testObject = {key1: 'value1', key2: 2};
-                runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    expect(evt.target.result).toEqual(JSON.stringify(testObject));
-                    done();
-                }, undefined, undefined, JSON.stringify(testObject));
+                var testObject = { key1: 'value1', key2: 2 };
+                runReaderTest(
+                    'readAsText',
+                    false,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        expect(evt.target.result).toEqual(JSON.stringify(testObject));
+                        done();
+                    },
+                    undefined,
+                    undefined,
+                    JSON.stringify(testObject)
+                );
             });
             it('file.spec.85 should read file properly, Data URI', function (done) {
                 runReaderTest('readAsDataURL', true, done, null, function (evt, fileData, fileDataAsBinaryString) {
@@ -2547,47 +3826,86 @@
                 });
             });
             it('file.spec.88 should read sliced file: readAsText', function (done) {
-                runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    expect(evt.target.result).toBe(fileDataAsBinaryString.slice(10, 40));
-                    done();
-                }, 10, 40);
+                runReaderTest(
+                    'readAsText',
+                    false,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        expect(evt.target.result).toBe(fileDataAsBinaryString.slice(10, 40));
+                        done();
+                    },
+                    10,
+                    40
+                );
             });
             it('file.spec.89 should read sliced file: slice past eof', function (done) {
-                runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    expect(evt.target.result).toBe(fileData.slice(-5, 9999));
-                    done();
-                }, -5, 9999);
+                runReaderTest(
+                    'readAsText',
+                    false,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        expect(evt.target.result).toBe(fileData.slice(-5, 9999));
+                        done();
+                    },
+                    -5,
+                    9999
+                );
             });
             it('file.spec.90 should read sliced file: slice to eof', function (done) {
-                runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    expect(evt.target.result).toBe(fileData.slice(-5));
-                    done();
-                }, -5);
+                runReaderTest(
+                    'readAsText',
+                    false,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        expect(evt.target.result).toBe(fileData.slice(-5));
+                        done();
+                    },
+                    -5
+                );
             });
             it('file.spec.91 should read empty slice', function (done) {
-                runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    expect(evt.target.result).toBe('');
-                    done();
-                }, 0, 0);
+                runReaderTest(
+                    'readAsText',
+                    false,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        expect(evt.target.result).toBe('');
+                        done();
+                    },
+                    0,
+                    0
+                );
             });
             it('file.spec.92 should read sliced file properly, readAsDataURL', function (done) {
-                runReaderTest('readAsDataURL', true, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    /* `readAsDataURL` function is supported, but the mediatype in Chrome depends on entry name extension,
+                runReaderTest(
+                    'readAsDataURL',
+                    true,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        /* `readAsDataURL` function is supported, but the mediatype in Chrome depends on entry name extension,
                         mediatype in IE is always empty (which is the same as `text-plain` according the specification),
                         the mediatype in Firefox is always `application/octet-stream`.
                         For example, if the content is `abcdefg` then Firefox returns `data:application/octet-stream;base64,YWJjZGVmZw==`,
                         IE returns `data:;base64,YWJjZGVmZw==`, Chrome returns `data:<mediatype depending on extension of entry name>;base64,YWJjZGVmZw==`. */
-                    expect(evt.target.result).toBeDataUrl();
+                        expect(evt.target.result).toBeDataUrl();
 
-                    // The atob function it is completely ignored during mobilespec execution, besides the returned object: evt
-                    // it is encoded and the atob function is aimed to decode a string. Even with btoa (encode) the function it gets stucked
-                    // because of the Unicode characters that contains the fileData object.
-                    // Issue reported at JIRA with all the details: CB-7095
+                        // The atob function it is completely ignored during mobilespec execution, besides the returned object: evt
+                        // it is encoded and the atob function is aimed to decode a string. Even with btoa (encode) the function it gets stucked
+                        // because of the Unicode characters that contains the fileData object.
+                        // Issue reported at JIRA with all the details: CB-7095
 
-                    // expect(evt.target.result.slice(23)).toBe(atob(fileDataAsBinaryString.slice(10, -3)));
+                        // expect(evt.target.result.slice(23)).toBe(atob(fileDataAsBinaryString.slice(10, -3)));
 
-                    done();
-                }, 10, -3);
+                        done();
+                    },
+                    10,
+                    -3
+                );
             });
             it('file.spec.93 should read sliced file properly, readAsBinaryString', function (done) {
                 if (isIE) {
@@ -2595,10 +3913,18 @@
                     pending();
                 }
 
-                runReaderTest('readAsBinaryString', true, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    expect(evt.target.result).toBe(fileDataAsBinaryString.slice(-10, -5));
-                    done();
-                }, -10, -5);
+                runReaderTest(
+                    'readAsBinaryString',
+                    true,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        expect(evt.target.result).toBe(fileDataAsBinaryString.slice(-10, -5));
+                        done();
+                    },
+                    -10,
+                    -5
+                );
             });
             it('file.spec.94 should read sliced file properly, readAsArrayBuffer', function (done) {
                 // Skip test if ArrayBuffers are not supported (e.g.: Android 2.3).
@@ -2606,10 +3932,18 @@
                     expect(true).toFailWithMessage('Platform does not supported this feature');
                     done();
                 }
-                runReaderTest('readAsArrayBuffer', true, done, null, function (evt, fileData, fileDataAsBinaryString) {
-                    expect(arrayBufferEqualsString(evt.target.result, fileDataAsBinaryString.slice(0, -1))).toBe(true);
-                    done();
-                }, 0, -1);
+                runReaderTest(
+                    'readAsArrayBuffer',
+                    true,
+                    done,
+                    null,
+                    function (evt, fileData, fileDataAsBinaryString) {
+                        expect(arrayBufferEqualsString(evt.target.result, fileDataAsBinaryString.slice(0, -1))).toBe(true);
+                        done();
+                    },
+                    0,
+                    -1
+                );
             });
             it('file.spec.94.5 should read large file in multiple chunks, readAsArrayBuffer', function (done) {
                 // Skip test if ArrayBuffers are not supported (e.g.: Android 2.3).
@@ -2624,7 +3958,7 @@
                 }
 
                 // Set the chunk size so that the read will take 5 chunks
-                FileReader.READ_CHUNK_SIZE = Math.floor(largeText.length / 4) + 1; // eslint-disable-line no-undef
+                FileReader.READ_CHUNK_SIZE = Math.floor(largeText.length / 4) + 1;
 
                 var chunkCount = 0;
                 var lastProgressValue = -1;
@@ -2642,7 +3976,10 @@
                 };
 
                 runReaderTest(
-                    'readAsArrayBuffer', true, done, progressFunc,
+                    'readAsArrayBuffer',
+                    true,
+                    done,
+                    progressFunc,
                     function (evt, fileData, fileDataAsBinaryString) {
                         expect(arrayBufferEqualsString(evt.target.result, fileDataAsBinaryString.slice(0, -1))).toBe(true);
                         expect(lastProgressValue >= largeText.length).toBe(true);
@@ -2653,7 +3990,10 @@
                         }
                         done();
                     },
-                    0, -1, largeText);
+                    0,
+                    -1,
+                    largeText
+                );
             });
             it('file.spec.94.6 should read large file in multiple chunks, readAsDataURL', function (done) {
                 var largeText = '';
@@ -2662,7 +4002,7 @@
                 }
 
                 // Set the chunk size so that the read will take 5 chunks
-                FileReader.READ_CHUNK_SIZE = Math.floor(largeText.length / 4) + 1; // eslint-disable-line no-undef
+                FileReader.READ_CHUNK_SIZE = Math.floor(largeText.length / 4) + 1;
 
                 var lastProgressValue = 0;
                 var progressFunc = function (evt) {
@@ -2676,7 +4016,11 @@
                     lastProgressValue = evt.loaded;
                 };
 
-                runReaderTest('readAsDataURL', false, done, progressFunc,
+                runReaderTest(
+                    'readAsDataURL',
+                    false,
+                    done,
+                    progressFunc,
                     function (evt, fileData, fileDataAsBinaryString) {
                         expect(function () {
                             // Cut off data uri prefix
@@ -2687,7 +4031,10 @@
                         expect(lastProgressValue).toEqual(largeText.length);
                         done();
                     },
-                undefined, undefined, largeText);
+                    undefined,
+                    undefined,
+                    largeText
+                );
             });
         });
         // Read method
@@ -2696,19 +4043,24 @@
                 // retrieve a FileWriter object
                 var fileName = 'writer.methods';
                 // FileWriter
-                root.getFile(fileName, {
-                    create: true
-                }, function (fileEntry) {
-                    fileEntry.createWriter(function (writer) {
-                        expect(writer).toBeDefined();
-                        expect(typeof writer.write).toBe('function');
-                        expect(typeof writer.seek).toBe('function');
-                        expect(typeof writer.truncate).toBe('function');
-                        expect(typeof writer.abort).toBe('function');
-                        // cleanup
-                        deleteFile(fileName, done);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName));
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    function (fileEntry) {
+                        fileEntry.createWriter(function (writer) {
+                            expect(writer).toBeDefined();
+                            expect(typeof writer.write).toBe('function');
+                            expect(typeof writer.seek).toBe('function');
+                            expect(typeof writer.truncate).toBe('function');
+                            expect(typeof writer.abort).toBe('function');
+                            // cleanup
+                            deleteFile(fileName, done);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.96 should be able to write and append to file, createWriter', function (done) {
                 var fileName = 'writer.append.createWriter'; // file content
@@ -2716,77 +4068,90 @@
                 var exception = ' Except this one.';
                 var length = content.length;
                 // create file, then write and append to it
-                createFile(fileName, function (fileEntry) {
-                    // writes initial file content
-                    fileEntry.createWriter(function (writer) {
-                        // Verifiers declaration
-                        function verifier (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            // Append some more data
-                            writer.onwriteend = secondVerifier;
-                            length += exception.length;
-                            writer.seek(writer.length);
-                            writer.write(exception);
-                        }
-                        function secondVerifier (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            var reader = new FileReader(); // eslint-disable-line no-undef
-                            reader.onloadend = thirdVerifier;
-                            reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
-                            fileEntry.file(function (f) { reader.readAsText(f); });
-                        }
-                        function thirdVerifier (evt) {
-                            expect(evt.target.result).toBe(content + exception);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        }
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        // writes initial file content
+                        fileEntry.createWriter(function (writer) {
+                            // Verifiers declaration
+                            function verifier (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                // Append some more data
+                                writer.onwriteend = secondVerifier;
+                                length += exception.length;
+                                writer.seek(writer.length);
+                                writer.write(exception);
+                            }
+                            function secondVerifier (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                var reader = new FileReader();
+                                reader.onloadend = thirdVerifier;
+                                reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
+                                fileEntry.file(function (f) {
+                                    reader.readAsText(f);
+                                });
+                            }
+                            function thirdVerifier (evt) {
+                                expect(evt.target.result).toBe(content + exception);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            }
 
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.97 should be able to write and append to file, File object', function (done) {
                 var fileName = 'writer.append.File'; // file content
                 var content = 'There is an exception to every rule.'; // for checkin file length
                 var exception = ' Except this one.';
                 var length = content.length;
-                root.getFile(fileName, {
-                    create: true
-                }, function (fileEntry) {
-                    fileEntry.createWriter(function (writer) {
-                        // Verifiers declaration
-                        function verifier () {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            // Append some more data
-                            writer.onwriteend = secondVerifier;
-                            length += exception.length;
-                            writer.seek(writer.length);
-                            writer.write(exception);
-                        }
-                        function secondVerifier () {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            var reader = new FileReader(); // eslint-disable-line no-undef
-                            reader.onloadend = thirdVerifier;
-                            reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
-                            fileEntry.file(function (f) { reader.readAsText(f); });
-                        }
-                        function thirdVerifier (evt) {
-                            expect(evt.target.result).toBe(content + exception);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        }
+                root.getFile(
+                    fileName,
+                    {
+                        create: true
+                    },
+                    function (fileEntry) {
+                        fileEntry.createWriter(function (writer) {
+                            // Verifiers declaration
+                            function verifier () {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                // Append some more data
+                                writer.onwriteend = secondVerifier;
+                                length += exception.length;
+                                writer.seek(writer.length);
+                                writer.write(exception);
+                            }
+                            function secondVerifier () {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                var reader = new FileReader();
+                                reader.onloadend = thirdVerifier;
+                                reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
+                                fileEntry.file(function (f) {
+                                    reader.readAsText(f);
+                                });
+                            }
+                            function thirdVerifier (evt) {
+                                expect(evt.target.result).toBe(content + exception);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            }
 
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName));
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.98 should be able to seek to the middle of the file and write more data than file.length', function (done) {
                 var fileName = 'writer.seek.write'; // file content
@@ -2794,37 +4159,43 @@
                 var exception = 'newer sentence.';
                 var length = content.length;
                 // create file, then write and append to it
-                createFile(fileName, function (fileEntry) {
-                    fileEntry.createWriter(function (writer) {
-                        // Verifiers declaration
-                        function verifier (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            // Append some more data
-                            writer.onwriteend = secondVerifier;
-                            length = 12 + exception.length;
-                            writer.seek(12);
-                            writer.write(exception);
-                        }
-                        function secondVerifier (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            var reader = new FileReader(); // eslint-disable-line no-undef
-                            reader.onloadend = thirdVerifier;
-                            reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
-                            fileEntry.file(function (f) { reader.readAsText(f); });
-                        }
-                        function thirdVerifier (evt) {
-                            expect(evt.target.result).toBe(content.substr(0, 12) + exception);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        }
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        fileEntry.createWriter(function (writer) {
+                            // Verifiers declaration
+                            function verifier (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                // Append some more data
+                                writer.onwriteend = secondVerifier;
+                                length = 12 + exception.length;
+                                writer.seek(12);
+                                writer.write(exception);
+                            }
+                            function secondVerifier (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                var reader = new FileReader();
+                                reader.onloadend = thirdVerifier;
+                                reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
+                                fileEntry.file(function (f) {
+                                    reader.readAsText(f);
+                                });
+                            }
+                            function thirdVerifier (evt) {
+                                expect(evt.target.result).toBe(content.substr(0, 12) + exception);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            }
 
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.99 should be able to seek to the middle of the file and write less data than file.length', function (done) {
                 if (isBrowser) {
@@ -2838,105 +4209,123 @@
                 var exception = 'new.';
                 var length = content.length;
                 // create file, then write and append to it
-                createFile(fileName, function (fileEntry) {
-                    fileEntry.createWriter(function (writer) {
-                        // Verifiers declaration
-                        function verifier (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            // Append some more data
-                            writer.onwriteend = secondVerifier;
-                            length = 8 + exception.length;
-                            writer.seek(8);
-                            writer.write(exception);
-                        }
-                        function secondVerifier (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            var reader = new FileReader(); // eslint-disable-line no-undef
-                            reader.onloadend = thirdVerifier;
-                            reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
-                            fileEntry.file(function (f) { reader.readAsText(f); });
-                        }
-                        function thirdVerifier (evt) {
-                            expect(evt.target.result).toBe(content.substr(0, 8) + exception);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        }
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        fileEntry.createWriter(function (writer) {
+                            // Verifiers declaration
+                            function verifier (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                // Append some more data
+                                writer.onwriteend = secondVerifier;
+                                length = 8 + exception.length;
+                                writer.seek(8);
+                                writer.write(exception);
+                            }
+                            function secondVerifier (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                var reader = new FileReader();
+                                reader.onloadend = thirdVerifier;
+                                reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName);
+                                fileEntry.file(function (f) {
+                                    reader.readAsText(f);
+                                });
+                            }
+                            function thirdVerifier (evt) {
+                                expect(evt.target.result).toBe(content.substr(0, 8) + exception);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            }
 
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.100 should be able to write XML data', function (done) {
                 var fileName = 'writer.xml'; // file content
                 var content = '<?xml version="1.0" encoding="UTF-8"?>\n<test prop="ack">\nData\n</test>\n'; // for testing file length
                 var length = content.length;
                 // creates file, then write XML data
-                createFile(fileName, function (fileEntry) {
-                    fileEntry.createWriter(function (writer) {
-                        // Verifier content
-                        var verifier = function (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        };
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        fileEntry.createWriter(function (writer) {
+                            // Verifier content
+                            var verifier = function (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            };
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.101 should be able to write JSON data', function (done) {
                 var fileName = 'writer.json'; // file content
                 var content = '{ "name": "Guy Incognito", "email": "here@there.com" }'; // for testing file length
                 var length = content.length;
                 // creates file, then write JSON content
-                createFile(fileName, function (fileEntry) {
-                    fileEntry.createWriter(function (writer) {
-                        // Verifier declaration
-                        var verifier = function (evt) {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        };
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        fileEntry.createWriter(function (writer) {
+                            // Verifier declaration
+                            var verifier = function (evt) {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            };
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.102 should be able to seek', function (done) {
                 var fileName = 'writer.seek'; // file content
                 var content = 'There is an exception to every rule. Except this one.'; // for testing file length
                 var length = content.length;
                 // creates file, then write JSON content
-                createFile(fileName, function (fileEntry) {
-                    // writes file content and tests writer.seek
-                    fileEntry.createWriter(function (writer) {
-                        // Verifier declaration
-                        var verifier = function () {
-                            expect(writer.position).toBe(length);
-                            writer.seek(-5);
-                            expect(writer.position).toBe(length - 5);
-                            writer.seek(length + 100);
-                            expect(writer.position).toBe(length);
-                            writer.seek(10);
-                            expect(writer.position).toBe(10);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        };
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.seek(-100);
-                        expect(writer.position).toBe(0);
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        // writes file content and tests writer.seek
+                        fileEntry.createWriter(function (writer) {
+                            // Verifier declaration
+                            var verifier = function () {
+                                expect(writer.position).toBe(length);
+                                writer.seek(-5);
+                                expect(writer.position).toBe(length - 5);
+                                writer.seek(length + 100);
+                                expect(writer.position).toBe(length);
+                                writer.seek(10);
+                                expect(writer.position).toBe(10);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            };
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.seek(-100);
+                            expect(writer.position).toBe(0);
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.103 should be able to truncate', function (done) {
                 if (isIndexedDBShim) {
@@ -2947,24 +4336,28 @@
                 var fileName = 'writer.truncate';
                 var content = 'There is an exception to every rule. Except this one.';
                 // creates file, writes to it, then truncates it
-                createFile(fileName, function (fileEntry) {
-                    fileEntry.createWriter(function (writer) {
-                        // Verifier declaration
-                        var verifier = function () {
-                            expect(writer.length).toBe(36);
-                            expect(writer.position).toBe(36);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        };
-                        // Write process
-                        writer.onwriteend = function () {
-                            // Truncate process after write
-                            writer.onwriteend = verifier;
-                            writer.truncate(36);
-                        };
-                        writer.write(content);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        fileEntry.createWriter(function (writer) {
+                            // Verifier declaration
+                            var verifier = function () {
+                                expect(writer.length).toBe(36);
+                                expect(writer.position).toBe(36);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            };
+                            // Write process
+                            writer.onwriteend = function () {
+                                // Truncate process after write
+                                writer.onwriteend = verifier;
+                                writer.truncate(36);
+                            };
+                            writer.write(content);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.104 should be able to write binary data from an ArrayBuffer', function (done) {
                 // Skip test if ArrayBuffers are not supported (e.g.: Android 2.3).
@@ -2981,25 +4374,32 @@
                     dataView[i] = i;
                 }
                 // creates file, then write content
-                createFile(fileName, function (fileEntry) {
-                    // writes file content
-                    fileEntry.createWriter(function (writer) {
-                        // Verifier declaration
-                        var verifier = function () {
-                            expect(writer.length).toBe(length);
-                            expect(writer.position).toBe(length);
-                            // cleanup
-                            deleteFile(fileName, done);
-                        };
-                        // Write process
-                        writer.onwriteend = verifier;
-                        writer.write(data);
-                    }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (fileEntry) {
+                        // writes file content
+                        fileEntry.createWriter(function (writer) {
+                            // Verifier declaration
+                            var verifier = function () {
+                                expect(writer.length).toBe(length);
+                                expect(writer.position).toBe(length);
+                                // cleanup
+                                deleteFile(fileName, done);
+                            };
+                            // Write process
+                            writer.onwriteend = verifier;
+                            writer.write(data);
+                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.105 should be able to write binary data from a Blob', function (done) {
                 // Skip test if Blobs are not supported (e.g.: Android 2.3).
-                if ((typeof window.Blob === 'undefined' && typeof window.WebKitBlobBuilder === 'undefined') || typeof window.ArrayBuffer === 'undefined') {
+                if (
+                    (typeof window.Blob === 'undefined' && typeof window.WebKitBlobBuilder === 'undefined') ||
+                    typeof window.ArrayBuffer === 'undefined'
+                ) {
                     expect(true).toFailWithMessage('Platform does not supported this feature');
                     done();
                     return;
@@ -3014,8 +4414,8 @@
                 }
                 try {
                     // Mobile Safari: Use Blob constructor
-                    blob = new Blob([data], { // eslint-disable-line no-undef
-                        'type': 'application/octet-stream'
+                    blob = new Blob([data], {
+                        type: 'application/octet-stream'
                     });
                 } catch (e) {
                     if (window.WebKitBlobBuilder) {
@@ -3030,20 +4430,28 @@
                 }
                 if (typeof blob !== 'undefined') {
                     // creates file, then write content
-                    createFile(fileName, function (fileEntry) {
-                        fileEntry.createWriter(function (writer) {
-                            // Verifier declaration
-                            var verifier = function () {
-                                expect(writer.length).toBe(length);
-                                expect(writer.position).toBe(length);
-                                // cleanup
-                                deleteFile(fileName, done);
-                            };
-                            // Write process
-                            writer.onwriteend = verifier;
-                            writer.write(blob);
-                        }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name));
-                    }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                    createFile(
+                        fileName,
+                        function (fileEntry) {
+                            fileEntry.createWriter(function (writer) {
+                                // Verifier declaration
+                                var verifier = function () {
+                                    expect(writer.length).toBe(length);
+                                    expect(writer.position).toBe(length);
+                                    // cleanup
+                                    deleteFile(fileName, done);
+                                };
+                                // Write process
+                                writer.onwriteend = verifier;
+                                writer.write(blob);
+                            }, failed.bind(
+                                null,
+                                done,
+                                'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name
+                            ));
+                        },
+                        failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                    );
                 }
             });
             it('file.spec.106 should be able to write a File to a FileWriter', function (done) {
@@ -3075,11 +4483,19 @@
                     createFile(fileName, write_file, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
                 };
                 var openFile = function (fileName, callback) {
-                    root.getFile(fileName, {
-                        create: false
-                    }, function (fileEntry) {
-                        fileEntry.file(callback, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name));
-                    }, failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName));
+                    root.getFile(
+                        fileName,
+                        {
+                            create: false
+                        },
+                        function (fileEntry) {
+                            fileEntry.file(
+                                callback,
+                                failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)
+                            );
+                        },
+                        failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName)
+                    );
                 };
                 writeFile(dummyFileName, dummyFileText, function (dummyFileWriter) {
                     openFile(dummyFileName, function (file) {
@@ -3116,11 +4532,19 @@
                     createFile(fileName, write_file, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
                 };
                 var openFile = function (fileName, callback) {
-                    root.getFile(fileName, {
-                        create: false
-                    }, function (fileEntry) {
-                        fileEntry.file(callback, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name));
-                    }, failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName));
+                    root.getFile(
+                        fileName,
+                        {
+                            create: false
+                        },
+                        function (fileEntry) {
+                            fileEntry.file(
+                                callback,
+                                failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)
+                            );
+                        },
+                        failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName)
+                    );
                 };
                 writeFile(dummyFileName, dummyFileText, function (dummyFileWriter) {
                     openFile(dummyFileName, function (file) {
@@ -3167,19 +4591,27 @@
                     createFile(fileName, write_file, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
                 };
                 var openFile = function (fileName, callback) {
-                    root.getFile(fileName, {
-                        create: false
-                    }, function (fileEntry) {
-                        fileEntry.file(callback, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name));
-                    }, failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName));
+                    root.getFile(
+                        fileName,
+                        {
+                            create: false
+                        },
+                        function (fileEntry) {
+                            fileEntry.file(
+                                callback,
+                                failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)
+                            );
+                        },
+                        failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName)
+                    );
                 };
                 for (var i = 0; i < dataView.length; i++) {
                     dataView[i] = i;
                 }
                 try {
                     // Mobile Safari: Use Blob constructor
-                    blob = new Blob([data], { // eslint-disable-line no-undef
-                        'type': 'application/octet-stream'
+                    blob = new Blob([data], {
+                        type: 'application/octet-stream'
                     });
                 } catch (e) {
                     if (window.WebKitBlobBuilder) {
@@ -3213,24 +4645,43 @@
             it('file.spec.109 should be able to resolve a file:/// URL', function (done) {
                 var localFilename = 'file.txt';
                 var originalEntry;
-                root.getFile(localFilename, {
-                    create: true
-                }, function (entry) {
-                    originalEntry = entry;
-                    /* This is an undocumented interface to File which exists only for testing
-                     * backwards compatibilty. By obtaining the raw filesystem path of the download
-                     * location, we can pass that to ft.download() to make sure that previously-stored
-                     * paths are still valid.
-                     */
-                    cordova.exec(function (localPath) { // eslint-disable-line no-undef
-                        window.resolveLocalFileSystemURL('file://' + encodeURI(localPath), function (fileEntry) {
-                            expect(fileEntry.toURL()).toEqual(originalEntry.toURL());
-                            // cleanup
-                            deleteFile(localFilename);
-                            done();
-                        }, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving URI: file://' + encodeURI(localPath)));
-                    }, done, 'File', '_getLocalFilesystemPath', [entry.toURL()]);
-                }, failed.bind(null, done, 'root.getFile - Error creating file: ' + localFilename));
+                root.getFile(
+                    localFilename,
+                    {
+                        create: true
+                    },
+                    function (entry) {
+                        originalEntry = entry;
+                        /* This is an undocumented interface to File which exists only for testing
+                         * backwards compatibilty. By obtaining the raw filesystem path of the download
+                         * location, we can pass that to ft.download() to make sure that previously-stored
+                         * paths are still valid.
+                         */
+                        cordova.exec(
+                            function (localPath) {
+                                window.resolveLocalFileSystemURL(
+                                    'file://' + encodeURI(localPath),
+                                    function (fileEntry) {
+                                        expect(fileEntry.toURL()).toEqual(originalEntry.toURL());
+                                        // cleanup
+                                        deleteFile(localFilename);
+                                        done();
+                                    },
+                                    failed.bind(
+                                        null,
+                                        done,
+                                        'window.resolveLocalFileSystemURL - Error resolving URI: file://' + encodeURI(localPath)
+                                    )
+                                );
+                            },
+                            done,
+                            'File',
+                            '_getLocalFilesystemPath',
+                            [entry.toURL()]
+                        );
+                    },
+                    failed.bind(null, done, 'root.getFile - Error creating file: ' + localFilename)
+                );
             });
         });
         // Backwards Compatibility
@@ -3244,70 +4695,117 @@
                 var fileName = 'resolve.file.uri';
                 var dirName = 'resolve.dir.uri';
                 // create a new file entry
-                createDirectory(dirName, function () {
-                    createFile(dirName + '/../' + fileName, function (entry) {
-                        // lookup file system entry
-                        window.resolveLocalFileSystemURL(entry.toURL(), function (fileEntry) {
-                            expect(fileEntry).toBeDefined();
-                            expect(fileEntry.name).toCanonicallyMatch(fileName);
-                            // cleanup
-                            deleteEntry(fileName, done);
-                        }, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving URI: ' + entry.toURL()));
-                    }, failed.bind(null, done, 'createFile - Error creating file: ../' + fileName));
-                }, failed.bind(null, done, 'createDirectory - Error creating directory: ' + dirName));
+                createDirectory(
+                    dirName,
+                    function () {
+                        createFile(
+                            dirName + '/../' + fileName,
+                            function (entry) {
+                                // lookup file system entry
+                                window.resolveLocalFileSystemURL(
+                                    entry.toURL(),
+                                    function (fileEntry) {
+                                        expect(fileEntry).toBeDefined();
+                                        expect(fileEntry.name).toCanonicallyMatch(fileName);
+                                        // cleanup
+                                        deleteEntry(fileName, done);
+                                    },
+                                    failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving URI: ' + entry.toURL())
+                                );
+                            },
+                            failed.bind(null, done, 'createFile - Error creating file: ../' + fileName)
+                        );
+                    },
+                    failed.bind(null, done, 'createDirectory - Error creating directory: ' + dirName)
+                );
             });
             it('file.spec.111 should not traverse above above the root directory', function (done) {
                 var fileName = 'traverse.file.uri';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    // lookup file system entry
-                    root.getFile('../' + fileName, {
-                        create: false
-                    }, function (fileEntry) {
-                        // Note: we expect this to still resolve, as the correct behaviour is to ignore the ../, not to fail out.
-                        expect(fileEntry).toBeDefined();
-                        expect(fileEntry.name).toBe(fileName);
-                        expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'root.getFile - Error getting file: ../' + fileName));
-                }, failed.bind(null, done, 'createFile - Error creating file: ../' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        // lookup file system entry
+                        root.getFile(
+                            '../' + fileName,
+                            {
+                                create: false
+                            },
+                            function (fileEntry) {
+                                // Note: we expect this to still resolve, as the correct behaviour is to ignore the ../, not to fail out.
+                                expect(fileEntry).toBeDefined();
+                                expect(fileEntry.name).toBe(fileName);
+                                expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
+                                // cleanup
+                                deleteEntry(fileName, done);
+                            },
+                            failed.bind(null, done, 'root.getFile - Error getting file: ../' + fileName)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ../' + fileName)
+                );
             });
             it('file.spec.112 should traverse above above the current directory', function (done) {
                 var fileName = 'traverse2.file.uri';
                 var dirName = 'traverse2.subdir';
                 // create a new directory and a file entry
-                createFile(fileName, function () {
-                    createDirectory(dirName, function (entry) {
-                        // lookup file system entry
-                        entry.getFile('../' + fileName, {
-                            create: false
-                        }, function (fileEntry) {
-                            expect(fileEntry).toBeDefined();
-                            expect(fileEntry.name).toBe(fileName);
-                            expect(fileEntry.fullPath).toCanonicallyMatch('/' + fileName);
-                            // cleanup
-                            deleteEntry(fileName, function () {
-                                deleteEntry(dirName, done);
-                            });
-                        }, failed.bind(null, done, 'entry.getFile - Error getting file: ' + fileName + ' recently created above: ' + dirName));
-                    }, failed.bind(null, done, 'createDirectory - Error creating directory: ' + dirName));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function () {
+                        createDirectory(
+                            dirName,
+                            function (entry) {
+                                // lookup file system entry
+                                entry.getFile(
+                                    '../' + fileName,
+                                    {
+                                        create: false
+                                    },
+                                    function (fileEntry) {
+                                        expect(fileEntry).toBeDefined();
+                                        expect(fileEntry.name).toBe(fileName);
+                                        expect(fileEntry.fullPath).toCanonicallyMatch('/' + fileName);
+                                        // cleanup
+                                        deleteEntry(fileName, function () {
+                                            deleteEntry(dirName, done);
+                                        });
+                                    },
+                                    failed.bind(
+                                        null,
+                                        done,
+                                        'entry.getFile - Error getting file: ' + fileName + ' recently created above: ' + dirName
+                                    )
+                                );
+                            },
+                            failed.bind(null, done, 'createDirectory - Error creating directory: ' + dirName)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.113 getFile: get Entry should error for missing file above root directory', function (done) {
                 var fileName = '../missing.file';
                 // create:false, exclusive:false, file does not exist
-                root.getFile(fileName, {
-                    create: false
-                }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not locate nonexistent file: ' + fileName), function (error) {
-                    expect(error).toBeDefined();
-                    if (isChrome) {
-                        expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef
-                    } else {
-                        expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef
+                root.getFile(
+                    fileName,
+                    {
+                        create: false
+                    },
+                    succeed.bind(
+                        null,
+                        done,
+                        'root.getFile - Unexpected success callback, it should not locate nonexistent file: ' + fileName
+                    ),
+                    function (error) {
+                        expect(error).toBeDefined();
+                        if (isChrome) {
+                            expect(error).toBeFileError(FileError.SYNTAX_ERR);
+                        } else {
+                            expect(error).toBeFileError(FileError.NOT_FOUND_ERR);
+                        }
+                        done();
                     }
-                    done();
-                });
+                );
             });
         });
         // Parent References
@@ -3315,7 +4813,7 @@
             /* These specs verify that FileEntries have a toNativeURL method
              * which appears to be sane.
              */
-            var pathExpect = cordova.platformId === 'windowsphone' ? '//nativ' : 'file://'; // eslint-disable-line no-undef
+            var pathExpect = cordova.platformId === 'windowsphone' ? '//nativ' : 'file://';
             if (isChrome) {
                 pathExpect = 'filesystem:http://';
             }
@@ -3326,17 +4824,21 @@
                     pathExpect = rootPath.substr(0, rootPath.indexOf(':'));
                 }
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    expect(entry.toNativeURL).toBeDefined();
-                    expect(entry.name).toCanonicallyMatch(fileName);
-                    expect(typeof entry.toNativeURL).toBe('function');
-                    var nativeURL = entry.toNativeURL();
-                    expect(typeof nativeURL).toBe('string');
-                    expect(nativeURL.substring(0, pathExpect.length)).toEqual(pathExpect);
-                    expect(nativeURL.substring(nativeURL.length - fileName.length)).toEqual(fileName);
-                    // cleanup
-                    deleteEntry(fileName, done);
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        expect(entry.toNativeURL).toBeDefined();
+                        expect(entry.name).toCanonicallyMatch(fileName);
+                        expect(typeof entry.toNativeURL).toBe('function');
+                        var nativeURL = entry.toNativeURL();
+                        expect(typeof nativeURL).toBe('string');
+                        expect(nativeURL.substring(0, pathExpect.length)).toEqual(pathExpect);
+                        expect(nativeURL.substring(nativeURL.length - fileName.length)).toEqual(fileName);
+                        // cleanup
+                        deleteEntry(fileName, done);
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.115 DirectoryReader should return entries with toNativeURL method', function (done) {
                 var dirName = 'nativeEntries.dir';
@@ -3357,34 +4859,55 @@
                     done();
                 };
                 // create a new file entry
-                root.getDirectory(dirName, {
-                    create: true
-                }, function (dir) {
-                    directory = dir;
-                    directory.getFile(fileName, {
+                root.getDirectory(
+                    dirName,
+                    {
                         create: true
-                    }, function (fileEntry) {
-                        var reader = directory.createReader();
-                        reader.readEntries(checkEntries, failed.bind(null, done, 'reader.readEntries - Error reading entries from directory: ' + dirName));
-                    }, failed.bind(null, done, 'directory.getFile - Error creating file: ' + fileName));
-                }, failed.bind(null, done, 'root.getDirectory - Error creating directory: ' + dirName));
+                    },
+                    function (dir) {
+                        directory = dir;
+                        directory.getFile(
+                            fileName,
+                            {
+                                create: true
+                            },
+                            function (fileEntry) {
+                                var reader = directory.createReader();
+                                reader.readEntries(
+                                    checkEntries,
+                                    failed.bind(null, done, 'reader.readEntries - Error reading entries from directory: ' + dirName)
+                                );
+                            },
+                            failed.bind(null, done, 'directory.getFile - Error creating file: ' + fileName)
+                        );
+                    },
+                    failed.bind(null, done, 'root.getDirectory - Error creating directory: ' + dirName)
+                );
             });
             it('file.spec.116 resolveLocalFileSystemURL should return entries with toNativeURL method', function (done) {
                 var fileName = 'native.resolve.uri';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    resolveLocalFileSystemURL(entry.toURL(), function (entry) { // eslint-disable-line no-undef
-                        expect(entry.toNativeURL).toBeDefined();
-                        expect(entry.name).toCanonicallyMatch(fileName);
-                        expect(typeof entry.toNativeURL).toBe('function');
-                        var nativeURL = entry.toNativeURL();
-                        expect(typeof nativeURL).toBe('string');
-                        expect(nativeURL.substring(0, pathExpect.length)).toEqual(pathExpect);
-                        expect(nativeURL.substring(nativeURL.length - fileName.length)).toEqual(fileName);
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL()));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        resolveLocalFileSystemURL(
+                            entry.toURL(),
+                            function (entry) {
+                                expect(entry.toNativeURL).toBeDefined();
+                                expect(entry.name).toCanonicallyMatch(fileName);
+                                expect(typeof entry.toNativeURL).toBe('function');
+                                var nativeURL = entry.toNativeURL();
+                                expect(typeof nativeURL).toBe('string');
+                                expect(nativeURL.substring(0, pathExpect.length)).toEqual(pathExpect);
+                                expect(nativeURL.substring(nativeURL.length - fileName.length)).toEqual(fileName);
+                                // cleanup
+                                deleteEntry(fileName, done);
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL())
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
         });
         // toNativeURL interface
@@ -3393,83 +4916,145 @@
              */
             it('file.spec.117 should not resolve native URLs outside of FS roots', function (done) {
                 // lookup file system entry
-                window.resolveLocalFileSystemURL('file:///this.is.an.invalid.url', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file:///this.is.an.invalid.url'), function (error) {
-                    expect(error).toBeDefined();
-                    done();
-                });
+                window.resolveLocalFileSystemURL(
+                    'file:///this.is.an.invalid.url',
+                    succeed.bind(
+                        null,
+                        done,
+                        'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file:///this.is.an.invalid.url'
+                    ),
+                    function (error) {
+                        expect(error).toBeDefined();
+                        done();
+                    }
+                );
             });
             it('file.spec.118 should not resolve native URLs outside of FS roots', function (done) {
                 // lookup file system entry
-                window.resolveLocalFileSystemURL('file://localhost/this.is.an.invalid.url', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost/this.is.an.invalid.url'), function (error) {
-                    expect(error).toBeDefined();
-                    done();
-                });
+                window.resolveLocalFileSystemURL(
+                    'file://localhost/this.is.an.invalid.url',
+                    succeed.bind(
+                        null,
+                        done,
+                        'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost/this.is.an.invalid.url'
+                    ),
+                    function (error) {
+                        expect(error).toBeDefined();
+                        done();
+                    }
+                );
             });
             it('file.spec.119 should not resolve invalid native URLs', function (done) {
                 // lookup file system entry
-                window.resolveLocalFileSystemURL('file://localhost', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost'), function (error) {
-                    expect(error).toBeDefined();
-                    done();
-                });
+                window.resolveLocalFileSystemURL(
+                    'file://localhost',
+                    succeed.bind(
+                        null,
+                        done,
+                        'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost'
+                    ),
+                    function (error) {
+                        expect(error).toBeDefined();
+                        done();
+                    }
+                );
             });
             it('file.spec.120 should not resolve invalid native URLs with query strings', function (done) {
                 // lookup file system entry
-                window.resolveLocalFileSystemURL('file://localhost?test/test', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost?test/test'), function (error) {
-                    expect(error).toBeDefined();
-                    done();
-                });
+                window.resolveLocalFileSystemURL(
+                    'file://localhost?test/test',
+                    succeed.bind(
+                        null,
+                        done,
+                        'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost?test/test'
+                    ),
+                    function (error) {
+                        expect(error).toBeDefined();
+                        done();
+                    }
+                );
             });
             it('file.spec.121 should resolve native URLs returned by API', function (done) {
                 var fileName = 'native.resolve.uri1';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    /* eslint-disable no-undef */
-                    resolveLocalFileSystemURL(entry.toNativeURL(), function (fileEntry) {
-                        expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toNativeURL()));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        resolveLocalFileSystemURL(
+                            entry.toNativeURL(),
+                            function (fileEntry) {
+                                expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
+                                // cleanup
+                                deleteEntry(fileName, done);
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toNativeURL())
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.122 should resolve native URLs returned by API with localhost', function (done) {
                 var fileName = 'native.resolve.uri2';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    var url = entry.toNativeURL();
-                    url = url.replace('///', '//localhost/');
-                    resolveLocalFileSystemURL(url, function (fileEntry) {
-                        expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        var url = entry.toNativeURL();
+                        url = url.replace('///', '//localhost/');
+                        resolveLocalFileSystemURL(
+                            url,
+                            function (fileEntry) {
+                                expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
+                                // cleanup
+                                deleteEntry(fileName, done);
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.123 should resolve native URLs returned by API with query string', function (done) {
                 var fileName = 'native.resolve.uri3';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    var url = entry.toNativeURL();
-                    url = url + '?test/test';
-                    resolveLocalFileSystemURL(url, function (fileEntry) {
-                        expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        var url = entry.toNativeURL();
+                        url = url + '?test/test';
+                        resolveLocalFileSystemURL(
+                            url,
+                            function (fileEntry) {
+                                expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
+                                // cleanup
+                                deleteEntry(fileName, done);
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
             it('file.spec.124 should resolve native URLs returned by API with localhost and query string', function (done) {
                 var fileName = 'native.resolve.uri4';
                 // create a new file entry
-                createFile(fileName, function (entry) {
-                    var url = entry.toNativeURL();
-                    url = url.replace('///', '//localhost/') + '?test/test';
-                    resolveLocalFileSystemURL(url, function (fileEntry) {
-                        /* eslint-enable no-undef */
-                        expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
-                        // cleanup
-                        deleteEntry(fileName, done);
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url));
-                }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName));
+                createFile(
+                    fileName,
+                    function (entry) {
+                        var url = entry.toNativeURL();
+                        url = url.replace('///', '//localhost/') + '?test/test';
+                        resolveLocalFileSystemURL(
+                            url,
+                            function (fileEntry) {
+                                expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName);
+                                // cleanup
+                                deleteEntry(fileName, done);
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url)
+                        );
+                    },
+                    failed.bind(null, done, 'createFile - Error creating file: ' + fileName)
+                );
             });
         });
         // resolveLocalFileSystemURL on file://
@@ -3500,24 +5085,39 @@
                     deleteEntry(sourceEntry.name, done);
                 };
                 var createSourceAndTransfer = function () {
-                    temp_root.getFile(file1, {
-                        create: true
-                    }, function (entry) {
-                        expect(entry.filesystem).toBeDefined();
-                        if (isChrome) {
-                            expect(entry.filesystem.name).toContain('Temporary');
-                        } else {
-                            expect(entry.filesystem.name).toEqual('temporary');
-                        }
-                        sourceEntry = entry;
-                        // Save for later cleanup
-                        entry.copyTo(persistent_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + file1 + ' to PERSISTENT root as: ' + file2));
-                    }, failed.bind(null, done, 'temp_root.getFile - Error creating file: ' + file1 + 'at TEMPORAL root'));
+                    temp_root.getFile(
+                        file1,
+                        {
+                            create: true
+                        },
+                        function (entry) {
+                            expect(entry.filesystem).toBeDefined();
+                            if (isChrome) {
+                                expect(entry.filesystem.name).toContain('Temporary');
+                            } else {
+                                expect(entry.filesystem.name).toEqual('temporary');
+                            }
+                            sourceEntry = entry;
+                            // Save for later cleanup
+                            entry.copyTo(
+                                persistent_root,
+                                file2,
+                                validateFile,
+                                failed.bind(null, done, 'entry.copyTo - Error copying file: ' + file1 + ' to PERSISTENT root as: ' + file2)
+                            );
+                        },
+                        failed.bind(null, done, 'temp_root.getFile - Error creating file: ' + file1 + 'at TEMPORAL root')
+                    );
                 };
                 // Delete any existing file to start things off
-                persistent_root.getFile(file2, {}, function (entry) {
-                    entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
-                }, createSourceAndTransfer);
+                persistent_root.getFile(
+                    file2,
+                    {},
+                    function (entry) {
+                        entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
+                    },
+                    createSourceAndTransfer
+                );
             });
             it('file.spec.126 copyTo: persistent -> temporary', function (done) {
                 var file1 = 'entry.copy.file1b';
@@ -3540,25 +5140,40 @@
                     deleteEntry(sourceEntry.name, done);
                 };
                 var createSourceAndTransfer = function () {
-                    persistent_root.getFile(file1, {
-                        create: true
-                    }, function (entry) {
-                        expect(entry).toBeDefined();
-                        expect(entry.filesystem).toBeDefined();
-                        if (isChrome) {
-                            expect(entry.filesystem.name).toContain('Persistent');
-                        } else {
-                            expect(entry.filesystem.name).toEqual('persistent');
-                        }
-                        sourceEntry = entry;
-                    // Save for later cleanup
-                        entry.copyTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + file1 + ' to TEMPORAL root as: ' + file2));
-                    }, failed.bind(null, done, 'persistent_root.getFile - Error creating file: ' + file1 + 'at PERSISTENT root'));
+                    persistent_root.getFile(
+                        file1,
+                        {
+                            create: true
+                        },
+                        function (entry) {
+                            expect(entry).toBeDefined();
+                            expect(entry.filesystem).toBeDefined();
+                            if (isChrome) {
+                                expect(entry.filesystem.name).toContain('Persistent');
+                            } else {
+                                expect(entry.filesystem.name).toEqual('persistent');
+                            }
+                            sourceEntry = entry;
+                            // Save for later cleanup
+                            entry.copyTo(
+                                temp_root,
+                                file2,
+                                validateFile,
+                                failed.bind(null, done, 'entry.copyTo - Error copying file: ' + file1 + ' to TEMPORAL root as: ' + file2)
+                            );
+                        },
+                        failed.bind(null, done, 'persistent_root.getFile - Error creating file: ' + file1 + 'at PERSISTENT root')
+                    );
                 };
                 // Delete any existing file to start things off
-                temp_root.getFile(file2, {}, function (entry) {
-                    entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
-                }, createSourceAndTransfer);
+                temp_root.getFile(
+                    file2,
+                    {},
+                    function (entry) {
+                        entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
+                    },
+                    createSourceAndTransfer
+                );
             });
             it('file.spec.127 moveTo: temporary -> persistent', function (done) {
                 var file1 = 'entry.copy.file1a';
@@ -3583,24 +5198,39 @@
                     deleteEntry(sourceEntry.name, done);
                 };
                 var createSourceAndTransfer = function () {
-                    temp_root.getFile(file1, {
-                        create: true
-                    }, function (entry) {
-                        expect(entry.filesystem).toBeDefined();
-                        if (isChrome) {
-                            expect(entry.filesystem.name).toContain('Temporary');
-                        } else {
-                            expect(entry.filesystem.name).toEqual('temporary');
-                        }
-                        sourceEntry = entry;
-                        // Save for later cleanup
-                        entry.moveTo(persistent_root, file2, validateFile, failed.bind(null, done, 'entry.moveTo - Error moving file: ' + file1 + ' to PERSISTENT root as: ' + file2));
-                    }, failed.bind(null, done, 'temp_root.getFile - Error creating file: ' + file1 + 'at TEMPORAL root'));
+                    temp_root.getFile(
+                        file1,
+                        {
+                            create: true
+                        },
+                        function (entry) {
+                            expect(entry.filesystem).toBeDefined();
+                            if (isChrome) {
+                                expect(entry.filesystem.name).toContain('Temporary');
+                            } else {
+                                expect(entry.filesystem.name).toEqual('temporary');
+                            }
+                            sourceEntry = entry;
+                            // Save for later cleanup
+                            entry.moveTo(
+                                persistent_root,
+                                file2,
+                                validateFile,
+                                failed.bind(null, done, 'entry.moveTo - Error moving file: ' + file1 + ' to PERSISTENT root as: ' + file2)
+                            );
+                        },
+                        failed.bind(null, done, 'temp_root.getFile - Error creating file: ' + file1 + 'at TEMPORAL root')
+                    );
                 };
                 // Delete any existing file to start things off
-                persistent_root.getFile(file2, {}, function (entry) {
-                    entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
-                }, createSourceAndTransfer);
+                persistent_root.getFile(
+                    file2,
+                    {},
+                    function (entry) {
+                        entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
+                    },
+                    createSourceAndTransfer
+                );
             });
             it('file.spec.128 moveTo: persistent -> temporary', function (done) {
                 var file1 = 'entry.copy.file1b';
@@ -3623,34 +5253,53 @@
                     deleteEntry(sourceEntry.name, done);
                 };
                 var createSourceAndTransfer = function () {
-                    persistent_root.getFile(file1, {
-                        create: true
-                    }, function (entry) {
-                        expect(entry).toBeDefined();
-                        expect(entry.filesystem).toBeDefined();
-                        if (isChrome) {
-                            expect(entry.filesystem.name).toContain('Persistent');
-                        } else {
-                            expect(entry.filesystem.name).toEqual('persistent');
-                        }
-                        sourceEntry = entry;
-                        // Save for later cleanup
-                        entry.moveTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.moveTo - Error moving file: ' + file1 + ' to TEMPORAL root as: ' + file2));
-                    }, failed.bind(null, done, 'persistent_root.getFile - Error creating file: ' + file1 + 'at PERSISTENT root'));
+                    persistent_root.getFile(
+                        file1,
+                        {
+                            create: true
+                        },
+                        function (entry) {
+                            expect(entry).toBeDefined();
+                            expect(entry.filesystem).toBeDefined();
+                            if (isChrome) {
+                                expect(entry.filesystem.name).toContain('Persistent');
+                            } else {
+                                expect(entry.filesystem.name).toEqual('persistent');
+                            }
+                            sourceEntry = entry;
+                            // Save for later cleanup
+                            entry.moveTo(
+                                temp_root,
+                                file2,
+                                validateFile,
+                                failed.bind(null, done, 'entry.moveTo - Error moving file: ' + file1 + ' to TEMPORAL root as: ' + file2)
+                            );
+                        },
+                        failed.bind(null, done, 'persistent_root.getFile - Error creating file: ' + file1 + 'at PERSISTENT root')
+                    );
                 };
                 // Delete any existing file to start things off
-                temp_root.getFile(file2, {}, function (entry) {
-                    entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
-                }, createSourceAndTransfer);
+                temp_root.getFile(
+                    file2,
+                    {},
+                    function (entry) {
+                        entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
+                    },
+                    createSourceAndTransfer
+                );
             });
             it('file.spec.129 cordova.file.*Directory are set', function () {
                 var expectedPaths = ['applicationDirectory', 'applicationStorageDirectory', 'dataDirectory', 'cacheDirectory'];
-                /* eslint-disable no-undef */
                 if (cordova.platformId === 'android' || cordova.platformId === 'amazon-fireos') {
                     if (cordova.file.externalApplicationStorageDirectory !== null) {
                         // https://issues.apache.org/jira/browse/CB-10411
                         // If external storage can't be mounted, the cordova.file.external* properties are null.
-                        expectedPaths.push('externalApplicationStorageDirectory', 'externalRootDirectory', 'externalCacheDirectory', 'externalDataDirectory');
+                        expectedPaths.push(
+                            'externalApplicationStorageDirectory',
+                            'externalRootDirectory',
+                            'externalCacheDirectory',
+                            'externalDataDirectory'
+                        );
                     }
                 } else if (cordova.platformId === 'blackberry10') {
                     expectedPaths.push('externalRootDirectory', 'sharedDirectory');
@@ -3679,34 +5328,41 @@
                     pending();
                 }
 
-                resolveLocalFileSystemURL('cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/', function (applicationDirectoryRoot) {
-                    expect(applicationDirectoryRoot.isFile).toBe(false);
-                    expect(applicationDirectoryRoot.isDirectory).toBe(true);
-                    expect(applicationDirectoryRoot.name).toCanonicallyMatch('');
-                    expect(applicationDirectoryRoot.fullPath).toCanonicallyMatch('/');
-                    expect(applicationDirectoryRoot.filesystem.name).toEqual(cdvfileApplicationDirectoryFsRootName);
+                resolveLocalFileSystemURL(
+                    'cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/',
+                    function (applicationDirectoryRoot) {
+                        expect(applicationDirectoryRoot.isFile).toBe(false);
+                        expect(applicationDirectoryRoot.isDirectory).toBe(true);
+                        expect(applicationDirectoryRoot.name).toCanonicallyMatch('');
+                        expect(applicationDirectoryRoot.fullPath).toCanonicallyMatch('/');
+                        expect(applicationDirectoryRoot.filesystem.name).toEqual(cdvfileApplicationDirectoryFsRootName);
 
-                    // Requires HelloCordova www assets, <allow-navigation href="cdvfile:*" /> in config.xml or
-                    // cdvfile: in CSP and <access origin="cdvfile://*" /> in config.xml
-                    resolveLocalFileSystemURL('cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/www/img/logo.png', function (entry) {
-                        /* eslint-enable no-undef */
-                        expect(entry.isFile).toBe(true);
-                        expect(entry.isDirectory).toBe(false);
-                        expect(entry.name).toCanonicallyMatch('logo.png');
-                        expect(entry.fullPath).toCanonicallyMatch('/www/img/logo.png');
-                        expect(entry.filesystem.name).toEqual(cdvfileApplicationDirectoryFsRootName);
+                        // Requires HelloCordova www assets, <allow-navigation href="cdvfile:*" /> in config.xml or
+                        // cdvfile: in CSP and <access origin="cdvfile://*" /> in config.xml
+                        resolveLocalFileSystemURL(
+                            'cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/www/img/logo.png',
+                            function (entry) {
+                                expect(entry.isFile).toBe(true);
+                                expect(entry.isDirectory).toBe(false);
+                                expect(entry.name).toCanonicallyMatch('logo.png');
+                                expect(entry.fullPath).toCanonicallyMatch('/www/img/logo.png');
+                                expect(entry.filesystem.name).toEqual(cdvfileApplicationDirectoryFsRootName);
 
-                        var img = new Image(); // eslint-disable-line no-undef
-                        img.onerror = function (err) {
-                            expect(err).not.toBeDefined();
-                            done();
-                        };
-                        img.onload = function () {
-                            done();
-                        };
-                        img.src = entry.toInternalURL();
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory'));
-                }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory'));
+                                var img = new Image();
+                                img.onerror = function (err) {
+                                    expect(err).not.toBeDefined();
+                                    done();
+                                };
+                                img.onload = function () {
+                                    done();
+                                };
+                                img.src = entry.toInternalURL();
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory')
+                        );
+                    },
+                    failed.bind(null, done, 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory')
+                );
             });
         });
         // cross-file-system copy and move
@@ -3716,19 +5372,60 @@
                 var nestedDirName = 'nestedDir131';
                 var nestedFileName = 'nestedFile131.txt';
 
-                createDirectory(parentDirName, function (parent) {
-                    parent.getDirectory(nestedDirName, { create: true }, function () {
-                        parent.getFile(nestedFileName, { create: true }, function () {
-                            parent.removeRecursively(function () {
-                                root.getDirectory(parentDirName, { create: false }, failed.bind(this, done, 'root.getDirectory - unexpected success callback : ' + parentDirName), function () {
-                                    parent.getFile(nestedFileName, { create: false }, failed.bind(this, done, 'getFile - unexpected success callback : ' + nestedFileName), function () {
-                                        parent.getDirectory(nestedDirName, { create: false }, failed.bind(this, done, 'getDirectory - unexpected success callback : ' + nestedDirName), done);
-                                    });
-                                });
-                            }, failed.bind(this, done, 'removeRecursively - Error removing directory : ' + parentDirName));
-                        }, failed.bind(this, done, 'getFile - Error creating file : ' + nestedFileName));
-                    }, failed.bind(this, done, 'getDirectory - Error creating directory : ' + nestedDirName));
-                }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + parentDirName));
+                createDirectory(
+                    parentDirName,
+                    function (parent) {
+                        parent.getDirectory(
+                            nestedDirName,
+                            { create: true },
+                            function () {
+                                parent.getFile(
+                                    nestedFileName,
+                                    { create: true },
+                                    function () {
+                                        parent.removeRecursively(function () {
+                                            root.getDirectory(
+                                                parentDirName,
+                                                { create: false },
+                                                failed.bind(
+                                                    this,
+                                                    done,
+                                                    'root.getDirectory - unexpected success callback : ' + parentDirName
+                                                ),
+                                                function () {
+                                                    parent.getFile(
+                                                        nestedFileName,
+                                                        { create: false },
+                                                        failed.bind(
+                                                            this,
+                                                            done,
+                                                            'getFile - unexpected success callback : ' + nestedFileName
+                                                        ),
+                                                        function () {
+                                                            parent.getDirectory(
+                                                                nestedDirName,
+                                                                { create: false },
+                                                                failed.bind(
+                                                                    this,
+                                                                    done,
+                                                                    'getDirectory - unexpected success callback : ' + nestedDirName
+                                                                ),
+                                                                done
+                                                            );
+                                                        }
+                                                    );
+                                                }
+                                            );
+                                        }, failed.bind(this, done, 'removeRecursively - Error removing directory : ' + parentDirName));
+                                    },
+                                    failed.bind(this, done, 'getFile - Error creating file : ' + nestedFileName)
+                                );
+                            },
+                            failed.bind(this, done, 'getDirectory - Error creating directory : ' + nestedDirName)
+                        );
+                    },
+                    failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + parentDirName)
+                );
             });
             it('file.spec.132 Entry should be created succesfully when using relative paths if its parent directory exists', function (done) {
                 /* Directory entries have to be created successively.
@@ -3748,13 +5445,20 @@
                     deleteEntry(parentName, done);
                 };
 
-                createDirectory(parentName, function () {
-                    root.getDirectory(parentName + '/' + nestedName, {create: true}, win,
-                        failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + path));
-                }, failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + parentName));
+                createDirectory(
+                    parentName,
+                    function () {
+                        root.getDirectory(
+                            parentName + '/' + nestedName,
+                            { create: true },
+                            win,
+                            failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + path)
+                        );
+                    },
+                    failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + parentName)
+                );
             });
             it('file.spec.133 A file being removed should not affect another file with name being a prefix of the removed file name.', function (done) {
-
                 // Names include special symbols so that we check the IndexedDB range used
                 var deletedFileName = 'deletedFile.0';
                 var secondFileName = 'deletedFile.0.1';
@@ -3767,18 +5471,43 @@
                     deleteEntry(fileEntry.name, done);
                 };
 
-                createFile(deletedFileName, function (deletedFile) {
-                    createFile(secondFileName, function () {
-                        deletedFile.remove(function () {
-                            root.getFile(deletedFileName, {create: false}, failed.bind(this, done, 'getFile - unexpected success callback getting deleted file : ' + deletedFileName), function () {
-                                root.getFile(secondFileName, {create: false}, win, failed.bind(this, done, 'getFile - Error getting file after deleting deletedFile : ' + secondFileName));
-                            });
-                        }, failed.bind(this, done, 'remove - Error removing file : ' + deletedFileName));
-                    }, failed.bind(this, done, 'getFile - Error creating file : ' + secondFileName));
-                }, failed.bind(this, done, 'getFile - Error creating file : ' + deletedFileName));
+                createFile(
+                    deletedFileName,
+                    function (deletedFile) {
+                        createFile(
+                            secondFileName,
+                            function () {
+                                deletedFile.remove(function () {
+                                    root.getFile(
+                                        deletedFileName,
+                                        { create: false },
+                                        failed.bind(
+                                            this,
+                                            done,
+                                            'getFile - unexpected success callback getting deleted file : ' + deletedFileName
+                                        ),
+                                        function () {
+                                            root.getFile(
+                                                secondFileName,
+                                                { create: false },
+                                                win,
+                                                failed.bind(
+                                                    this,
+                                                    done,
+                                                    'getFile - Error getting file after deleting deletedFile : ' + secondFileName
+                                                )
+                                            );
+                                        }
+                                    );
+                                }, failed.bind(this, done, 'remove - Error removing file : ' + deletedFileName));
+                            },
+                            failed.bind(this, done, 'getFile - Error creating file : ' + secondFileName)
+                        );
+                    },
+                    failed.bind(this, done, 'getFile - Error creating file : ' + deletedFileName)
+                );
             });
             it('file.spec.134 A directory being removed should not affect another directory with name being a prefix of the removed directory name.', function (done) {
-
                 // Names include special symbols so that we check the IndexedDB range used
                 var deletedDirName = 'deletedDir.0';
                 var secondDirName = 'deletedDir.0.1';
@@ -3791,18 +5520,44 @@
                     deleteEntry(directory.name, done);
                 };
 
-                createDirectory(deletedDirName, function (deletedDir) {
-                    createDirectory(secondDirName, function () {
-                        deletedDir.remove(function () {
-                            root.getDirectory(deletedDirName, {create: false}, failed.bind(this, done, 'getDirectory - unexpected success callback getting deleted directory : ' + deletedDirName), function () {
-                                root.getDirectory(secondDirName, {create: false}, win, failed.bind(this, done, 'getDirectory - Error getting directory after deleting deletedDirectory : ' + secondDirName));
-                            });
-                        }, failed.bind(this, done, 'remove - Error removing directory : ' + deletedDirName));
-                    }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + secondDirName));
-                }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + deletedDirName));
+                createDirectory(
+                    deletedDirName,
+                    function (deletedDir) {
+                        createDirectory(
+                            secondDirName,
+                            function () {
+                                deletedDir.remove(function () {
+                                    root.getDirectory(
+                                        deletedDirName,
+                                        { create: false },
+                                        failed.bind(
+                                            this,
+                                            done,
+                                            'getDirectory - unexpected success callback getting deleted directory : ' + deletedDirName
+                                        ),
+                                        function () {
+                                            root.getDirectory(
+                                                secondDirName,
+                                                { create: false },
+                                                win,
+                                                failed.bind(
+                                                    this,
+                                                    done,
+                                                    'getDirectory - Error getting directory after deleting deletedDirectory : ' +
+                                                        secondDirName
+                                                )
+                                            );
+                                        }
+                                    );
+                                }, failed.bind(this, done, 'remove - Error removing directory : ' + deletedDirName));
+                            },
+                            failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + secondDirName)
+                        );
+                    },
+                    failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + deletedDirName)
+                );
             });
             it('file.spec.135 Deletion of a child directory should not affect the parent directory.', function (done) {
-
                 var parentName = 'parentName135';
                 var childName = 'childName135';
 
@@ -3814,17 +5569,29 @@
                     deleteEntry(directory.name, done);
                 };
 
-                createDirectory(parentName, function (parent) {
-                    parent.getDirectory(childName, {create: true}, function (child) {
-                        child.removeRecursively(function () {
-                            root.getDirectory(parentName, {create: false}, win, failed.bind(this, done, 'root.getDirectory - Error getting parent directory : ' + parentName));
-                        },
-                        failed.bind(this, done, 'getDirectory - Error removing directory : ' + childName));
-                    }, failed.bind(this, done, 'getDirectory - Error creating directory : ' + childName));
-                }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + parentName));
+                createDirectory(
+                    parentName,
+                    function (parent) {
+                        parent.getDirectory(
+                            childName,
+                            { create: true },
+                            function (child) {
+                                child.removeRecursively(function () {
+                                    root.getDirectory(
+                                        parentName,
+                                        { create: false },
+                                        win,
+                                        failed.bind(this, done, 'root.getDirectory - Error getting parent directory : ' + parentName)
+                                    );
+                                }, failed.bind(this, done, 'getDirectory - Error removing directory : ' + childName));
+                            },
+                            failed.bind(this, done, 'getDirectory - Error creating directory : ' + childName)
+                        );
+                    },
+                    failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + parentName)
+                );
             });
             it('file.spec.136 Paths should support Unicode symbols.', function (done) {
-
                 var dirName = '文件插件';
 
                 var win = function (directory) {
@@ -3835,14 +5602,22 @@
                     deleteEntry(directory.name, done);
                 };
 
-                createDirectory(dirName, function () {
-                    root.getDirectory(dirName, {create: false}, win,
-                        failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + dirName));
-                }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + dirName));
+                createDirectory(
+                    dirName,
+                    function () {
+                        root.getDirectory(
+                            dirName,
+                            { create: false },
+                            win,
+                            failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + dirName)
+                        );
+                    },
+                    failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + dirName)
+                );
             });
         });
         // Content and Asset URLs
-        if (cordova.platformId === 'android') { // eslint-disable-line no-undef
+        if (cordova.platformId === 'android') {
             describe('content: URLs', function () {
                 // Warning: Default HelloWorld www directory structure is required for these tests (www/index.html at least)
                 function testContentCopy (src, done) {
@@ -3858,16 +5633,34 @@
                         deleteEntry(entry.name, done);
                     };
                     var transfer = function () {
-                        resolveLocalFileSystemURL(src, function (entry) { // eslint-disable-line no-undef
-                            expect(entry).toBeDefined();
-                            expect(entry.filesystem.name).toEqual('content');
-                            entry.copyTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + entry.toURL() + ' to TEMPORAL root as: ' + file2));
-                        }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for content provider'));
+                        resolveLocalFileSystemURL(
+                            src,
+                            function (entry) {
+                                expect(entry).toBeDefined();
+                                expect(entry.filesystem.name).toEqual('content');
+                                entry.copyTo(
+                                    temp_root,
+                                    file2,
+                                    validateFile,
+                                    failed.bind(
+                                        null,
+                                        done,
+                                        'entry.copyTo - Error copying file: ' + entry.toURL() + ' to TEMPORAL root as: ' + file2
+                                    )
+                                );
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL failed for content provider')
+                        );
                     };
                     // Delete any existing file to start things off
-                    temp_root.getFile(file2, {}, function (entry) {
-                        entry.remove(transfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
-                    }, transfer);
+                    temp_root.getFile(
+                        file2,
+                        {},
+                        function (entry) {
+                            entry.remove(transfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
+                        },
+                        transfer
+                    );
                 }
                 it('file.spec.138 copyTo: content', function (done) {
                     testContentCopy('content://org.apache.cordova.file.testprovider/www/index.html', done);
@@ -3876,9 +5669,13 @@
                     testContentCopy('content://org.apache.cordova.file.testprovider/?name=foo%20bar&realPath=%2Fwww%2Findex.html', done);
                 });
                 it('file.spec.140 delete: content should fail', function (done) {
-                    resolveLocalFileSystemURL('content://org.apache.cordova.file.testprovider/www/index.html', function (entry) { // eslint-disable-line no-undef
-                        entry.remove(failed.bind(null, done, 'expected delete to fail'), done);
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for content provider'));
+                    resolveLocalFileSystemURL(
+                        'content://org.apache.cordova.file.testprovider/www/index.html',
+                        function (entry) {
+                            entry.remove(failed.bind(null, done, 'expected delete to fail'), done);
+                        },
+                        failed.bind(null, done, 'resolveLocalFileSystemURL failed for content provider')
+                    );
                 });
             });
 
@@ -3886,181 +5683,286 @@
             // for details see https://issues.apache.org/jira/browse/CB-6428
             // and https://mail-archives.apache.org/mod_mbox/cordova-dev/201508.mbox/%3C782154441.8406572.1440182722528.JavaMail.yahoo%40mail.yahoo.com%3E
             describe('asset: URLs', function () {
-                it('file.spec.141 filePaths.applicationStorage', function () {
-                    expect(cordova.file.applicationDirectory).toEqual('file:///android_asset/'); // eslint-disable-line no-undef
-                }, MEDIUM_TIMEOUT);
-                it('file.spec.142 assets should be enumerable', function (done) {
-                    resolveLocalFileSystemURL('file:///android_asset/www/fixtures/asset-test', function (entry) { // eslint-disable-line no-undef
-                        var reader = entry.createReader();
-                        reader.readEntries(function (entries) {
-                            expect(entries.length).not.toBe(0);
-                            done();
-                        }, failed.bind(null, done, 'reader.readEntries - Error during reading of entries from assets directory'));
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets'));
-                }, MEDIUM_TIMEOUT);
-                it('file.spec.145 asset subdirectories should be obtainable', function (done) {
-                    resolveLocalFileSystemURL('file:///android_asset/www/fixtures', function (entry) { // eslint-disable-line no-undef
-                        entry.getDirectory('asset-test', { create: false }, function (subDir) {
-                            expect(subDir).toBeDefined();
-                            expect(subDir.isFile).toBe(false);
-                            expect(subDir.isDirectory).toBe(true);
-                            expect(subDir.name).toCanonicallyMatch('asset-test');
-                            done();
-                        }, failed.bind(null, done, 'entry.getDirectory - Error getting asset subdirectory'));
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets'));
-                }, MEDIUM_TIMEOUT);
-                it('file.spec.146 asset files should be readable', function (done) {
-                    resolveLocalFileSystemURL('file:///android_asset/www/fixtures/asset-test/asset-test.txt', function (entry) { // eslint-disable-line no-undef
-                        expect(entry.isFile).toBe(true);
-                        entry.file(function (file) {
-                            expect(file).toBeDefined();
-                            var reader = new FileReader(); // eslint-disable-line no-undef
-                            reader.onerror = failed.bind(null, done, 'reader.readAsText - Error reading asset text file');
-                            reader.onloadend = function () {
-                                expect(this.result).toBeDefined();
-                                expect(this.result.length).not.toBe(0);
-                                done();
-                            };
-                            reader.readAsText(file);
-                        }, failed.bind(null, done, 'entry.file - Error reading asset file'));
-                    }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets'));
-                }, MEDIUM_TIMEOUT);
-                it('file.spec.143 copyTo: asset -> temporary', function (done) {
-                    var file2 = 'entry.copy.file2b';
-                    var fullPath = joinURL(temp_root.fullPath, file2);
-                    var validateFile = function (entry) {
-                        expect(entry.isFile).toBe(true);
-                        expect(entry.isDirectory).toBe(false);
-                        expect(entry.name).toCanonicallyMatch(file2);
-                        expect(entry.fullPath).toCanonicallyMatch(fullPath);
-                        expect(entry.filesystem.name).toEqual('temporary');
-                        // cleanup
-                        deleteEntry(entry.name, done);
-                    };
-                    var transfer = function () {
-                        resolveLocalFileSystemURL('file:///android_asset/www/index.html', function (entry) { // eslint-disable-line no-undef
-                            expect(entry.filesystem.name).toEqual('assets');
-                            entry.copyTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + entry.toURL() + ' to TEMPORAL root as: ' + file2));
-                        }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets'));
-                    };
-                    // Delete any existing file to start things off
-                    temp_root.getFile(file2, {}, function (entry) {
-                        entry.remove(transfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
-                    }, transfer);
-                }, MEDIUM_TIMEOUT);
+                it(
+                    'file.spec.141 filePaths.applicationStorage',
+                    function () {
+                        expect(cordova.file.applicationDirectory).toEqual('file:///android_asset/');
+                    },
+                    MEDIUM_TIMEOUT
+                );
+                it(
+                    'file.spec.142 assets should be enumerable',
+                    function (done) {
+                        resolveLocalFileSystemURL(
+                            'file:///android_asset/www/fixtures/asset-test',
+                            function (entry) {
+                                var reader = entry.createReader();
+                                reader.readEntries(function (entries) {
+                                    expect(entries.length).not.toBe(0);
+                                    done();
+                                }, failed.bind(null, done, 'reader.readEntries - Error during reading of entries from assets directory'));
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')
+                        );
+                    },
+                    MEDIUM_TIMEOUT
+                );
+                it(
+                    'file.spec.145 asset subdirectories should be obtainable',
+                    function (done) {
+                        resolveLocalFileSystemURL(
+                            'file:///android_asset/www/fixtures',
+                            function (entry) {
+                                entry.getDirectory(
+                                    'asset-test',
+                                    { create: false },
+                                    function (subDir) {
+                                        expect(subDir).toBeDefined();
+                                        expect(subDir.isFile).toBe(false);
+                                        expect(subDir.isDirectory).toBe(true);
+                                        expect(subDir.name).toCanonicallyMatch('asset-test');
+                                        done();
+                                    },
+                                    failed.bind(null, done, 'entry.getDirectory - Error getting asset subdirectory')
+                                );
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')
+                        );
+                    },
+                    MEDIUM_TIMEOUT
+                );
+                it(
+                    'file.spec.146 asset files should be readable',
+                    function (done) {
+                        resolveLocalFileSystemURL(
+                            'file:///android_asset/www/fixtures/asset-test/asset-test.txt',
+                            function (entry) {
+                                expect(entry.isFile).toBe(true);
+                                entry.file(function (file) {
+                                    expect(file).toBeDefined();
+                                    var reader = new FileReader();
+                                    reader.onerror = failed.bind(null, done, 'reader.readAsText - Error reading asset text file');
+                                    reader.onloadend = function () {
+                                        expect(this.result).toBeDefined();
+                                        expect(this.result.length).not.toBe(0);
+                                        done();
+                                    };
+                                    reader.readAsText(file);
+                                }, failed.bind(null, done, 'entry.file - Error reading asset file'));
+                            },
+                            failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')
+                        );
+                    },
+                    MEDIUM_TIMEOUT
+                );
+                it(
+                    'file.spec.143 copyTo: asset -> temporary',
+                    function (done) {
+                        var file2 = 'entry.copy.file2b';
+                        var fullPath = joinURL(temp_root.fullPath, file2);
+                        var validateFile = function (entry) {
+                            expect(entry.isFile).toBe(true);
+                            expect(entry.isDirectory).toBe(false);
+                            expect(entry.name).toCanonicallyMatch(file2);
+                            expect(entry.fullPath).toCanonicallyMatch(fullPath);
+                            expect(entry.filesystem.name).toEqual('temporary');
+                            // cleanup
+                            deleteEntry(entry.name, done);
+                        };
+                        var transfer = function () {
+                            resolveLocalFileSystemURL(
+                                'file:///android_asset/www/index.html',
+                                function (entry) {
+                                    expect(entry.filesystem.name).toEqual('assets');
+                                    entry.copyTo(
+                                        temp_root,
+                                        file2,
+                                        validateFile,
+                                        failed.bind(
+                                            null,
+                                            done,
+                                            'entry.copyTo - Error copying file: ' + entry.toURL() + ' to TEMPORAL root as: ' + file2
+                                        )
+                                    );
+                                },
+                                failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')
+                            );
+                        };
+                        // Delete any existing file to start things off
+                        temp_root.getFile(
+                            file2,
+                            {},
+                            function (entry) {
+                                entry.remove(transfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2));
+                            },
+                            transfer
+                        );
+                    },
+                    MEDIUM_TIMEOUT
+                );
             });
-            it('file.spec.144 copyTo: asset directory', function (done) {
-                var srcUrl = 'file:///android_asset/www/fixtures/asset-test';
-                var dstDir = 'entry.copy.dstDir';
-                var dstPath = joinURL(root.fullPath, dstDir);
-                // create a new directory entry to kick off it
-                deleteEntry(dstDir, function () {
-                    resolveLocalFileSystemURL(srcUrl, function (directory) { // eslint-disable-line no-undef
-                        directory.copyTo(root, dstDir, function (directory) {
-                            expect(directory).toBeDefined();
-                            expect(directory.isFile).toBe(false);
-                            expect(directory.isDirectory).toBe(true);
-                            expect(directory.fullPath).toCanonicallyMatch(dstPath);
-                            expect(directory.name).toCanonicallyMatch(dstDir);
-                            root.getDirectory(dstDir, {
-                                create: false
-                            }, function (dirEntry) {
-                                expect(dirEntry).toBeDefined();
-                                expect(dirEntry.isFile).toBe(false);
-                                expect(dirEntry.isDirectory).toBe(true);
-                                expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
-                                expect(dirEntry.name).toCanonicallyMatch(dstDir);
-                                dirEntry.getFile('asset-test.txt', {
-                                    create: false
-                                }, function (fileEntry) {
-                                    expect(fileEntry).toBeDefined();
-                                    expect(fileEntry.isFile).toBe(true);
-                                    // cleanup
-                                    deleteEntry(dstDir, done);
-                                }, failed.bind(null, done, 'dirEntry.getFile - Error getting subfile'));
-                            }, failed.bind(null, done, 'root.getDirectory - Error getting copied directory'));
-                        }, failed.bind(null, done, 'directory.copyTo - Error copying directory'));
-                    }, failed.bind(null, done, 'resolving src dir'));
-                }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir));
-            }, MEDIUM_TIMEOUT);
+            it(
+                'file.spec.144 copyTo: asset directory',
+                function (done) {
+                    var srcUrl = 'file:///android_asset/www/fixtures/asset-test';
+                    var dstDir = 'entry.copy.dstDir';
+                    var dstPath = joinURL(root.fullPath, dstDir);
+                    // create a new directory entry to kick off it
+                    deleteEntry(
+                        dstDir,
+                        function () {
+                            resolveLocalFileSystemURL(
+                                srcUrl,
+                                function (directory) {
+                                    directory.copyTo(
+                                        root,
+                                        dstDir,
+                                        function (directory) {
+                                            expect(directory).toBeDefined();
+                                            expect(directory.isFile).toBe(false);
+                                            expect(directory.isDirectory).toBe(true);
+                                            expect(directory.fullPath).toCanonicallyMatch(dstPath);
+                                            expect(directory.name).toCanonicallyMatch(dstDir);
+                                            root.getDirectory(
+                                                dstDir,
+                                                {
+                                                    create: false
+                                                },
+                                                function (dirEntry) {
+                                                    expect(dirEntry).toBeDefined();
+                                                    expect(dirEntry.isFile).toBe(false);
+                                                    expect(dirEntry.isDirectory).toBe(true);
+                                                    expect(dirEntry.fullPath).toCanonicallyMatch(dstPath);
+                                                    expect(dirEntry.name).toCanonicallyMatch(dstDir);
+                                                    dirEntry.getFile(
+                                                        'asset-test.txt',
+                                                        {
+                                                            create: false
+                                                        },
+                                                        function (fileEntry) {
+                                                            expect(fileEntry).toBeDefined();
+                                                            expect(fileEntry.isFile).toBe(true);
+                                                            // cleanup
+                                                            deleteEntry(dstDir, done);
+                                                        },
+                                                        failed.bind(null, done, 'dirEntry.getFile - Error getting subfile')
+                                                    );
+                                                },
+                                                failed.bind(null, done, 'root.getDirectory - Error getting copied directory')
+                                            );
+                                        },
+                                        failed.bind(null, done, 'directory.copyTo - Error copying directory')
+                                    );
+                                },
+                                failed.bind(null, done, 'resolving src dir')
+                            );
+                        },
+                        failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)
+                    );
+                },
+                MEDIUM_TIMEOUT
+            );
         }
     });
-
 };
 //* *****************************************************************************************
 //* **************************************Manual Tests***************************************
 //* *****************************************************************************************
 
 exports.defineManualTests = function (contentEl, createActionButton) {
-
     function resolveFs (fsname) {
         var fsURL = 'cdvfile://localhost/' + fsname + '/';
         logMessage('Resolving URL: ' + fsURL);
-        /* eslint-disable no-undef */
-        resolveLocalFileSystemURL(fsURL, function (entry) {
-            logMessage('Success', 'green');
-            logMessage(entry.toURL(), 'blue');
-            logMessage(entry.toInternalURL(), 'blue');
-            logMessage('Resolving URL: ' + entry.toURL());
-            resolveLocalFileSystemURL(entry.toURL(), function (entry2) {
+        resolveLocalFileSystemURL(
+            fsURL,
+            function (entry) {
                 logMessage('Success', 'green');
-                logMessage(entry2.toURL(), 'blue');
-                logMessage(entry2.toInternalURL(), 'blue');
-            }, logError('resolveLocalFileSystemURL'));
-        }, logError('resolveLocalFileSystemURL'));
+                logMessage(entry.toURL(), 'blue');
+                logMessage(entry.toInternalURL(), 'blue');
+                logMessage('Resolving URL: ' + entry.toURL());
+                resolveLocalFileSystemURL(
+                    entry.toURL(),
+                    function (entry2) {
+                        logMessage('Success', 'green');
+                        logMessage(entry2.toURL(), 'blue');
+                        logMessage(entry2.toInternalURL(), 'blue');
+                    },
+                    logError('resolveLocalFileSystemURL')
+                );
+            },
+            logError('resolveLocalFileSystemURL')
+        );
     }
 
     function testPrivateURL () {
-        requestFileSystem(LocalFileSystem.TEMPORARY, 0, function (fileSystem) {
-            logMessage('Temporary root is at ' + fileSystem.root.toNativeURL());
-            fileSystem.root.getFile('testfile', {
-                create: true
-            }, function (entry) {
-                logMessage('Temporary file is at ' + entry.toNativeURL());
-                if (entry.toNativeURL().substring(0, 12) === 'file:///var/') {
-                    logMessage('File starts with /var/, trying /private/var');
-                    var newURL = 'file://localhost/private/var/' + entry.toNativeURL().substring(12) + '?and=another_thing';
-                    // var newURL = entry.toNativeURL();
-                    logMessage(newURL, 'blue');
-                    resolveLocalFileSystemURL(newURL, function (newEntry) {
-                        logMessage('Successfully resolved.', 'green');
-                        logMessage(newEntry.toURL(), 'blue');
-                        logMessage(newEntry.toNativeURL(), 'blue');
-                    }, logError('resolveLocalFileSystemURL'));
-                }
-            }, logError('getFile'));
-        }, logError('requestFileSystem'));
+        requestFileSystem(
+            LocalFileSystem.TEMPORARY,
+            0,
+            function (fileSystem) {
+                logMessage('Temporary root is at ' + fileSystem.root.toNativeURL());
+                fileSystem.root.getFile(
+                    'testfile',
+                    {
+                        create: true
+                    },
+                    function (entry) {
+                        logMessage('Temporary file is at ' + entry.toNativeURL());
+                        if (entry.toNativeURL().substring(0, 12) === 'file:///var/') {
+                            logMessage('File starts with /var/, trying /private/var');
+                            var newURL = 'file://localhost/private/var/' + entry.toNativeURL().substring(12) + '?and=another_thing';
+                            // var newURL = entry.toNativeURL();
+                            logMessage(newURL, 'blue');
+                            resolveLocalFileSystemURL(
+                                newURL,
+                                function (newEntry) {
+                                    logMessage('Successfully resolved.', 'green');
+                                    logMessage(newEntry.toURL(), 'blue');
+                                    logMessage(newEntry.toNativeURL(), 'blue');
+                                },
+                                logError('resolveLocalFileSystemURL')
+                            );
+                        }
+                    },
+                    logError('getFile')
+                );
+            },
+            logError('requestFileSystem')
+        );
     }
 
     function resolveFsContactImage () {
-        navigator.contacts.pickContact(function (contact) {
-            var logBox = document.getElementById('logContactBox');
-            logBox.innerHTML = '';
-            var resolveResult = document.createElement('p');
-            if (contact.photos) {
-                var photoURL = contact.photos[0].value;
-                resolveLocalFileSystemURL(photoURL, function (entry) {
-                    /* eslint-enable no-undef */
-                    var contactImage = document.createElement('img');
-                    var contactLabelImage = document.createElement('p');
-                    contactLabelImage.innerHTML = 'Result contact image';
-                    contactImage.setAttribute('src', entry.toURL());
-                    resolveResult.innerHTML = 'Success resolve\n' + entry.toURL();
-                    logBox.appendChild(contactLabelImage);
-                    logBox.appendChild(contactImage);
+        navigator.contacts.pickContact(
+            function (contact) {
+                var logBox = document.getElementById('logContactBox');
+                logBox.innerHTML = '';
+                var resolveResult = document.createElement('p');
+                if (contact.photos) {
+                    var photoURL = contact.photos[0].value;
+                    resolveLocalFileSystemURL(
+                        photoURL,
+                        function (entry) {
+                            var contactImage = document.createElement('img');
+                            var contactLabelImage = document.createElement('p');
+                            contactLabelImage.innerHTML = 'Result contact image';
+                            contactImage.setAttribute('src', entry.toURL());
+                            resolveResult.innerHTML = 'Success resolve\n' + entry.toURL();
+                            logBox.appendChild(contactLabelImage);
+                            logBox.appendChild(contactImage);
+                            logBox.appendChild(resolveResult);
+                        },
+                        function (err) {
+                            console.log('resolve error' + err);
+                        }
+                    );
+                } else {
+                    resolveResult.innerHTML = 'Contact has no photos';
                     logBox.appendChild(resolveResult);
-                },
-                function (err) {
-                    console.log('resolve error' + err);
-                });
-            } else {
-                resolveResult.innerHTML = 'Contact has no photos';
-                logBox.appendChild(resolveResult);
+                }
+            },
+            function (err) {
+                console.log('contact pick error' + err);
             }
-        },
-        function (err) {
-            console.log('contact pick error' + err);
-        });
+        );
     }
 
     function clearLog () {
@@ -4085,11 +5987,11 @@
     }
 
     var fsRoots = {
-        'ios': 'library,library-nosync,documents,documents-nosync,cache,bundle,root,private',
-        'osx': 'library,library-nosync,documents,documents-nosync,cache,bundle,root,private',
-        'android': 'files,files-external,documents,sdcard,cache,cache-external,assets,root',
+        ios: 'library,library-nosync,documents,documents-nosync,cache,bundle,root,private',
+        osx: 'library,library-nosync,documents,documents-nosync,cache,bundle,root,private',
+        android: 'files,files-external,documents,sdcard,cache,cache-external,assets,root',
         'amazon-fireos': 'files,files-external,documents,sdcard,cache,cache-external,root',
-        'windows': 'temporary,persistent'
+        windows: 'temporary,persistent'
     };
 
     // Add title and align to content
@@ -4107,20 +6009,26 @@
     div.setAttribute('id', 'button');
     div.setAttribute('align', 'center');
     contentEl.appendChild(div);
-    /* eslint-disable no-undef */
-    if (fsRoots.hasOwnProperty(cordova.platformId)) {
-        (fsRoots[cordova.platformId].split(',')).forEach(function (fs) {
+    if (Object.prototype.hasOwnProperty.call(fsRoots, 'cordova.platformId')) {
+        fsRoots[cordova.platformId].split(',').forEach(function (fs) {
             if (cordova.platformId === 'ios' && fs === 'private') {
-                /* eslint-enable no-undef */
-                createActionButton('Test private URL (iOS)', function () {
-                    clearLog();
-                    testPrivateURL();
-                }, 'button');
+                createActionButton(
+                    'Test private URL (iOS)',
+                    function () {
+                        clearLog();
+                        testPrivateURL();
+                    },
+                    'button'
+                );
             } else {
-                createActionButton(fs, function () {
-                    clearLog();
-                    resolveFs(fs);
-                }, 'button');
+                createActionButton(
+                    fs,
+                    function () {
+                        clearLog();
+                        resolveFs(fs);
+                    },
+                    'button'
+                );
             }
         });
     }
@@ -4131,15 +6039,23 @@
     contentEl.appendChild(div);
 
     div = document.createElement('h3');
-    div.appendChild(document.createTextNode('For each test above, file or directory should be successfully found. ' +
-        'Status box should say Resolving URL was Success. The first URL resolved is the internal URL. ' +
-        'The second URL resolved is the absolute URL. Blue URLs must match.'));
+    div.appendChild(
+        document.createTextNode(
+            'For each test above, file or directory should be successfully found. ' +
+                'Status box should say Resolving URL was Success. The first URL resolved is the internal URL. ' +
+                'The second URL resolved is the absolute URL. Blue URLs must match.'
+        )
+    );
     contentEl.appendChild(div);
 
     div = document.createElement('h3');
-    div.appendChild(document.createTextNode('For Test private URL (iOS), the private URL (first blue URL in status box) ' +
-        'should be successfully resolved. Status box should say Successfully resolved. Both blue URLs below ' +
-        'that should match.'));
+    div.appendChild(
+        document.createTextNode(
+            'For Test private URL (iOS), the private URL (first blue URL in status box) ' +
+                'should be successfully resolved. Status box should say Successfully resolved. Both blue URLs below ' +
+                'that should match.'
+        )
+    );
     contentEl.appendChild(div);
 
     div = document.createElement('h2');
@@ -4157,7 +6073,11 @@
     div.setAttribute('align', 'center');
     contentEl.appendChild(div);
 
-    createActionButton('show-contact-image', function () {
-        resolveFsContactImage();
-    }, 'contactButton');
+    createActionButton(
+        'show-contact-image',
+        function () {
+            resolveFsContactImage();
+        },
+        'contactButton'
+    );
 };
diff --git a/www/DirectoryEntry.js b/www/DirectoryEntry.js
index d943f6d..80158f7 100644
--- a/www/DirectoryEntry.js
+++ b/www/DirectoryEntry.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 var argscheck = require('cordova/argscheck');
 var utils = require('cordova/utils');
@@ -36,9 +36,8 @@
  * {FileSystem} filesystem on which the directory resides (readonly)
  */
 var DirectoryEntry = function (name, fullPath, fileSystem, nativeURL) {
-
     // add trailing slash if it is missing
-    if ((fullPath) && !/\/$/.test(fullPath)) {
+    if (fullPath && !/\/$/.test(fullPath)) {
         fullPath += '/';
     }
     // add trailing slash if it is missing
@@ -68,13 +67,17 @@
 DirectoryEntry.prototype.getDirectory = function (path, options, successCallback, errorCallback) {
     argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
     var fs = this.filesystem;
-    var win = successCallback && function (result) {
-        var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var win =
+        successCallback &&
+        function (result) {
+            var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
+            successCallback(entry);
+        };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     exec(win, fail, 'File', 'getDirectory', [this.toInternalURL(), path, options]);
 };
 
@@ -86,9 +89,11 @@
  */
 DirectoryEntry.prototype.removeRecursively = function (successCallback, errorCallback) {
     argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     exec(successCallback, fail, 'File', 'removeRecursively', [this.toInternalURL()]);
 };
 
@@ -103,14 +108,18 @@
 DirectoryEntry.prototype.getFile = function (path, options, successCallback, errorCallback) {
     argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
     var fs = this.filesystem;
-    var win = successCallback && function (result) {
-        var FileEntry = require('./FileEntry');
-        var entry = new FileEntry(result.name, result.fullPath, fs, result.nativeURL);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var win =
+        successCallback &&
+        function (result) {
+            var FileEntry = require('./FileEntry');
+            var entry = new FileEntry(result.name, result.fullPath, fs, result.nativeURL);
+            successCallback(entry);
+        };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     exec(win, fail, 'File', 'getFile', [this.toInternalURL(), path, options]);
 };
 
diff --git a/www/DirectoryReader.js b/www/DirectoryReader.js
index 7366953..c290a69 100644
--- a/www/DirectoryReader.js
+++ b/www/DirectoryReader.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 var exec = require('cordova/exec');
 var FileError = require('./FileError');
@@ -43,29 +43,35 @@
         return;
     }
     var reader = this;
-    var win = typeof successCallback !== 'function' ? null : function (result) {
-        var retVal = [];
-        for (var i = 0; i < result.length; i++) {
-            var entry = null;
-            if (result[i].isDirectory) {
-                entry = new (require('./DirectoryEntry'))();
-            } else if (result[i].isFile) {
-                entry = new (require('./FileEntry'))();
-            }
-            entry.isDirectory = result[i].isDirectory;
-            entry.isFile = result[i].isFile;
-            entry.name = result[i].name;
-            entry.fullPath = result[i].fullPath;
-            entry.filesystem = new (require('./FileSystem'))(result[i].filesystemName);
-            entry.nativeURL = result[i].nativeURL;
-            retVal.push(entry);
-        }
-        reader.hasReadEntries = true;
-        successCallback(retVal);
-    };
-    var fail = typeof errorCallback !== 'function' ? null : function (code) {
-        errorCallback(new FileError(code));
-    };
+    var win =
+        typeof successCallback !== 'function'
+            ? null
+            : function (result) {
+                var retVal = [];
+                for (var i = 0; i < result.length; i++) {
+                    var entry = null;
+                    if (result[i].isDirectory) {
+                        entry = new (require('./DirectoryEntry'))();
+                    } else if (result[i].isFile) {
+                        entry = new (require('./FileEntry'))();
+                    }
+                    entry.isDirectory = result[i].isDirectory;
+                    entry.isFile = result[i].isFile;
+                    entry.name = result[i].name;
+                    entry.fullPath = result[i].fullPath;
+                    entry.filesystem = new (require('./FileSystem'))(result[i].filesystemName);
+                    entry.nativeURL = result[i].nativeURL;
+                    retVal.push(entry);
+                }
+                reader.hasReadEntries = true;
+                successCallback(retVal);
+            };
+    var fail =
+        typeof errorCallback !== 'function'
+            ? null
+            : function (code) {
+                errorCallback(new FileError(code));
+            };
     exec(win, fail, 'File', 'readEntries', [this.localURL]);
 };
 
diff --git a/www/Entry.js b/www/Entry.js
index 8f7a927..3df962d 100644
--- a/www/Entry.js
+++ b/www/Entry.js
@@ -17,7 +17,9 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
+
+/* global FileSystem */
 
 var argscheck = require('cordova/argscheck');
 var exec = require('cordova/exec');
@@ -64,16 +66,20 @@
  */
 Entry.prototype.getMetadata = function (successCallback, errorCallback) {
     argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
-    var success = successCallback && function (entryMetadata) {
-        var metadata = new Metadata({
-            size: entryMetadata.size,
-            modificationTime: entryMetadata.lastModifiedDate
-        });
-        successCallback(metadata);
-    };
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var success =
+        successCallback &&
+        function (entryMetadata) {
+            var metadata = new Metadata({
+                size: entryMetadata.size,
+                modificationTime: entryMetadata.lastModifiedDate
+            });
+            successCallback(metadata);
+        };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     exec(success, fail, 'File', 'getFileMetadata', [this.toInternalURL()]);
 };
 
@@ -106,9 +112,11 @@
  */
 Entry.prototype.moveTo = function (parent, newName, successCallback, errorCallback) {
     argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     var srcURL = this.toInternalURL();
     // entry name
     var name = newName || this.name;
@@ -117,8 +125,12 @@
             if (successCallback) {
                 // create appropriate Entry object
                 var newFSName = entry.filesystemName || (entry.filesystem && entry.filesystem.name);
-                var fs = newFSName ? new FileSystem(newFSName, { name: '', fullPath: '/' }) : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' }); // eslint-disable-line no-undef
-                var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL) : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL);
+                var fs = newFSName
+                    ? new FileSystem(newFSName, { name: '', fullPath: '/' })
+                    : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' });
+                var result = entry.isDirectory
+                    ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL)
+                    : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL);
                 successCallback(result);
             }
         } else {
@@ -147,11 +159,13 @@
  */
 Entry.prototype.copyTo = function (parent, newName, successCallback, errorCallback) {
     argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     var srcURL = this.toInternalURL();
-        // entry name
+    // entry name
     var name = newName || this.name;
     // success callback
     var success = function (entry) {
@@ -159,8 +173,12 @@
             if (successCallback) {
                 // create appropriate Entry object
                 var newFSName = entry.filesystemName || (entry.filesystem && entry.filesystem.name);
-                var fs = newFSName ? new FileSystem(newFSName, { name: '', fullPath: '/' }) : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' }); // eslint-disable-line no-undef
-                var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL) : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL);
+                var fs = newFSName
+                    ? new FileSystem(newFSName, { name: '', fullPath: '/' })
+                    : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' });
+                var result = entry.isDirectory
+                    ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL)
+                    : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL);
                 successCallback(result);
             }
         } else {
@@ -231,9 +249,11 @@
  */
 Entry.prototype.remove = function (successCallback, errorCallback) {
     argscheck.checkArgs('FF', 'Entry.remove', arguments);
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     exec(successCallback, fail, 'File', 'remove', [this.toInternalURL()]);
 };
 
@@ -246,14 +266,18 @@
 Entry.prototype.getParent = function (successCallback, errorCallback) {
     argscheck.checkArgs('FF', 'Entry.getParent', arguments);
     var fs = this.filesystem;
-    var win = successCallback && function (result) {
-        var DirectoryEntry = require('./DirectoryEntry');
-        var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var win =
+        successCallback &&
+        function (result) {
+            var DirectoryEntry = require('./DirectoryEntry');
+            var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
+            successCallback(entry);
+        };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     exec(win, fail, 'File', 'getParent', [this.toInternalURL()]);
 };
 
diff --git a/www/File.js b/www/File.js
index 30c6202..48819c6 100644
--- a/www/File.js
+++ b/www/File.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 /**
  * Constructor.
diff --git a/www/FileEntry.js b/www/FileEntry.js
index 8ed230c..bd69bf2 100644
--- a/www/FileEntry.js
+++ b/www/FileEntry.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 var utils = require('cordova/utils');
 var exec = require('cordova/exec');
@@ -79,13 +79,17 @@
  */
 FileEntry.prototype.file = function (successCallback, errorCallback) {
     var localURL = this.toInternalURL();
-    var win = successCallback && function (f) {
-        var file = new File(f.name, localURL, f.type, f.lastModifiedDate, f.size);
-        successCallback(file);
-    };
-    var fail = errorCallback && function (code) {
-        errorCallback(new FileError(code));
-    };
+    var win =
+        successCallback &&
+        function (f) {
+            var file = new File(f.name, localURL, f.type, f.lastModifiedDate, f.size);
+            successCallback(file);
+        };
+    var fail =
+        errorCallback &&
+        function (code) {
+            errorCallback(new FileError(code));
+        };
     exec(win, fail, 'File', 'getFileMetadata', [localURL]);
 };
 
diff --git a/www/FileError.js b/www/FileError.js
index 16bdf31..5837d47 100644
--- a/www/FileError.js
+++ b/www/FileError.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 /**
  * FileError
diff --git a/www/FileReader.js b/www/FileReader.js
index 9115f5f..586abe4 100644
--- a/www/FileReader.js
+++ b/www/FileReader.js
@@ -17,7 +17,9 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
+
+/* global cordova */
 
 var exec = require('cordova/exec');
 var modulemapper = require('cordova/modulemapper');
@@ -40,7 +42,8 @@
     this._result = null;
     this._progress = null;
     this._localURL = '';
-    this._realReader = origFileReader ? new origFileReader() : {}; // eslint-disable-line new-cap
+    // eslint-disable-next-line new-cap
+    this._realReader = origFileReader ? new origFileReader() : {};
 };
 
 /**
@@ -69,18 +72,23 @@
 });
 
 function defineEvent (eventName) {
-    utils.defineGetterSetter(FileReader.prototype, eventName, function () {
-        return this._realReader[eventName] || null;
-    }, function (value) {
-        this._realReader[eventName] = value;
-    });
+    utils.defineGetterSetter(
+        FileReader.prototype,
+        eventName,
+        function () {
+            return this._realReader[eventName] || null;
+        },
+        function (value) {
+            this._realReader[eventName] = value;
+        }
+    );
 }
-defineEvent('onloadstart');    // When the read starts.
-defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
-defineEvent('onload');         // When the read has successfully completed.
-defineEvent('onerror');        // When the read has failed (see errors).
-defineEvent('onloadend');      // When the request has completed (either in success or failure).
-defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
+defineEvent('onloadstart'); // When the read starts.
+defineEvent('onprogress'); // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
+defineEvent('onload'); // When the read has successfully completed.
+defineEvent('onerror'); // When the read has failed (see errors).
+defineEvent('onloadend'); // When the request has completed (either in success or failure).
+defineEvent('onabort'); // When the read has been aborted. For instance, by invoking the abort() method.
 
 function initRead (reader, file) {
     // Already loading something
@@ -101,7 +109,7 @@
     }
 
     if (reader.onloadstart) {
-        reader.onloadstart(new ProgressEvent('loadstart', {target: reader}));
+        reader.onloadstart(new ProgressEvent('loadstart', { target: reader }));
     }
 }
 
@@ -125,10 +133,14 @@
     if (readType === 'readAsDataURL') {
         // Windows proxy does not support reading file slices as Data URLs
         // so read the whole file at once.
-        CHUNK_SIZE = cordova.platformId === 'windows' ? totalSize : // eslint-disable-line no-undef
+        CHUNK_SIZE =
+            cordova.platformId === 'windows'
+                ? totalSize
+            // eslint-disable-next-line operator-linebreak
+                :
             // Calculate new chunk size for data URLs to be multiply of 3
             // Otherwise concatenated base64 chunks won't be valid base64 data
-            FileReader.READ_CHUNK_SIZE - (FileReader.READ_CHUNK_SIZE % 3) + 3;
+                FileReader.READ_CHUNK_SIZE - (FileReader.READ_CHUNK_SIZE % 3) + 3;
     }
 
     if (typeof r !== 'undefined') {
@@ -136,7 +148,7 @@
         this._progress = Math.min(this._progress + CHUNK_SIZE, totalSize);
 
         if (typeof this.onprogress === 'function') {
-            this.onprogress(new ProgressEvent('progress', {loaded: this._progress, total: totalSize}));
+            this.onprogress(new ProgressEvent('progress', { loaded: this._progress, total: totalSize }));
         }
     }
 
@@ -144,23 +156,27 @@
         var execArgs = [
             this._localURL,
             offset + this._progress,
-            offset + this._progress + Math.min(totalSize - this._progress, CHUNK_SIZE)];
+            offset + this._progress + Math.min(totalSize - this._progress, CHUNK_SIZE)
+        ];
         if (encoding) {
             execArgs.splice(1, 0, encoding);
         }
         exec(
             readSuccessCallback.bind(this, readType, encoding, offset, totalSize, accumulate),
             readFailureCallback.bind(this),
-            'File', readType, execArgs);
+            'File',
+            readType,
+            execArgs
+        );
     } else {
         this._readyState = FileReader.DONE;
 
         if (typeof this.onload === 'function') {
-            this.onload(new ProgressEvent('load', {target: this}));
+            this.onload(new ProgressEvent('load', { target: this }));
         }
 
         if (typeof this.onloadend === 'function') {
-            this.onloadend(new ProgressEvent('loadend', {target: this}));
+            this.onloadend(new ProgressEvent('loadend', { target: this }));
         }
     }
 }
@@ -179,11 +195,11 @@
     this._error = new FileError(e);
 
     if (typeof this.onerror === 'function') {
-        this.onerror(new ProgressEvent('error', {target: this}));
+        this.onerror(new ProgressEvent('error', { target: this }));
     }
 
     if (typeof this.onloadend === 'function') {
-        this.onloadend(new ProgressEvent('loadend', {target: this}));
+        this.onloadend(new ProgressEvent('loadend', { target: this }));
     }
 }
 
@@ -204,11 +220,11 @@
 
     // If abort callback
     if (typeof this.onabort === 'function') {
-        this.onabort(new ProgressEvent('abort', {target: this}));
+        this.onabort(new ProgressEvent('abort', { target: this }));
     }
     // If load end callback
     if (typeof this.onloadend === 'function') {
-        this.onloadend(new ProgressEvent('loadend', {target: this}));
+        this.onloadend(new ProgressEvent('loadend', { target: this }));
     }
 };
 
@@ -227,12 +243,18 @@
     var enc = encoding || 'UTF-8';
 
     var totalSize = file.end - file.start;
-    readSuccessCallback.bind(this)('readAsText', enc, file.start, totalSize, function (r) {
-        if (this._progress === 0) {
-            this._result = '';
-        }
-        this._result += r;
-    }.bind(this));
+    readSuccessCallback.bind(this)(
+        'readAsText',
+        enc,
+        file.start,
+        totalSize,
+        function (r) {
+            if (this._progress === 0) {
+                this._result = '';
+            }
+            this._result += r;
+        }.bind(this)
+    );
 };
 
 /**
@@ -248,14 +270,20 @@
     }
 
     var totalSize = file.end - file.start;
-    readSuccessCallback.bind(this)('readAsDataURL', null, file.start, totalSize, function (r) {
-        var commaIndex = r.indexOf(',');
-        if (this._progress === 0) {
-            this._result = r;
-        } else {
-            this._result += r.substring(commaIndex + 1);
-        }
-    }.bind(this));
+    readSuccessCallback.bind(this)(
+        'readAsDataURL',
+        null,
+        file.start,
+        totalSize,
+        function (r) {
+            var commaIndex = r.indexOf(',');
+            if (this._progress === 0) {
+                this._result = r;
+            } else {
+                this._result += r.substring(commaIndex + 1);
+            }
+        }.bind(this)
+    );
 };
 
 /**
@@ -269,12 +297,18 @@
     }
 
     var totalSize = file.end - file.start;
-    readSuccessCallback.bind(this)('readAsBinaryString', null, file.start, totalSize, function (r) {
-        if (this._progress === 0) {
-            this._result = '';
-        }
-        this._result += r;
-    }.bind(this));
+    readSuccessCallback.bind(this)(
+        'readAsBinaryString',
+        null,
+        file.start,
+        totalSize,
+        function (r) {
+            if (this._progress === 0) {
+                this._result = '';
+            }
+            this._result += r;
+        }.bind(this)
+    );
 };
 
 /**
@@ -288,11 +322,17 @@
     }
 
     var totalSize = file.end - file.start;
-    readSuccessCallback.bind(this)('readAsArrayBuffer', null, file.start, totalSize, function (r) {
-        var resultArray = (this._progress === 0 ? new Uint8Array(totalSize) : new Uint8Array(this._result));
-        resultArray.set(new Uint8Array(r), this._progress);
-        this._result = resultArray.buffer;
-    }.bind(this));
+    readSuccessCallback.bind(this)(
+        'readAsArrayBuffer',
+        null,
+        file.start,
+        totalSize,
+        function (r) {
+            var resultArray = this._progress === 0 ? new Uint8Array(totalSize) : new Uint8Array(this._result);
+            resultArray.set(new Uint8Array(r), this._progress);
+            this._result = resultArray.buffer;
+        }.bind(this)
+    );
 };
 
 module.exports = FileReader;
diff --git a/www/FileSystem.js b/www/FileSystem.js
index f90c458..5988ab4 100644
--- a/www/FileSystem.js
+++ b/www/FileSystem.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 var DirectoryEntry = require('./DirectoryEntry');
 
diff --git a/www/FileUploadOptions.js b/www/FileUploadOptions.js
index b4aa7c7..bae485d 100644
--- a/www/FileUploadOptions.js
+++ b/www/FileUploadOptions.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 /**
  * Options to customize the HTTP request used to upload files.
diff --git a/www/FileUploadResult.js b/www/FileUploadResult.js
index 6c7105c..cade9b4 100644
--- a/www/FileUploadResult.js
+++ b/www/FileUploadResult.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 /**
  * FileUploadResult
diff --git a/www/FileWriter.js b/www/FileWriter.js
index 75ec9dc..4f6ac8f 100644
--- a/www/FileWriter.js
+++ b/www/FileWriter.js
@@ -17,7 +17,9 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
+
+/* global cordova */
 
 var exec = require('cordova/exec');
 var FileError = require('./FileError');
@@ -53,12 +55,12 @@
     this.error = null;
 
     // Event handlers
-    this.onwritestart = null;   // When writing starts
-    this.onprogress = null;     // While writing the file, and reporting partial file data
-    this.onwrite = null;        // When the write has successfully completed.
-    this.onwriteend = null;     // When the request has completed (either in success or failure).
-    this.onabort = null;        // When the write has been aborted. For instance, by invoking the abort() method.
-    this.onerror = null;        // When the write has failed (see errors).
+    this.onwritestart = null; // When writing starts
+    this.onprogress = null; // While writing the file, and reporting partial file data
+    this.onwrite = null; // When the write has successfully completed.
+    this.onwriteend = null; // When the request has completed (either in success or failure).
+    this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
+    this.onerror = null; // When the write has failed (see errors).
 };
 
 // States
@@ -82,12 +84,12 @@
 
     // If abort callback
     if (typeof this.onabort === 'function') {
-        this.onabort(new ProgressEvent('abort', {'target': this}));
+        this.onabort(new ProgressEvent('abort', { target: this }));
     }
 
     // If write end callback
     if (typeof this.onwriteend === 'function') {
-        this.onwriteend(new ProgressEvent('writeend', {'target': this}));
+        this.onwriteend(new ProgressEvent('writeend', { target: this }));
     }
 };
 
@@ -98,17 +100,14 @@
  * @param isPendingBlobReadResult {Boolean} true if the data is the pending blob read operation result
  */
 FileWriter.prototype.write = function (data, isPendingBlobReadResult) {
-
     var that = this;
-    var supportsBinary = (typeof window.Blob !== 'undefined' && typeof window.ArrayBuffer !== 'undefined');
-    /* eslint-disable no-undef */
-    var isProxySupportBlobNatively = (cordova.platformId === 'windows8' || cordova.platformId === 'windows');
+    var supportsBinary = typeof window.Blob !== 'undefined' && typeof window.ArrayBuffer !== 'undefined';
+    var isProxySupportBlobNatively = cordova.platformId === 'windows8' || cordova.platformId === 'windows';
     var isBinary;
 
     // Check to see if the incoming data is a blob
     if (data instanceof File || (!isProxySupportBlobNatively && supportsBinary && data instanceof Blob)) {
         var fileReader = new FileReader();
-        /* eslint-enable no-undef */
         fileReader.onload = function () {
             // Call this method again, with the arraybuffer as argument
             FileWriter.prototype.write.call(that, this.result, true /* isPendingBlobReadResult */);
@@ -122,12 +121,12 @@
 
             // If onerror callback
             if (typeof that.onerror === 'function') {
-                that.onerror(new ProgressEvent('error', {'target': that}));
+                that.onerror(new ProgressEvent('error', { target: that }));
             }
 
             // If onwriteend callback
             if (typeof that.onwriteend === 'function') {
-                that.onwriteend(new ProgressEvent('writeend', {'target': that}));
+                that.onwriteend(new ProgressEvent('writeend', { target: that }));
             }
         };
 
@@ -143,8 +142,8 @@
     }
 
     // Mark data type for safer transport over the binary bridge
-    isBinary = supportsBinary && (data instanceof ArrayBuffer);
-    if (isBinary && cordova.platformId === 'windowsphone') { // eslint-disable-line no-undef
+    isBinary = supportsBinary && data instanceof ArrayBuffer;
+    if (isBinary && cordova.platformId === 'windowsphone') {
         // create a plain array, using the keys from the Uint8Array view so that we can serialize it
         data = Array.apply(null, new Uint8Array(data));
     }
@@ -161,7 +160,7 @@
 
     // If onwritestart callback
     if (typeof me.onwritestart === 'function') {
-        me.onwritestart(new ProgressEvent('writestart', {'target': me}));
+        me.onwritestart(new ProgressEvent('writestart', { target: me }));
     }
 
     // Write file
@@ -184,12 +183,12 @@
 
             // If onwrite callback
             if (typeof me.onwrite === 'function') {
-                me.onwrite(new ProgressEvent('write', {'target': me}));
+                me.onwrite(new ProgressEvent('write', { target: me }));
             }
 
             // If onwriteend callback
             if (typeof me.onwriteend === 'function') {
-                me.onwriteend(new ProgressEvent('writeend', {'target': me}));
+                me.onwriteend(new ProgressEvent('writeend', { target: me }));
             }
         },
         // Error callback
@@ -207,14 +206,18 @@
 
             // If onerror callback
             if (typeof me.onerror === 'function') {
-                me.onerror(new ProgressEvent('error', {'target': me}));
+                me.onerror(new ProgressEvent('error', { target: me }));
             }
 
             // If onwriteend callback
             if (typeof me.onwriteend === 'function') {
-                me.onwriteend(new ProgressEvent('writeend', {'target': me}));
+                me.onwriteend(new ProgressEvent('writeend', { target: me }));
             }
-        }, 'File', 'write', [this.localURL, data, this.position, isBinary]);
+        },
+        'File',
+        'write',
+        [this.localURL, data, this.position, isBinary]
+    );
 };
 
 /**
@@ -239,12 +242,12 @@
     // See back from end of file.
     if (offset < 0) {
         this.position = Math.max(offset + this.length, 0);
-    // Offset is bigger than file size so set position
-    // to the end of the file.
+        // Offset is bigger than file size so set position
+        // to the end of the file.
     } else if (offset > this.length) {
         this.position = this.length;
-    // Offset is between 0 and file size so set the position
-    // to start writing.
+        // Offset is between 0 and file size so set the position
+        // to start writing.
     } else {
         this.position = offset;
     }
@@ -268,7 +271,7 @@
 
     // If onwritestart callback
     if (typeof me.onwritestart === 'function') {
-        me.onwritestart(new ProgressEvent('writestart', {'target': this}));
+        me.onwritestart(new ProgressEvent('writestart', { target: this }));
     }
 
     // Write file
@@ -289,12 +292,12 @@
 
             // If onwrite callback
             if (typeof me.onwrite === 'function') {
-                me.onwrite(new ProgressEvent('write', {'target': me}));
+                me.onwrite(new ProgressEvent('write', { target: me }));
             }
 
             // If onwriteend callback
             if (typeof me.onwriteend === 'function') {
-                me.onwriteend(new ProgressEvent('writeend', {'target': me}));
+                me.onwriteend(new ProgressEvent('writeend', { target: me }));
             }
         },
         // Error callback
@@ -312,14 +315,18 @@
 
             // If onerror callback
             if (typeof me.onerror === 'function') {
-                me.onerror(new ProgressEvent('error', {'target': me}));
+                me.onerror(new ProgressEvent('error', { target: me }));
             }
 
             // If onwriteend callback
             if (typeof me.onwriteend === 'function') {
-                me.onwriteend(new ProgressEvent('writeend', {'target': me}));
+                me.onwriteend(new ProgressEvent('writeend', { target: me }));
             }
-        }, 'File', 'truncate', [this.localURL, size]);
+        },
+        'File',
+        'truncate',
+        [this.localURL, size]
+    );
 };
 
 module.exports = FileWriter;
diff --git a/www/Flags.js b/www/Flags.js
index 2f15c88..c860a96 100644
--- a/www/Flags.js
+++ b/www/Flags.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 /**
  * Supplies arguments to methods that lookup or create files and directories.
diff --git a/www/LocalFileSystem.js b/www/LocalFileSystem.js
index 1e8f2ee..c9c0c23 100644
--- a/www/LocalFileSystem.js
+++ b/www/LocalFileSystem.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 exports.TEMPORARY = 0;
 exports.PERSISTENT = 1;
diff --git a/www/Metadata.js b/www/Metadata.js
index 713d7cb..5ab2cd3 100644
--- a/www/Metadata.js
+++ b/www/Metadata.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 /**
  * Information about the state of the file or directory
diff --git a/www/ProgressEvent.js b/www/ProgressEvent.js
index 336a226..c2e1cd3 100644
--- a/www/ProgressEvent.js
+++ b/www/ProgressEvent.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 // If ProgressEvent exists in global context, use it already, otherwise use our own polyfill
 // Feature test: See if we can instantiate a native ProgressEvent;
diff --git a/www/android/FileSystem.js b/www/android/FileSystem.js
index 438da00..b713ff9 100644
--- a/www/android/FileSystem.js
+++ b/www/android/FileSystem.js
@@ -17,9 +17,11 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
-FILESYSTEM_PROTOCOL = 'cdvfile'; // eslint-disable-line no-undef
+/* global FileSystem */
+
+var FILESYSTEM_PROTOCOL = 'cdvfile';
 
 module.exports = {
     __format__: function (fullPath, nativeUrl) {
@@ -32,7 +34,7 @@
             // doesn't match the string for which permission was originally granted.
             path = nativeUrl.substring(contentUrlMatch[0].length - 1);
         } else {
-            path = FileSystem.encodeURIPath(fullPath); // eslint-disable-line no-undef
+            path = FileSystem.encodeURIPath(fullPath);
             if (!/^\//.test(path)) {
                 path = '/' + path;
             }
@@ -43,6 +45,6 @@
             }
         }
 
-        return FILESYSTEM_PROTOCOL + '://localhost/' + this.name + path; // eslint-disable-line no-undef
+        return FILESYSTEM_PROTOCOL + '://localhost/' + this.name + path;
     }
 };
diff --git a/www/browser/FileSystem.js b/www/browser/FileSystem.js
index a7c1d6c..388e623 100644
--- a/www/browser/FileSystem.js
+++ b/www/browser/FileSystem.js
@@ -17,14 +17,14 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
-/* global FILESYSTEM_PREFIX: true, module */
+/* global FileSystem */
 
-FILESYSTEM_PREFIX = 'file:///';
+var FILESYSTEM_PREFIX = 'file:///';
 
 module.exports = {
     __format__: function (fullPath) {
-        return (FILESYSTEM_PREFIX + this.name + (fullPath[0] === '/' ? '' : '/') + FileSystem.encodeURIPath(fullPath)); // eslint-disable-line no-undef
+        return FILESYSTEM_PREFIX + this.name + (fullPath[0] === '/' ? '' : '/') + FileSystem.encodeURIPath(fullPath);
     }
 };
diff --git a/www/browser/Preparing.js b/www/browser/Preparing.js
index b826a65..bec34ff 100644
--- a/www/browser/Preparing.js
+++ b/www/browser/Preparing.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 (function () {
     /* global require */
@@ -30,7 +30,7 @@
     var channel = require('cordova/channel');
     var FileError = require('./FileError');
     var PERSISTENT_FS_QUOTA = 5 * 1024 * 1024;
-    var filePluginIsReadyEvent = new Event('filePluginIsReady'); // eslint-disable-line no-undef
+    var filePluginIsReadyEvent = new Event('filePluginIsReady');
 
     var entryFunctionsCreated = false;
     var quotaWasRequested = false;
@@ -75,8 +75,8 @@
                    For example, filesystem:file:///persistent/somefile.txt,
                    filesystem:http://localhost:8080/persistent/somefile.txt. */
                 var prefix = 'filesystem:file:///';
-                if (location.protocol !== 'file:') { // eslint-disable-line no-undef
-                    prefix = 'filesystem:' + location.origin + '/'; // eslint-disable-line no-undef
+                if (location.protocol !== 'file:') {
+                    prefix = 'filesystem:' + location.origin + '/';
                 }
 
                 var result;
@@ -107,7 +107,7 @@
     };
 
     function createFileEntryFunctions (fs) {
-        fs.root.getFile('todelete_658674_833_4_cdv', {create: true}, function (fileEntry) {
+        fs.root.getFile('todelete_658674_833_4_cdv', { create: true }, function (fileEntry) {
             var fileEntryType = Object.getPrototypeOf(fileEntry);
             var entryType = Object.getPrototypeOf(fileEntryType);
 
@@ -146,15 +146,22 @@
                 var originalWrite = writer.write;
                 var writerProto = Object.getPrototypeOf(writer);
                 writerProto.write = function (blob) {
-                    if (blob instanceof Blob) { // eslint-disable-line no-undef
+                    if (blob instanceof Blob) {
                         originalWrite.apply(this, [blob]);
                     } else {
-                        var realBlob = new Blob([blob]); // eslint-disable-line no-undef
+                        var realBlob = new Blob([blob]);
                         originalWrite.apply(this, [realBlob]);
                     }
                 };
 
-                fileEntry.remove(function () { entryFunctionsCreated = true; }, function () { /* empty callback */ });
+                fileEntry.remove(
+                    function () {
+                        entryFunctionsCreated = true;
+                    },
+                    function () {
+                        /* empty callback */
+                    }
+                );
             });
         });
     }
@@ -168,14 +175,20 @@
         fail('This browser does not support this function');
     };
 
-    window.isFilePluginReadyRaised = function () { return eventWasThrown; };
+    window.isFilePluginReadyRaised = function () {
+        return eventWasThrown;
+    };
 
-    window.initPersistentFileSystem(PERSISTENT_FS_QUOTA, function () {
-        console.log('Persistent fs quota granted');
-        quotaWasRequested = true;
-    }, function (e) {
-        console.log('Error occured while trying to request Persistent fs quota: ' + JSON.stringify(e));
-    });
+    window.initPersistentFileSystem(
+        PERSISTENT_FS_QUOTA,
+        function () {
+            console.log('Persistent fs quota granted');
+            quotaWasRequested = true;
+        },
+        function (e) {
+            console.log('Error occured while trying to request Persistent fs quota: ' + JSON.stringify(e));
+        }
+    );
 
     channel.onCordovaReady.subscribe(function () {
         function dispatchEventIfReady () {
diff --git a/www/fileSystemPaths.js b/www/fileSystemPaths.js
index f79794b..b1cc56a 100644
--- a/www/fileSystemPaths.js
+++ b/www/fileSystemPaths.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 var exec = require('cordova/exec');
 var channel = require('cordova/channel');
diff --git a/www/fileSystems-roots.js b/www/fileSystems-roots.js
index b15adbd..3259990 100644
--- a/www/fileSystems-roots.js
+++ b/www/fileSystems-roots.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 // Map of fsName -> FileSystem.
 var fsMap = null;
diff --git a/www/fileSystems.js b/www/fileSystems.js
index 40e5574..0574ddb 100644
--- a/www/fileSystems.js
+++ b/www/fileSystems.js
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
 // Overridden by Android, BlackBerry 10 and iOS to populate fsMap.
 module.exports.getFs = function (name, callback) {
diff --git a/www/ios/FileSystem.js b/www/ios/FileSystem.js
index cb14c78..c7b0e1d 100644
--- a/www/ios/FileSystem.js
+++ b/www/ios/FileSystem.js
@@ -17,9 +17,11 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
-/* eslint no-undef : 0 */
-FILESYSTEM_PROTOCOL = 'cdvfile';
+ */
+
+/* global FileSystem */
+
+var FILESYSTEM_PROTOCOL = 'cdvfile';
 
 module.exports = {
     __format__: function (fullPath) {
diff --git a/www/osx/FileSystem.js b/www/osx/FileSystem.js
index cb14c78..c7b0e1d 100644
--- a/www/osx/FileSystem.js
+++ b/www/osx/FileSystem.js
@@ -17,9 +17,11 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
-/* eslint no-undef : 0 */
-FILESYSTEM_PROTOCOL = 'cdvfile';
+ */
+
+/* global FileSystem */
+
+var FILESYSTEM_PROTOCOL = 'cdvfile';
 
 module.exports = {
     __format__: function (fullPath) {
diff --git a/www/requestFileSystem.js b/www/requestFileSystem.js
index d9110cd..063bf95 100644
--- a/www/requestFileSystem.js
+++ b/www/requestFileSystem.js
@@ -17,12 +17,14 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
+
+/* global cordova */
 
 (function () {
     // For browser platform: not all browsers use this file.
     function checkBrowser () {
-        if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef
+        if (cordova.platformId === 'browser' && require('./isChrome')()) {
             module.exports = window.requestFileSystem || window.webkitRequestFileSystem;
             return true;
         }
diff --git a/www/resolveLocalFileSystemURI.js b/www/resolveLocalFileSystemURI.js
index 764662c..8ffbfea 100644
--- a/www/resolveLocalFileSystemURI.js
+++ b/www/resolveLocalFileSystemURI.js
@@ -17,11 +17,14 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
+
+/* global cordova, FileSystem */
+
 (function () {
     // For browser platform: not all browsers use overrided `resolveLocalFileSystemURL`.
     function checkBrowser () {
-        if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef
+        if (cordova.platformId === 'browser' && require('./isChrome')()) {
             module.exports.resolveLocalFileSystemURL = window.resolveLocalFileSystemURL || window.webkitResolveLocalFileSystemURL;
             return true;
         }
@@ -44,45 +47,52 @@
      * @param successCallback  invoked with Entry object corresponding to URI
      * @param errorCallback    invoked if error occurs retrieving file system entry
      */
-    module.exports.resolveLocalFileSystemURL = module.exports.resolveLocalFileSystemURL || function (uri, successCallback, errorCallback) {
-        argscheck.checkArgs('sFF', 'resolveLocalFileSystemURI', arguments);
-        // error callback
-        var fail = function (error) {
-            if (errorCallback) {
-                errorCallback(new FileError(error));
-            }
-        };
-        // sanity check for 'not:valid:filename' or '/not:valid:filename'
-        // file.spec.12 window.resolveLocalFileSystemURI should error (ENCODING_ERR) when resolving invalid URI with leading /.
-        if (!uri || uri.split(':').length > 2) {
-            setTimeout(function () {
-                fail(FileError.ENCODING_ERR);
-            }, 0);
-            return;
-        }
-        // if successful, return either a file or directory entry
-        var success = function (entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var fsName = entry.filesystemName || (entry.filesystem && entry.filesystem.name) || (entry.filesystem === window.PERSISTENT ? 'persistent' : 'temporary'); // eslint-disable-line no-undef
-                    fileSystems.getFs(fsName, function (fs) {
-                        // This should happen only on platforms that haven't implemented requestAllFileSystems (windows)
-                        if (!fs) {
-                            fs = new FileSystem(fsName, {name: '', fullPath: '/'}); // eslint-disable-line no-undef
-                        }
-                        var result = (entry.isDirectory) ? new DirectoryEntry(entry.name, entry.fullPath, fs, entry.nativeURL) : new FileEntry(entry.name, entry.fullPath, fs, entry.nativeURL);
-                        successCallback(result);
-                    });
+    module.exports.resolveLocalFileSystemURL =
+        module.exports.resolveLocalFileSystemURL ||
+        function (uri, successCallback, errorCallback) {
+            argscheck.checkArgs('sFF', 'resolveLocalFileSystemURI', arguments);
+            // error callback
+            var fail = function (error) {
+                if (errorCallback) {
+                    errorCallback(new FileError(error));
                 }
-            } else {
-                // no Entry object returned
-                fail(FileError.NOT_FOUND_ERR);
+            };
+            // sanity check for 'not:valid:filename' or '/not:valid:filename'
+            // file.spec.12 window.resolveLocalFileSystemURI should error (ENCODING_ERR) when resolving invalid URI with leading /.
+            if (!uri || uri.split(':').length > 2) {
+                setTimeout(function () {
+                    fail(FileError.ENCODING_ERR);
+                }, 0);
+                return;
             }
-        };
+            // if successful, return either a file or directory entry
+            var success = function (entry) {
+                if (entry) {
+                    if (successCallback) {
+                        // create appropriate Entry object
+                        var fsName =
+                            entry.filesystemName ||
+                            (entry.filesystem && entry.filesystem.name) ||
+                            (entry.filesystem === window.PERSISTENT ? 'persistent' : 'temporary');
+                        fileSystems.getFs(fsName, function (fs) {
+                            // This should happen only on platforms that haven't implemented requestAllFileSystems (windows)
+                            if (!fs) {
+                                fs = new FileSystem(fsName, { name: '', fullPath: '/' });
+                            }
+                            var result = entry.isDirectory
+                                ? new DirectoryEntry(entry.name, entry.fullPath, fs, entry.nativeURL)
+                                : new FileEntry(entry.name, entry.fullPath, fs, entry.nativeURL);
+                            successCallback(result);
+                        });
+                    }
+                } else {
+                    // no Entry object returned
+                    fail(FileError.NOT_FOUND_ERR);
+                }
+            };
 
-        exec(success, fail, 'File', 'resolveLocalFileSystemURI', [uri]);
-    };
+            exec(success, fail, 'File', 'resolveLocalFileSystemURI', [uri]);
+        };
 
     module.exports.resolveLocalFileSystemURI = function () {
         console.log('resolveLocalFileSystemURI is deprecated. Please call resolveLocalFileSystemURL instead.');