Bug 1330791 - Enable the no-octal rule for eslint and fix the associated error. r?markh
MozReview-Commit-ID: LLYKmP7HOei
--- a/services/.eslintrc.js
+++ b/services/.eslintrc.js
@@ -10,11 +10,10 @@ module.exports = {
respective line in this file should be removed. */
"brace-style": "warn",
"consistent-return": "warn",
"no-cond-assign": "warn",
"no-ex-assign": "warn",
"no-func-assign": "warn",
"no-native-reassign": "warn",
"no-nested-ternary": "warn",
- "no-octal": "warn",
}
};
--- a/services/sync/tps/extensions/tps/resource/logger.jsm
+++ b/services/sync/tps/extensions/tps/resource/logger.jsm
@@ -36,17 +36,17 @@ var Logger = {
var exists = this._file.exists();
// Make a file output stream and converter to handle it.
this._foStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
// If the file already exists, append it, otherwise create it.
var fileflags = exists ? 0x02 | 0x08 | 0x10 : 0x02 | 0x08 | 0x20;
- this._foStream.init(this._file, fileflags, 0666, 0);
+ this._foStream.init(this._file, fileflags, 0o666, 0);
this._converter = Cc["@mozilla.org/intl/converter-output-stream;1"]
.createInstance(Ci.nsIConverterOutputStream);
this._converter.init(this._foStream, "UTF-8", 0, 0);
},
write(data) {
if (this._converter == null) {
Cu.reportError(