Bug 1248360 - Set eslint version to 1.10.3 when setting it up via mach draft
authorPatrick Brosset <pbrosset@mozilla.com>
Tue, 16 Feb 2016 10:01:11 +0100
changeset 331168 922b361ed5664fba8c654de4ce9cd5cc8468e602
parent 331167 51bd11ffc84d7950409cf3d2eb2ac3263c9f9412
child 514319 ecb6469b624a2a09a10d9b15a1653d6e6e5b8958
push id10918
push userpbrosset@mozilla.com
push dateTue, 16 Feb 2016 09:01:31 +0000
bugs1248360
milestone47.0a1
Bug 1248360 - Set eslint version to 1.10.3 when setting it up via mach MozReview-Commit-ID: LmKsvGzj3fo
python/mach_commands.py
--- a/python/mach_commands.py
+++ b/python/mach_commands.py
@@ -214,19 +214,21 @@ class MachCommands(MachCommandBase):
         eslint for optimal use on Mozilla projects.
         """
         sys.path.append(os.path.dirname(__file__))
 
         npmPath = self.getNodeOrNpmPath("npm")
         if not npmPath:
             return 1
 
-        # Install eslint.
+        # Install eslint 1.10.3.
+        # Note that that's the version currently compatible with the mozilla
+        # eslint plugin.
         success = self.callProcess("eslint",
-                                   [npmPath, "install", "eslint", "-g"])
+                                   [npmPath, "install", "eslint@1.10.3", "-g"])
         if not success:
             return 1
 
         # Install eslint-plugin-mozilla.
         success = self.callProcess("eslint-plugin-mozilla",
                                    [npmPath, "link"],
                                    "testing/eslint-plugin-mozilla")
         if not success: