-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(eslint): use cordova-eslint /w fix #405
Conversation
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to allocate memory if the variable is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable? Already did. I just wanted to highlight this change, because the diff is pretty big and lots for "formatting".
}; | ||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to allocate memory if the variable is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it.
@@ -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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless escape of %
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it.
@@ -56,11 +57,6 @@ | |||
var File = require('./File'); | |||
|
|||
(function (exports, global) { | |||
var indexedDB = global.indexedDB || global.mozIndexedDB; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this check for Firefox( OS?). Caniuse is pretty green in terms of IndexedDB: https://caniuse.com/#feat=indexeddb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If desired, I'll re-add the IndexedDB check and adjust the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not remove it in this PR.
|
||
FILESYSTEM_PROTOCOL = 'cdvfile'; // eslint-disable-line no-undef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding a var
keyword should have the same effect as omitting it. Using ES5 notation to retain compatibility. Same change applies to other files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, add var
and remove the eslint-disable-line no-undef
Appears to already be added and used |
Motivation and Context
Consistency across our codebase.
This is a bigger one. Changes of interest are noted as a review comment by myself.