Skip to content

Commit

Permalink
chore: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasRidhuan committed Apr 12, 2022
1 parent a1542b4 commit af95a23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion wallet/src/components/Input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
prefix?: string;
}

const Input: React.FC<InputProps> = ({ mask, prefix, ...props }) => {
const Input: React.FC<InputProps> = ({ mask, ...props }) => {
const handleKeyUp = useCallback(
(e: React.FormEvent<HTMLInputElement>) => {
if (mask === 'cep') {
Expand Down
6 changes: 3 additions & 3 deletions wallet/src/components/Input/masks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

export function cep(e: React.FormEvent<HTMLInputElement>) {
export function cep(e: React.FormEvent<HTMLInputElement>): React.FormEvent<HTMLInputElement> {
e.currentTarget.maxLength = 9;
let { value } = e.currentTarget;
value = value.replace(/\D/g, '');
Expand All @@ -9,7 +9,7 @@ export function cep(e: React.FormEvent<HTMLInputElement>) {
return e;
}

export function currency(e: React.FormEvent<HTMLInputElement>) {
export function currency(e: React.FormEvent<HTMLInputElement>): React.FormEvent<HTMLInputElement> {
let { value } = e.currentTarget;
value = value.replace(/\D/g, '');
value = value.replace(/(\d)(\d{2})$/, '$1,$2');
Expand All @@ -19,7 +19,7 @@ export function currency(e: React.FormEvent<HTMLInputElement>) {
return e;
}

export function cpf(e: React.FormEvent<HTMLInputElement>) {
export function cpf(e: React.FormEvent<HTMLInputElement>): React.FormEvent<HTMLInputElement> {
e.currentTarget.maxLength = 14;
let { value } = e.currentTarget;
if (!value.match(/^(\d{3}).(\d{3}).(\d{3})-(\d{2})$/)) {
Expand Down
5 changes: 3 additions & 2 deletions wallet/src/hooks/Account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const AccountContext = createContext<AccountContextType>({} as AccountContextTyp
* context use
* @param children
*/
const AccountProvider = ({ children }: any) => {
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
const AccountProvider = ({ children }: any): JSX.Element => {
const [accountInstance, setAccountInstance] = useState<AccountType>(accountType);

return (
Expand All @@ -38,7 +39,7 @@ const AccountProvider = ({ children }: any) => {
/**
* Hook to allow the context call
*/
const useAccount = () => {
const useAccount = (): AccountContextType => {
const context = useContext(AccountContext);

if (!context) {
Expand Down

0 comments on commit af95a23

Please sign in to comment.