🔧 Disable standard/no-callback-literal where necessary

This commit is contained in:
Felix Rieseberg 2017-11-23 13:53:03 -08:00
parent f81bfb7b86
commit f7d6e3fa7b
6 changed files with 21 additions and 0 deletions

View file

@ -311,6 +311,8 @@ const chromeExtensionHandler = function (request, callback) {
const page = backgroundPages[parsed.hostname]
if (page && parsed.path === `/${page.name}`) {
// Disabled due to false positive in StandardJS
// eslint-disable-next-line standard/no-callback-literal
return callback({
mimeType: 'text/html',
data: page.html
@ -319,6 +321,8 @@ const chromeExtensionHandler = function (request, callback) {
fs.readFile(path.join(manifest.srcDirectory, parsed.path), function (err, content) {
if (err) {
// Disabled due to false positive in StandardJS
// eslint-disable-next-line standard/no-callback-literal
return callback(-6) // FILE_NOT_FOUND
} else {
return callback(content)