From ba3fe850e0755f8d0e0c57a152b33bffbff11f04 Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Tue, 26 May 2020 12:09:23 +0100 Subject: [PATCH] Implement review - lint member order - cleaner type coersion - specify access modifiers everywhere --- src/autocomplete/QueryMatcher.ts | 2 +- src/components/views/elements/Field.tsx | 29 ++++++++++------------- src/components/views/elements/Tooltip.tsx | 10 ++++---- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/autocomplete/QueryMatcher.ts b/src/autocomplete/QueryMatcher.ts index c5fe083d6b..2c1899d813 100644 --- a/src/autocomplete/QueryMatcher.ts +++ b/src/autocomplete/QueryMatcher.ts @@ -79,7 +79,7 @@ export default class QueryMatcher { // type for their values. We assume that those values who's keys have // been specified will be string. Also, we cannot infer all the // types of the keys of the objects at compile. - const keyValues: (string)[] = _at(object as any, this._keys) as any; + const keyValues = _at(object, this._keys); for (const f of this._funcs) { keyValues.push(f(object)); diff --git a/src/components/views/elements/Field.tsx b/src/components/views/elements/Field.tsx index 4a3725fadf..39ed2df9f9 100644 --- a/src/components/views/elements/Field.tsx +++ b/src/components/views/elements/Field.tsx @@ -34,7 +34,7 @@ interface IProps extends React.InputHTMLAttributes