Bug 1330791 - Enable the no-octal rule for eslint and fix the associated error. r?markh draft
authorJared Wein <jwein@mozilla.com>
Thu, 12 Jan 2017 18:21:43 -0500
changeset 462295 a181ec35dd7aea1ecc160d7c35220d7412598727
parent 462294 214cb0cd488a4b4e40fd3b3564cc4d52fb59b3c5
child 462296 888120e04a6beadb8765c75799f7fffa7466cbe6
push id41685
push userbmo:jaws@mozilla.com
push dateMon, 16 Jan 2017 21:58:09 +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(