Commit 42b43c05 authored by tom's avatar tom

no-any rule

parent a775d015
......@@ -104,6 +104,7 @@ module.exports = {
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-useless-constructor': [ 'error' ],
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/no-explicit-any': [ 'error', { ignoreRestArgs: true } ],
// отключены в пользу @typescript-eslint
'brace-style': 'off',
......
......@@ -17,8 +17,8 @@
"baseUrl": ".",
"paths": {
"~/*": ["./*"]
}
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "additional.d.ts", "decs.d.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules"],
}
......@@ -11,6 +11,8 @@ import AccountPageHeader from 'ui/shared/AccountPageHeader';
import PublicTagsData from 'ui/publicTags/PublicTagsData';
import PublicTagsForm from 'ui/publicTags/PublicTagsForm/PublicTagsForm';
import type { TPublicTagItem } from 'data/publicTags';
type TScreen = 'data' | 'form';
type TToastAction = 'added' | 'removed';
......@@ -22,7 +24,7 @@ const toastDescriptions = {
const PublicTags: React.FC = () => {
const [ screen, setScreen ] = useState<TScreen>('data');
const [ formData, setFormData ] = useState();
const [ formData, setFormData ] = useState<TPublicTagItem>();
const toast = useToast()
......@@ -39,7 +41,7 @@ const PublicTags: React.FC = () => {
});
}, [ toast ]);
const changeToFormScreen = useCallback((data: any) => {
const changeToFormScreen = useCallback((data?: TPublicTagItem) => {
setFormData(data);
setScreen('form');
animateScroll.scrollToTop({
......
......@@ -7,7 +7,7 @@ import PublicTagTable from './PublicTagTable/PublicTagTable';
import DeletePublicTagModal from './DeletePublicTagModal'
type Props = {
changeToFormScreen: (data?: any) => void;
changeToFormScreen: (data?: TPublicTagItem) => void;
onTagDelete: () => void;
}
......
import React from 'react';
import type { ControllerRenderProps } from 'react-hook-form';
import type { ControllerRenderProps, FieldValues } from 'react-hook-form';
import {
Input,
......@@ -11,7 +11,7 @@ import {
const TAG_MAX_LENGTH = 35;
type Props = {
field: ControllerRenderProps<any, 'tag'>;
field: ControllerRenderProps<FieldValues, 'tag'>;
isInvalid: boolean;
}
......
import React from 'react'
import type { ControllerRenderProps } from 'react-hook-form';
import type { ControllerRenderProps, FieldValues } from 'react-hook-form';
import {
Input,
......@@ -10,7 +10,7 @@ import {
const HASH_LENGTH = 66;
type Props = {
field: ControllerRenderProps<any, 'transaction'>;
field: ControllerRenderProps<FieldValues, 'transaction'>;
isInvalid: boolean;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment