From 3b41bbc2527114f28958d58258876db760565c0b Mon Sep 17 00:00:00 2001 From: VIPIN PAUL <37212471+vipinpaul@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:38:38 +0530 Subject: [PATCH] Lint fixed and removed unwanted packages (#349) --- .eslintrc.json | 1 + package.json | 2 -- .../JuxtaTextEditor/RecursiveBlock.jsx | 1 - .../EditorPage/Reference/OBS/ObsTn.js | 1 + .../EditorPage/TextEditor/RecursiveBlock.jsx | 1 - renderer/src/components/Error/Error.js | 2 +- .../src/components/Login/useAuthentication.js | 2 +- renderer/src/components/Signup/useApi.js | 2 +- yarn.lock | 18 ++---------------- 9 files changed, 7 insertions(+), 23 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 00816a9f4..d3bb637ec 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -72,6 +72,7 @@ "import/prefer-default-export": "off", "import/no-extraneous-dependencies": "off", "jsx-a11y/click-events-have-key-events": "off", + "jsx-a11y/control-has-associated-label": "off", "react/require-default-props": "off", "react/forbid-prop-types": "off", "linebreak-style": 0, diff --git a/package.json b/package.json index 64cae5dba..202323db0 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,6 @@ "@mui/icons-material": "^5.10.9", "@mui/lab": "^5.0.0-alpha.104", "@mui/material": "^5.10.12", - "@ory/kratos-client": "^0.10.1", "@radix-ui/react-dialog": "^1.0.3", "@radix-ui/react-dropdown-menu": "^2.0.4", "@supabase/supabase-js": "^2.26.0", @@ -232,7 +231,6 @@ "workbox-routing": "^7.0.0", "workbox-strategies": "^7.0.0", "workbox-streams": "^7.0.0", - "ws": "^8.8.0", "xregexp": "^5.1.1", "yarn": "^1.22.19" }, diff --git a/renderer/src/components/EditorPage/JuxtaTextEditor/RecursiveBlock.jsx b/renderer/src/components/EditorPage/JuxtaTextEditor/RecursiveBlock.jsx index a2797b594..ba5358503 100644 --- a/renderer/src/components/EditorPage/JuxtaTextEditor/RecursiveBlock.jsx +++ b/renderer/src/components/EditorPage/JuxtaTextEditor/RecursiveBlock.jsx @@ -4,7 +4,6 @@ import React, { useEffect, useState } from 'react'; import { HtmlPerfEditor } from '@xelah/type-perf-html'; import { getCurrentCursorPosition, pasteTextAtCursorPosition } from '@/util/cursorUtils'; import { getCurrentVerse, getCurrentChapter } from '@/components/EditorPage/JuxtaTextEditor/utils/getReferences'; -import { on } from 'ws'; const getTarget = ({ content }) => { const div = document.createElement('div'); diff --git a/renderer/src/components/EditorPage/Reference/OBS/ObsTn.js b/renderer/src/components/EditorPage/Reference/OBS/ObsTn.js index a6ddb928f..33a2a2a11 100644 --- a/renderer/src/components/EditorPage/Reference/OBS/ObsTn.js +++ b/renderer/src/components/EditorPage/Reference/OBS/ObsTn.js @@ -144,6 +144,7 @@ function ObsTnCard({ }, [chapter, languageId, owner, resourceId, offlineResource, scrollLock]); return ( + // eslint-disable-next-line no-nested-ternary markdown ? ( { const div = document.createElement('div'); diff --git a/renderer/src/components/Error/Error.js b/renderer/src/components/Error/Error.js index 94dcddf0f..86c85d022 100644 --- a/renderer/src/components/Error/Error.js +++ b/renderer/src/components/Error/Error.js @@ -1,5 +1,5 @@ /* eslint-disable */ -import { Configuration, PublicApi } from '@ory/kratos-client'; +// import { Configuration, PublicApi } from '@ory/kratos-client'; import React from 'react'; // import configData from '../../config.json'; diff --git a/renderer/src/components/Login/useAuthentication.js b/renderer/src/components/Login/useAuthentication.js index 3b8a13cdc..83e558c9a 100644 --- a/renderer/src/components/Login/useAuthentication.js +++ b/renderer/src/components/Login/useAuthentication.js @@ -1,7 +1,7 @@ /* eslint-disable */ import * as localForage from 'localforage'; import React from 'react'; -import { Configuration, PublicApi } from '@ory/kratos-client'; +// import { Configuration, PublicApi } from '@ory/kratos-client'; import * as logger from '../../logger'; // import configData from '../../config.json'; // import { isElectron } from '../../core/handleElectron'; diff --git a/renderer/src/components/Signup/useApi.js b/renderer/src/components/Signup/useApi.js index a1387b970..12afed297 100644 --- a/renderer/src/components/Signup/useApi.js +++ b/renderer/src/components/Signup/useApi.js @@ -1,5 +1,5 @@ /* eslint-disable */ -import { Configuration, PublicApi } from '@ory/kratos-client'; +// import { Configuration, PublicApi } from '@ory/kratos-client'; import React from 'react'; // import configData from '../../config.json'; diff --git a/yarn.lock b/yarn.lock index b6f9e31c2..c4b063742 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3513,13 +3513,6 @@ read-package-json-fast "^2.0.3" which "^2.0.2" -"@ory/kratos-client@^0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@ory/kratos-client/-/kratos-client-0.10.1.tgz#4957233e4ef6e1845e28765d32244ef89e69b93b" - integrity sha512-WfoEW1HKeKUkG+57oShb6D3xENM3DpRbUxvVxbPZkJUKzFlXpBzbX71k2oQ6ajv6cy0ULVEKFLNcHpAoGjraNA== - dependencies: - axios "^0.21.4" - "@parcel/watcher-android-arm64@2.4.1": version "2.4.1" resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84" @@ -5961,13 +5954,6 @@ axios@0.19.0: follow-redirects "1.5.10" is-buffer "^2.0.2" -axios@^0.21.4: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - axios@^0.27.2: version "0.27.2" resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" @@ -10204,7 +10190,7 @@ follow-redirects@1.5.10: dependencies: debug "=3.1.0" -follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.9, follow-redirects@^1.15.2: +follow-redirects@^1.0.0, follow-redirects@^1.14.9, follow-redirects@^1.15.2: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== @@ -22264,7 +22250,7 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -ws@^8.13.0, ws@^8.14.2, ws@^8.8.0: +ws@^8.13.0, ws@^8.14.2: version "8.16.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==