Commit 42b43c05 authored by tom's avatar tom

no-any rule

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