Skip to content

Commit

Permalink
fix: eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadapema committed Jan 20, 2025
1 parent 40e0055 commit f7cf3e6
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 10 deletions.
50 changes: 50 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint"
],
"rules": {
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-explicit-any": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-namespace": "off",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/ban-types": "off",
"react/no-unescaped-entities": "off",
"no-async-promise-executor": "off",
"react/no-children-prop": "off",
"no-extra-boolean-cast": "off",
"react/display-name": "off",
"prefer-const": "off",
"no-console": "off",
"no-debugger": "off"
},
"settings": {
"react": {
"version": "detect"
}
}
}
2 changes: 1 addition & 1 deletion src/components/animate/motion-lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LazyMotion, m } from 'framer-motion';

// ----------------------------------------------------------------------

// eslint-disable-next-line import/extensions
// @ts-ignore
const loadFeatures = () => import('./features.js').then((res) => res.default);

type Props = {
Expand Down
2 changes: 0 additions & 2 deletions src/components/carousel/variants/carousel-main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import { varFade } from '@src/components/animate';
import Carousel, { CarouselDots, useCarousel } from '@src/components/carousel/index';
import { IconFlagFilled, IconPlayerPlay } from '@tabler/icons-react';
import Stack from '@mui/material/Stack';

// @ts-ignore
// eslint-disable-next-line import/no-extraneous-dependencies
import { type Post } from '@lens-protocol/api-bindings/dist/declarations/src/lens/graphql/generated';
import { paths } from '@src/routes/paths.ts';
import { useRouter } from '@src/routes/hooks';
Expand Down
1 change: 0 additions & 1 deletion src/components/watchit-loader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FC, useEffect, useRef } from 'react';
import Box from '@mui/material/Box';
// eslint-disable-next-line import/no-extraneous-dependencies
import Lottie, { LottieRefCurrentProps } from 'lottie-react';
import watchitLogo from '@src/assets/animations/watchit-spinner.json';

Expand Down
7 changes: 2 additions & 5 deletions src/sections/governance/view/governance-details-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ import { useRouter } from '@src/routes/hooks';
import { ProposalsMockList, proposalVotes as initialProposalVotes } from '../governance-mock';
import AvatarProfile from "@src/components/avatar/avatar.tsx";
import {dicebear} from "@src/utils/dicebear.ts";
import Avatar from '@src/components/avatar/avatar.tsx';

// ----------------------------------------------------------------------

type Props = {
title: string;
};

export default function GovernanceDetailsView({ title }: Props) {
export default function GovernanceDetailsView() {
const post = ProposalsMockList[0];
const mdUp = useResponsive('up', 'md');
const router = useRouter();
Expand Down
1 change: 0 additions & 1 deletion src/sections/publication/view/publication-play-view.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { LoadingScreen } from '../../../components/loading-screen';
import VideoPlayer from '../../../components/video-player';
import Box from '@mui/material/Box';
Expand Down
3 changes: 3 additions & 0 deletions src/workers/backgroundTaskWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type CommentPayload = {
pendingCommentId: string;
};

// eslint-disable-next-line no-restricted-globals
self.onmessage = async (event: MessageEvent<{ type: string; payload: CommentPayload }>) => {
const { type, payload } = event.data;

Expand All @@ -16,9 +17,11 @@ self.onmessage = async (event: MessageEvent<{ type: string; payload: CommentPayl
await verifyIpfsData(uri);

// Send a success message to main thread
// eslint-disable-next-line no-restricted-globals
self.postMessage({ success: true, pendingCommentId });
} catch (error) {
// Send a error message to main thread
// eslint-disable-next-line no-restricted-globals
self.postMessage({ success: false, error: (error as Error).message, pendingCommentId });
}
}
Expand Down

0 comments on commit f7cf3e6

Please sign in to comment.