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 464216 938c7953c56190eb88022f2a3c0e9d2c6432d42e
parent 464215 3ee46feb2d7d35973db4517db035377577f9a198
child 464217 e72fa5741471b4f0d097e7d160572f28a843fdde
push id42305
push userjwein@mozilla.com
push dateFri, 20 Jan 2017 17:40:06 +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(