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<any> {
-  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<Props, void> {
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<any> {
-  title: string
+  title: string;
 }
 
 export const initialProps = ({ title }: Parameters): Promise<Props> => {
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<Props, State> {
   /** A Preact view component. */
-  Component: AnyComponent<Props, State>,
+  Component: AnyComponent<Props, State>;
 
   /**
    * A function that returns a Promise for the dependencies needed to construct
    * the view component such as a remote resource.
    */
-  initialProps?: (parameters: RouteParameters) => Promise<Props>
+  initialProps?: (parameters: RouteParameters) => Promise<Props>;
 }
 
 export interface Route<Props, State> {
-  path: string,
-  endpoint: () => Promise<Endpoint<Props, State>>,
-  chunkName: string,
-  status: number
+  path: string;
+  endpoint: () => Promise<Endpoint<Props, State>>;
+  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<Props, State> {
-  chunkName: string,
-  status: number,
-  Component: AnyComponent<Props, State>,
+  chunkName: string;
+  status: number;
+  Component: AnyComponent<Props, State>;
   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<RouteResponse<any, any>>
+  route(url: string): Promise<RouteResponse<any, any>>;
 }
 
 interface ParsedRoute extends Route<any, any> {
-  parameterNames: pathToRegExp.Key[],
-  regularExpression: RegExp
+  parameterNames: pathToRegExp.Key[];
+  regularExpression: RegExp;
 }
 
 const parseRoutes = (routes: Route<any, any>[]) =>
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
@@ -4,11 +4,11 @@
 
 export interface Props {
   // Title of the page
-  title: string,
-  manifest: Manifest,
-  chunkName: string,
+  title: string;
+  manifest: Manifest;
+  chunkName: string;
   // HTML to render in the body of the page
-  children?: Children
+  children?: Children;
 }
 
 export function Page({

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0748005ff869d8d475c486565e690f8b3a2a050
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: Sniedzielski <sniedziel...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to