Bug 1330791 - Enable the no-octal rule for eslint and fix the associated error. r=markh
authorJared Wein <jwein@mozilla.com>
Thu, 12 Jan 2017 18:21:43 -0500
changeset 464593 51db4bf68e5d84c123c680d5e74c15dd006b6718
parent 464592 d22ec67cd6d68dde447b8cdf915d9fe65c94462e
child 464594 f0d2fdb10650db1f64a6b1becbc5be11ec690b37
push id42370
push usermwein@mozilla.com
push dateSat, 21 Jan 2017 03:10:58 +0000
reviewersmarkh
bugs1330791
milestone53.0a1
Bug 1330791 - Enable the no-octal rule for eslint and fix the associated error. r=markh MozReview-Commit-ID: LLYKmP7HOei
services/.eslintrc.js
services/sync/tps/extensions/tps/resource/logger.jsm
--- 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(