Jhernandez has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/372429 )

Change subject: Chore: limit line length to 80 characters
......................................................................


Chore: limit line length to 80 characters

Add an ESLint rule with the default width, 80, to cap code and comment
line columns, and fix offenders. The exceptions allowed are for URLs,
manual TypeScript definition includes, and ESLint directives (like
`eslint-disable-line`). This rule can be disabled inline with the usual
`eslint-disable-line max-len` / `eslint-disable-next-line max-len` /
etc.

http://eslint.org/docs/rules/max-len

Change-Id: I47813391eba177eb2bb94edad5738612d9c72d42
---
M .eslintrc.json
M src/server/index.ts
M src/server/templates/page.ts
M webpack.config.js
4 files changed, 25 insertions(+), 11 deletions(-)

Approvals:
  Jhernandez: Verified; Looks good to me, approved



diff --git a/.eslintrc.json b/.eslintrc.json
index 18e37ea..7cb9105 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -7,7 +7,15 @@
     "prettier"
   ],
   "rules": {
-    "prettier/prettier": "error"
+    "prettier/prettier": "error",
+    "max-len": [
+      1,
+      {
+        "tabWidth": 2,
+        "ignoreUrls": true,
+        "ignorePattern": "^/// .+|// eslint-.+"
+      }
+    ]
   },
   "parser": "typescript-eslint-parser",
   "parserOptions": {
diff --git a/src/server/index.ts b/src/server/index.ts
index 6480b8d..99d7a04 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -7,7 +7,8 @@
 
 const isProd: boolean = process.env.NODE_ENV === "production";
 
-// The asset manifest built or the webpack-dev-server URL (which has no 
manifest).
+// The asset manifest built or the webpack-dev-server URL (which has no
+// manifest).
 const assets: AssetsManifest | string = isProd
   ? require("../../dist/public/assets-manifest.json")
   : "http://localhost:8080";;
@@ -31,10 +32,12 @@
   if (!isProd) {
     const touch = require("touch");
 
-    // The server is now listening and ready to receive requests. If 
developmental, touch the client
-    // sources to trigger a webpack-dev-server file watch event which triggers 
a browser reload. If
-    // the server was previously running, the browser will be updated with the 
latest results. The
-    // negative offset accounts for: 
https://github.com/webpack/watchpack/issues/25.
+    // The server is now listening and ready to receive requests. If
+    // developmental, touch the client sources to trigger a webpack-dev-server
+    // file watch event which triggers a browser reload. If the server was
+    // previously running, the browser will be updated with the latest results.
+    // The negative offset accounts for:
+    // https://github.com/webpack/watchpack/issues/25.
     const nowish: number = Date.now() - 10 * 1000;
     touch("src/client/index.ts", { time: nowish });
   }
diff --git a/src/server/templates/page.ts b/src/server/templates/page.ts
index 88d2de9..6eeb4d9 100644
--- a/src/server/templates/page.ts
+++ b/src/server/templates/page.ts
@@ -14,8 +14,9 @@
 }
 
 /**
- * @return {!string} The path to the asset identified by entry and extension 
(e.g., index.js);
- *                   either a URL (development) or a filesystem path 
(production).
+ * @return {!string} The path to the asset identified by entry and extension
+ *                   (e.g., index.js); either a URL (development) or a
+ *                   filesystem path (production).
  */
 const asset = (
   manifest: AssetsManifest | string,
diff --git a/webpack.config.js b/webpack.config.js
index fdaf178..374d863 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -65,8 +65,9 @@
 
   devtool: isProd ? "source-map" : "cheap-module-eval-source-map",
 
-  // For development builds, serve the packaged result over 
http://localhost:8080/ and live reload
-  // the browser when the bundle is rebuilt.
+  // For development builds, serve the packaged result over
+  // http://localhost:8080/ and live reload the browser when the bundle is
+  // rebuilt.
   devServer: isProd
     ? undefined
     : {
@@ -76,7 +77,8 @@
         // Log warnings and errors in the browser console.
         clientLogLevel: "warning",
 
-        // Show warnings and errors as an obtrusive opaque overlay in the 
browser.
+        // Show warnings and errors as an obtrusive opaque overlay in the
+        // browser.
         overlay: { warnings: true, errors: true },
 
         stats: WARNINGS_STATS_PRESET

-- 
To view, visit https://gerrit.wikimedia.org/r/372429
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I47813391eba177eb2bb94edad5738612d9c72d42
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: Sniedzielski <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to