1nwf / Produx-v2

Detected usage of the any type JS-0323
Anti-pattern
Critical
21 occurrences in this check
Unexpected any. Specify a different type
 25}
 26
 27interface CreatePostArgs {
 28    post: any 29    productName: string
 30    channel: string
 31}
Unexpected any. Specify a different type
 87                body: userInfo,
 88            }),
 89        }),
 90        createUser: builder.mutation<void, any>({ 91            query: (user) => ({
 92                url: 'users/create',
 93                method: 'POST',
Unexpected any. Specify a different type
259            query: ({ productId, lastId }) =>
260                `products/messages/${productId}/${lastId || 0}`,
261        }),
262        updateUser: builder.mutation<void, any>({263            query: (data: any) => ({
264                url: `users/update`,
265                method: 'PATCH',
Unexpected any. Specify a different type
260                `products/messages/${productId}/${lastId || 0}`,
261        }),
262        updateUser: builder.mutation<void, any>({
263            query: (data: any) => ({264                url: `users/update`,
265                method: 'PATCH',
266                body: data,
Unexpected any. Specify a different type
16
17  const submitHandler = async (e: any) => {
18    await signIn(userInfo)
19      .then((res: any) => {20        localStorage.setItem("token", res.data.token);
21        dispatch(changeAuthStatus(true));
22        window.location.reload();
Unexpected any. Specify a different type
14    password: "",
15  });
16
17  const submitHandler = async (e: any) => {18    await signIn(userInfo)
19      .then((res: any) => {
20        localStorage.setItem("token", res.data.token);
 70  const [msg, setMsg] = useState<string>("");
 71  const [sysMsg, setSysMsg] = useState<any>(null);
 72  const msgListDiv = useRef<HTMLDivElement>(null);
 73  const sendMsg = (e: any) => { 74    e.preventDefault();
 75    if (msg.trim() !== "") {
 76      sendMessage(msg);
 68    }
 69  }, [data]);
 70  const [msg, setMsg] = useState<string>("");
 71  const [sysMsg, setSysMsg] = useState<any>(null); 72  const msgListDiv = useRef<HTMLDivElement>(null);
 73  const sendMsg = (e: any) => {
 74    e.preventDefault();
 53    },
 54    retryOnError: true,
 55  });
 56  const [msgs, setMsgs] = useState<any>([]); 57  useEffect(() => {
 58    getMessages({
 59      productId,
14        useCreateCommentMutation()
15    const [shoErr, setShowErr] = useState(false)
16    const router = useRouter()
17    const submitHandler = async (e: any) => {18        e.preventDefault()
19        if (!comment) {
20            setShowErr(true)
 10export interface fieldValues {
 11    name: 'working-on' | 'done' | 'under-review'
 12    color: string
 13    icon: any 14}
 15type fields = Record<string, fieldValues>
 16export default function AddPostToBoard({
Unexpected any. Specify a different type
 11  owner,
 12}: {
 13  show: boolean;
 14  setShow: any; 15  productName: string;
 16  owner: boolean;
 17}) {
Unexpected any. Specify a different type
11}: {
12    name: string
13    bgcolor: string
14    posts: any15    ref: any
16    icon: any
17    setPosts: any
Unexpected any. Specify a different type
12    name: string
13    bgcolor: string
14    posts: any
15    ref: any16    icon: any
17    setPosts: any
18    dropInfo: any
Unexpected any. Specify a different type
13    bgcolor: string
14    posts: any
15    ref: any
16    icon: any17    setPosts: any
18    dropInfo: any
19    productId: number
Unexpected any. Specify a different type
14    posts: any
15    ref: any
16    icon: any
17    setPosts: any18    dropInfo: any
19    productId: number
20}) {
Unexpected any. Specify a different type
15    ref: any
16    icon: any
17    setPosts: any
18    dropInfo: any19    productId: number
20}) {
21    return (
Unexpected any. Specify a different type
 19  const [trigger, result, lastPromiseInfo] = useLazyGetUserInfoQuery();
 20  const [updateUser, updateUserReqInfo] = useUpdateUserMutation();
 21  const [pfp, setPfp] = useState<File>();
 22  const updateHandler = async (e: any) => { 23    e.preventDefault();
 24    if (userInfo) {
 25      const formData = new FormData();
Unexpected any. Specify a different type
217  productName: string;
218  productID: number;
219  isShown: boolean;
220  setIsShown: any;221}) => {
222  const closeHandler = () => {
223    setIsShown(false);
Unexpected any. Specify a different type
21        </Provider>
22    )
23}
24const EmptyLayout = ({ children }: { children: any }) => <>{children}</>25const DefaultLayout = ({ children }: { children: any }) => {
26    const { data, isLoading, error } = useGetUserInfoQuery()
27    return (
Unexpected any. Specify a different type
22    )
23}
24const EmptyLayout = ({ children }: { children: any }) => <>{children}</>
25const DefaultLayout = ({ children }: { children: any }) => {26    const { data, isLoading, error } = useGetUserInfoQuery()
27    return (
28        <>