Skip to content

Commit f7cf3e6

Browse files
committed
fix: eslint warnings
1 parent 40e0055 commit f7cf3e6

File tree

7 files changed

+56
-10
lines changed

7 files changed

+56
-10
lines changed

.eslintrc.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:react/recommended",
10+
"plugin:react-hooks/recommended",
11+
"plugin:@typescript-eslint/recommended"
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaFeatures": {
16+
"jsx": true
17+
},
18+
"ecmaVersion": "latest",
19+
"sourceType": "module"
20+
},
21+
"plugins": [
22+
"react",
23+
"react-hooks",
24+
"@typescript-eslint"
25+
],
26+
"rules": {
27+
"react-hooks/exhaustive-deps": "off",
28+
"@typescript-eslint/no-explicit-any": "off",
29+
"react/react-in-jsx-scope": "off",
30+
"react/prop-types": "off",
31+
"@typescript-eslint/no-unused-vars": "off",
32+
"@typescript-eslint/ban-ts-comment": "off",
33+
"@typescript-eslint/no-namespace": "off",
34+
"import/no-extraneous-dependencies": "off",
35+
"@typescript-eslint/ban-types": "off",
36+
"react/no-unescaped-entities": "off",
37+
"no-async-promise-executor": "off",
38+
"react/no-children-prop": "off",
39+
"no-extra-boolean-cast": "off",
40+
"react/display-name": "off",
41+
"prefer-const": "off",
42+
"no-console": "off",
43+
"no-debugger": "off"
44+
},
45+
"settings": {
46+
"react": {
47+
"version": "detect"
48+
}
49+
}
50+
}

src/components/animate/motion-lazy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { LazyMotion, m } from 'framer-motion';
22

33
// ----------------------------------------------------------------------
44

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

88
type Props = {

src/components/carousel/variants/carousel-main.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ import { varFade } from '@src/components/animate';
1515
import Carousel, { CarouselDots, useCarousel } from '@src/components/carousel/index';
1616
import { IconFlagFilled, IconPlayerPlay } from '@tabler/icons-react';
1717
import Stack from '@mui/material/Stack';
18-
1918
// @ts-ignore
20-
// eslint-disable-next-line import/no-extraneous-dependencies
2119
import { type Post } from '@lens-protocol/api-bindings/dist/declarations/src/lens/graphql/generated';
2220
import { paths } from '@src/routes/paths.ts';
2321
import { useRouter } from '@src/routes/hooks';

src/components/watchit-loader/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { FC, useEffect, useRef } from 'react';
22
import Box from '@mui/material/Box';
3-
// eslint-disable-next-line import/no-extraneous-dependencies
43
import Lottie, { LottieRefCurrentProps } from 'lottie-react';
54
import watchitLogo from '@src/assets/animations/watchit-spinner.json';
65

src/sections/governance/view/governance-details-view.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@ import { useRouter } from '@src/routes/hooks';
3232
import { ProposalsMockList, proposalVotes as initialProposalVotes } from '../governance-mock';
3333
import AvatarProfile from "@src/components/avatar/avatar.tsx";
3434
import {dicebear} from "@src/utils/dicebear.ts";
35+
import Avatar from '@src/components/avatar/avatar.tsx';
3536

3637
// ----------------------------------------------------------------------
3738

38-
type Props = {
39-
title: string;
40-
};
41-
42-
export default function GovernanceDetailsView({ title }: Props) {
39+
export default function GovernanceDetailsView() {
4340
const post = ProposalsMockList[0];
4441
const mdUp = useResponsive('up', 'md');
4542
const router = useRouter();

src/sections/publication/view/publication-play-view.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line import/no-extraneous-dependencies
21
import { LoadingScreen } from '../../../components/loading-screen';
32
import VideoPlayer from '../../../components/video-player';
43
import Box from '@mui/material/Box';

src/workers/backgroundTaskWorker.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export type CommentPayload = {
55
pendingCommentId: string;
66
};
77

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

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

1819
// Send a success message to main thread
20+
// eslint-disable-next-line no-restricted-globals
1921
self.postMessage({ success: true, pendingCommentId });
2022
} catch (error) {
2123
// Send a error message to main thread
24+
// eslint-disable-next-line no-restricted-globals
2225
self.postMessage({ success: false, error: (error as Error).message, pendingCommentId });
2326
}
2427
}

0 commit comments

Comments
 (0)