[MediaWiki-commits] [Gerrit] marvin[master]: Fix: Prettier ESLint plugin parser

2017-09-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377694 )

Change subject: Fix: Prettier ESLint plugin parser
..


Fix: Prettier ESLint plugin parser

The Prettier ESLint plugin has been chomping down most TypeScript
without issue. However, certain keywords such as `namespace` and
certain typings have shown that it was misconfigured. Revert the parser
setting to the correct configuration in fc5d0dc and fix the offenders
that crept in.

Change-Id: Id0748005ff869d8d475c486565e690f8b3a2a050
---
M .eslintrc.json
M src/common/components/link.tsx
M src/common/components/with-context.ts
M src/common/pages/wiki.tsx
M src/common/routers/route.ts
M src/common/routers/router.ts
M src/server/assets/manifest.ts
M src/server/components/page.tsx
8 files changed, 31 insertions(+), 31 deletions(-)

Approvals:
  Jhernandez: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.eslintrc.json b/.eslintrc.json
index 55ca5e1..6d6b60b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -7,7 +7,7 @@
 "prettier"
   ],
   "rules": {
-"prettier/prettier": "warn",
+"prettier/prettier": ["warn", { "parser": "typescript" }],
 "max-len": [
   "warn",
   {
diff --git a/src/common/components/link.tsx b/src/common/components/link.tsx
index 0b0a43a..60dc612 100644
--- a/src/common/components/link.tsx
+++ b/src/common/components/link.tsx
@@ -2,7 +2,7 @@
 import { History } from "history";
 
 export interface Props extends ComponentProps {
-  href: string
+  href: string;
 }
 
 /**
diff --git a/src/common/components/with-context.ts 
b/src/common/components/with-context.ts
index c0316c9..53e594c 100644
--- a/src/common/components/with-context.ts
+++ b/src/common/components/with-context.ts
@@ -2,8 +2,8 @@
 import { History } from "history";
 
 export interface Props {
-  history: History,
-  children?: JSX.Element[]
+  history: History;
+  children?: JSX.Element[];
 }
 
 export class WithContext extends Component {
diff --git a/src/common/pages/wiki.tsx b/src/common/pages/wiki.tsx
index 2035cc6..995f443 100644
--- a/src/common/pages/wiki.tsx
+++ b/src/common/pages/wiki.tsx
@@ -3,11 +3,11 @@
 import { RouteParameters } from "../routers/route";
 
 export interface Parameters extends RouteParameters {
-  title: string
+  title: string;
 }
 
 export interface Props extends ComponentProps {
-  title: string
+  title: string;
 }
 
 export const initialProps = ({ title }: Parameters): Promise => {
diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts
index 8f5daf5..fd49c66 100644
--- a/src/common/routers/route.ts
+++ b/src/common/routers/route.ts
@@ -1,23 +1,23 @@
 import { AnyComponent } from "preact";
 
 export interface RouteParameters {
-  [name: string]: string
+  [name: string]: string;
 }
 
 export interface Endpoint {
   /** A Preact view component. */
-  Component: AnyComponent,
+  Component: AnyComponent;
 
   /**
* A function that returns a Promise for the dependencies needed to construct
* the view component such as a remote resource.
*/
-  initialProps?: (parameters: RouteParameters) => Promise
+  initialProps?: (parameters: RouteParameters) => Promise;
 }
 
 export interface Route {
-  path: string,
-  endpoint: () => Promise>,
-  chunkName: string,
-  status: number
+  path: string;
+  endpoint: () => Promise>;
+  chunkName: string;
+  status: number;
 }
diff --git a/src/common/routers/router.ts b/src/common/routers/router.ts
index 653e7c0..2f7c852 100644
--- a/src/common/routers/router.ts
+++ b/src/common/routers/router.ts
@@ -3,24 +3,24 @@
 import { AnyComponent } from "preact";
 
 export interface RouteResponse {
-  chunkName: string,
-  status: number,
-  Component: AnyComponent,
+  chunkName: string;
+  status: number;
+  Component: AnyComponent;
   props: {
-path: string,
-url: string,
-parameters: { [name: string]: string }
-  },
-  initialProps: any
+path: string;
+url: string;
+parameters: { [name: string]: string };
+  };
+  initialProps: any;
 }
 
 export interface Router {
-  route(url: string): Promise>
+  route(url: string): Promise>;
 }
 
 interface ParsedRoute extends Route {
-  parameterNames: pathToRegExp.Key[],
-  regularExpression: RegExp
+  parameterNames: pathToRegExp.Key[];
+  regularExpression: RegExp;
 }
 
 const parseRoutes = (routes: Route[]) =>
diff --git a/src/server/assets/manifest.ts b/src/server/assets/manifest.ts
index 63b1826..9ce6079 100644
--- a/src/server/assets/manifest.ts
+++ b/src/server/assets/manifest.ts
@@ -4,9 +4,9 @@
 export type Manifest = Assets | string;
 
 export interface AssetParameters {
-  manifest: Manifest,
-  entry: string,
-  extension: string
+  manifest: Manifest;
+  entry: string;
+  extension: string;
 }
 
 /**
diff --git a/src/server/components/page.tsx b/src/server/components/page.tsx
index 050a0b1..18099e9 100644
--- a/src/server/components/page.tsx
+++ b/src/server/components

[MediaWiki-commits] [Gerrit] marvin[master]: Fix: Prettier ESLint plugin parser

2017-09-12 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377694 )

Change subject: Fix: Prettier ESLint plugin parser
..

Fix: Prettier ESLint plugin parser

The Prettier ESLint plugin has been chomping down most TypeScript
without issue. However, certain keywords such as `namespace` and
certain typings have shown that it was misconfigured. Revert the parser
setting to the correct configuration in fc5d0dc and fix the offenders
that crept in.

Change-Id: Id0748005ff869d8d475c486565e690f8b3a2a050
---
M .eslintrc.json
M src/common/components/link.tsx
M src/common/components/with-context.ts
M src/common/pages/wiki.tsx
M src/common/routers/route.ts
M src/common/routers/router.ts
M src/server/assets/manifest.ts
M src/server/components/page.tsx
8 files changed, 31 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/94/377694/1

diff --git a/.eslintrc.json b/.eslintrc.json
index 55ca5e1..6d6b60b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -7,7 +7,7 @@
 "prettier"
   ],
   "rules": {
-"prettier/prettier": "warn",
+"prettier/prettier": ["warn", { "parser": "typescript" }],
 "max-len": [
   "warn",
   {
diff --git a/src/common/components/link.tsx b/src/common/components/link.tsx
index 0b0a43a..60dc612 100644
--- a/src/common/components/link.tsx
+++ b/src/common/components/link.tsx
@@ -2,7 +2,7 @@
 import { History } from "history";
 
 export interface Props extends ComponentProps {
-  href: string
+  href: string;
 }
 
 /**
diff --git a/src/common/components/with-context.ts 
b/src/common/components/with-context.ts
index c0316c9..53e594c 100644
--- a/src/common/components/with-context.ts
+++ b/src/common/components/with-context.ts
@@ -2,8 +2,8 @@
 import { History } from "history";
 
 export interface Props {
-  history: History,
-  children?: JSX.Element[]
+  history: History;
+  children?: JSX.Element[];
 }
 
 export class WithContext extends Component {
diff --git a/src/common/pages/wiki.tsx b/src/common/pages/wiki.tsx
index 2035cc6..995f443 100644
--- a/src/common/pages/wiki.tsx
+++ b/src/common/pages/wiki.tsx
@@ -3,11 +3,11 @@
 import { RouteParameters } from "../routers/route";
 
 export interface Parameters extends RouteParameters {
-  title: string
+  title: string;
 }
 
 export interface Props extends ComponentProps {
-  title: string
+  title: string;
 }
 
 export const initialProps = ({ title }: Parameters): Promise => {
diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts
index 8f5daf5..fd49c66 100644
--- a/src/common/routers/route.ts
+++ b/src/common/routers/route.ts
@@ -1,23 +1,23 @@
 import { AnyComponent } from "preact";
 
 export interface RouteParameters {
-  [name: string]: string
+  [name: string]: string;
 }
 
 export interface Endpoint {
   /** A Preact view component. */
-  Component: AnyComponent,
+  Component: AnyComponent;
 
   /**
* A function that returns a Promise for the dependencies needed to construct
* the view component such as a remote resource.
*/
-  initialProps?: (parameters: RouteParameters) => Promise
+  initialProps?: (parameters: RouteParameters) => Promise;
 }
 
 export interface Route {
-  path: string,
-  endpoint: () => Promise>,
-  chunkName: string,
-  status: number
+  path: string;
+  endpoint: () => Promise>;
+  chunkName: string;
+  status: number;
 }
