From b2b819896fae67e6c8a87198bf710b33e79b1956 Mon Sep 17 00:00:00 2001
From: Arifulislam5577 <arifalamm33@gmail.com>
Date: Sun, 24 Dec 2023 14:39:58 +0600
Subject: [PATCH] Fixed: Fixed all the eslint warning.

---
 .storybook/main.ts    | 28 ++++++++++++++--------------
 .storybook/preview.ts | 10 +++++-----
 app/test/page.tsx     | 11 -----------
 routes/routes.ts      |  5 +++--
 tsconfig.json         | 34 ++++++++++++----------------------
 tsconfig.lib.json     |  2 +-
 utils/Searching.tsx   |  8 ++++----
 7 files changed, 39 insertions(+), 59 deletions(-)
 delete mode 100644 app/test/page.tsx

diff --git a/.storybook/main.ts b/.storybook/main.ts
index 8f43d6b9..c69881b3 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,31 +1,31 @@
-import type { StorybookConfig } from "@storybook/nextjs";
-import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";
+import type { StorybookConfig } from '@storybook/nextjs'
+import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
 
 const config: StorybookConfig = {
-  stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
+  stories: ['../app/src/**/*.stories.@(js|jsx|ts|tsx)'],
   addons: [
-    "@storybook/addon-links",
-    "@storybook/addon-essentials",
-    "@storybook/addon-interactions",
+    '@storybook/addon-links',
+    '@storybook/addon-essentials',
+    '@storybook/addon-interactions',
     {
-      name: "@storybook/addon-styling",
+      name: '@storybook/addon-styling',
       options: {
         postCss: true,
       },
     },
   ],
   framework: {
-    name: "@storybook/nextjs",
+    name: '@storybook/nextjs',
     options: {},
   },
   docs: {
-    autodocs: "tag",
+    autodocs: 'tag',
   },
   webpackFinal: (config) => {
-    config.resolve!.plugins = [new TsconfigPathsPlugin()];
-    return config;
+    config.resolve!.plugins = [new TsconfigPathsPlugin()]
+    return config
   },
-  staticDirs: ["../public"],
-};
+  staticDirs: ['../public'],
+}
 
-export default config;
+export default config
diff --git a/.storybook/preview.ts b/.storybook/preview.ts
index 84bea95c..4070c463 100644
--- a/.storybook/preview.ts
+++ b/.storybook/preview.ts
@@ -1,9 +1,9 @@
-import type { Preview } from "@storybook/react";
-import "./style.css";
+import type { Preview } from '@storybook/react'
+import './style.css'
 
 const preview: Preview = {
   parameters: {
-    actions: { argTypesRegex: "^on[A-Z].*" },
+    actions: { argTypesRegex: '^on[A-Z].*' },
     controls: {
       matchers: {
         color: /(background|color)$/i,
@@ -11,6 +11,6 @@ const preview: Preview = {
       },
     },
   },
-};
+}
 
-export default preview;
+export default preview
diff --git a/app/test/page.tsx b/app/test/page.tsx
deleted file mode 100644
index e6c307f0..00000000
--- a/app/test/page.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react'
-
-const page = () => {
-  return (
-    <div className="grid min-h-screen place-items-center bg-slate-900">
-      <h1 className="text-center text-3xl font-bold text-white">Hello World</h1>
-    </div>
-  )
-}
-
-export default page
diff --git a/routes/routes.ts b/routes/routes.ts
index e1e028d4..a7649c82 100644
--- a/routes/routes.ts
+++ b/routes/routes.ts
@@ -1,3 +1,4 @@
+import { ReactElement } from 'react'
 import {
   BarChartComponent,
   CheckboxGroupComponent,
@@ -8,7 +9,7 @@ import {
   TooltipComponent,
   PaginationComponent,
   TabsComponent,
-} from '~/components/ComponentsList'
+} from '../app/components/ComponentsList'
 
 interface routerPath {
   id: number
@@ -407,7 +408,7 @@ export const navbarRoutes: routerPath[] = [
 export const ComponentList: {
   id: number
   href: string
-  component: () => JSX.Element
+  component: () => ReactElement
 }[] = [
   {
     id: 1,
diff --git a/tsconfig.json b/tsconfig.json
index b97c1875..b3222239 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,33 +1,23 @@
 {
   "compilerOptions": {
-    "baseUrl": ".",
-    "esModuleInterop": true,
-    "forceConsistentCasingInFileNames": true,
+    "lib": ["dom", "dom.iterable", "esnext"],
+    "allowJs": true,
+    "skipLibCheck": true,
+    "strict": false,
+    "noEmit": true,
     "incremental": true,
+    "esModuleInterop": true,
+    "module": "esnext",
+    "moduleResolution": "node",
+    "resolveJsonModule": true,
     "isolatedModules": true,
     "jsx": "preserve",
-    "lib": ["DOM", "DOM.Iterable", "ESNext"],
-    "module": "ESNext",
-    "moduleResolution": "node",
-    "noEmit": false,
-    "noImplicitAny": true,
-    "noImplicitThis": true,
-    "noUnusedLocals": true,
-    "noUnusedParameters": true,
-    "paths": {
-      "~/*": ["./*"]
-    },
     "plugins": [
       {
         "name": "next"
       }
-    ],
-    "resolveJsonModule": true,
-    "skipLibCheck": true,
-    "strict": true,
-    "target": "ESNext",
-    "allowJs": true
+    ]
   },
-  "exclude": ["./build/", "./lib/", "./.next/"],
-  "include": [".next/types/**/*.ts", "**/*.mdx", "**/*.ts", "**/*.tsx", "prepare-lib"]
+  "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"],
+  "exclude": ["node_modules"]
 }
diff --git a/tsconfig.lib.json b/tsconfig.lib.json
index 0690a50a..89bd70ba 100644
--- a/tsconfig.lib.json
+++ b/tsconfig.lib.json
@@ -6,5 +6,5 @@
     "outDir": "./lib/cjs"
   },
   "exclude": ["**/*.stories.tsx"],
-  "include": ["./src/"]
+  "include": ["./app/src/"]
 }
diff --git a/utils/Searching.tsx b/utils/Searching.tsx
index 313c60c0..b2c74ded 100644
--- a/utils/Searching.tsx
+++ b/utils/Searching.tsx
@@ -1,10 +1,10 @@
 /**
  * This file contains utility functions for storing and retrieving search data in localStorage.
- * 
+ *
  * @remarks
  * The `storeData` function stores a `DataItem` object in localStorage, while the `getData` function
  * retrieves the stored data from localStorage. The stored data is an array of up to 4 `DataItem` objects.
- * 
+ *
  * @packageDocumentation
  */
 
@@ -19,10 +19,10 @@ interface DataItem {
  * @param item - The DataItem to store.
  */
 export const storeData = (item: DataItem) => {
-   // Get the stored data from localStorage
+  // Get the stored data from localStorage
   const storedDataStr = localStorage.getItem('searchData')
   // Initialize an empty array to hold the stored data
-  let storedData: DataItem[] = [] 
+  let storedData: DataItem[] = []
 
   /**
    * If there is stored data, parse it from a string to an array of DataItems