From 7055b1f19523182d9f5b03c78e43dd8bec26441b Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 4 Jul 2021 00:44:39 +0800 Subject: [PATCH] chore: fix eslint problem --- .eslintrc.js | 1 + package.json | 1 + shared/components/FastForm/field.tsx | 5 ++--- web/src/utils/jwt-helper.ts | 2 -- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 28fd4771..f918830f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,5 +27,6 @@ module.exports = { // e.g. "@typescript-eslint/explicit-function-return-type": "off", '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-empty-function': 'off', + 'react/prop-types': 'off', }, }; diff --git a/package.json b/package.json index 04815993..ec61906c 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "private": true, "scripts": { "prepare": "husky install", + "lint:fix": "eslint --fix './**/*.{ts,tsx}'", "test": "jest" }, "lint-staged": { diff --git a/shared/components/FastForm/field.tsx b/shared/components/FastForm/field.tsx index 994cd406..ec569ec0 100644 --- a/shared/components/FastForm/field.tsx +++ b/shared/components/FastForm/field.tsx @@ -19,9 +19,8 @@ export interface FastFormFieldProps extends FastFormFieldCommon { /** * 字段组件 */ -export type FastFormFieldComponent = React.ComponentType< - FastFormFieldProps & T ->; +export type FastFormFieldComponent> = + React.ComponentType; const fieldMap = new Map(); diff --git a/web/src/utils/jwt-helper.ts b/web/src/utils/jwt-helper.ts index 145a8ba7..7870b342 100644 --- a/web/src/utils/jwt-helper.ts +++ b/web/src/utils/jwt-helper.ts @@ -1,7 +1,5 @@ import _isObject from 'lodash/isObject'; -import _get from 'lodash/get'; import _isNull from 'lodash/isNull'; -import _isNil from 'lodash/isNil'; import jwtDecode from 'jwt-decode'; import { getStorage } from 'pawchat-shared';