From fd743ec2d57f8d2bb2064fd0bd54837db383bdc7 Mon Sep 17 00:00:00 2001 From: mlorb Date: Fri, 10 Nov 2017 09:30:55 +0100 Subject: [PATCH] fix error with event not defined and add flowtype to ESLint --- .eslintrc.json | 2 +- app/javascript/src/scenes/SettingsPage/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 53b770cfe..602de750e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "es6": true, "node": true }, - "plugins": ["react", "prettier"], + "plugins": ["flowtype", "react", "prettier"], "extends": ["airbnb", "prettier", "prettier/react"], "parser": "babel-eslint", "parserOptions": { diff --git a/app/javascript/src/scenes/SettingsPage/index.jsx b/app/javascript/src/scenes/SettingsPage/index.jsx index 92ebc9a18..e69823eed 100644 --- a/app/javascript/src/scenes/SettingsPage/index.jsx +++ b/app/javascript/src/scenes/SettingsPage/index.jsx @@ -61,7 +61,7 @@ export default class SettingsPage extends Component<*, State> { (this: any).setState({ teamsTableSizePerPage }); } - handleSelect(eventKey: string): void { + handleSelect(eventKey: string, event: SyntheticEvent<*>): void { event.preventDefault(); (this: any).setState({ active: eventKey }); }