Skip to content

Commit

Permalink
Fixed: Fixed all the eslint warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arifulislam5577 committed Dec 24, 2023
1 parent cfa1250 commit b2b8198
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 59 deletions.
28 changes: 14 additions & 14 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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,
date: /Date$/,
},
},
},
};
}

export default preview;
export default preview
11 changes: 0 additions & 11 deletions app/test/page.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions routes/routes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ReactElement } from 'react'
import {
BarChartComponent,
CheckboxGroupComponent,
Expand All @@ -8,7 +9,7 @@ import {
TooltipComponent,
PaginationComponent,
TabsComponent,
} from '~/components/ComponentsList'
} from '../app/components/ComponentsList'

interface routerPath {
id: number
Expand Down Expand Up @@ -407,7 +408,7 @@ export const navbarRoutes: routerPath[] = [
export const ComponentList: {
id: number
href: string
component: () => JSX.Element
component: () => ReactElement
}[] = [
{
id: 1,
Expand Down
34 changes: 12 additions & 22 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
2 changes: 1 addition & 1 deletion tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"outDir": "./lib/cjs"
},
"exclude": ["**/*.stories.tsx"],
"include": ["./src/"]
"include": ["./app/src/"]
}
8 changes: 4 additions & 4 deletions utils/Searching.tsx
Original file line number Diff line number Diff line change
@@ -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
*/

Expand All @@ -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
Expand Down

0 comments on commit b2b8198

Please sign in to comment.