diff --git a/src/common/routers/router.ts b/src/common/routers/router.ts
index 653e7c0..2f7c852 100644
--- a/src/common/routers/router.ts
+++ b/src/common/routers/router.ts
@@ -3,24 +3,24 @@
 import { AnyComponent } from "preact";
 
 export interface RouteResponse {
-  chunkName: string,
-  status: number,
-  Component: AnyComponent,
+  chunkName: string;
+  status: number;
+  Component: AnyComponent;
   props: {
-path: string,
-url: string,
-parameters: { [name: string]: string }
-  },
-  initialProps: any
+path: string;
+url: string;
+parameters: { [name: string]: string };
+  };
+  initialProps: any;
 }
 
 export interface Router {
-  route(url: string): Promise>
+  route(url: string): Promise>;
 }
 
 interface ParsedRoute extends Route {
-  parameterNames: pathToRegExp.Key[],
-  regularExpression: RegExp
+  parameterNames: pathToRegExp.Key[];
+  regularExpression: RegExp;
 }
 
 const parseRoutes = (routes: Route[]) =>
diff --git a/src/server/assets/manifest.ts b/src/server/assets/manifest.ts
index 63b1826..9ce6079 100644
--- a/src/server/assets/manifest.ts
+++ b/src/server/assets/manifest.ts
@@ -4,9 +4,9 @@
 export type Manifest = Assets | string;
 
 export interface AssetParameters {
-  manifest: Manifest,
-  entry: string,
-  extension: string
+  manifest: Manifest;
+  entry: string;
+  extension: string;
 }
 
 /**
diff --git a/src/server/components/page.tsx b/src/server/components/page.tsx
index 050a0b1..18099e9 100644
--- a/src/server/components/page.tsx
+++ b/src/server/components/page.tsx