Skip to content

Commit

Permalink
fix: linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Aug 4, 2023
1 parent fff2096 commit d4abcbf
Show file tree
Hide file tree
Showing 36 changed files with 1 addition and 69 deletions.
3 changes: 0 additions & 3 deletions packages/storylite/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { Bookmark, MinusSquare, PlusSquare } from 'lucide-react'

import React, { useState } from 'react'
import { Link, useParams } from 'react-router-dom'

import { ElementIds, StoryMeta, StoryModule, StoryModulesMapValue } from '@/types'

import storyMap from '../lib/storyMap'
import styles from './Sidebar.module.css'

Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/SidebarTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Library } from 'lucide-react'
import storiesConfig from 'storylite-user-config'

import React from 'react'
import { Link } from 'react-router-dom'

import styles from './SidebarTitle.module.css'

export default function SidebarTitle() {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/Story.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react'
import { useSearchParams } from 'react-router-dom'

import { ElementIds, StoryComponent, StoryMeta, StoryModule } from '@/types'

import storyMap from '../lib/storyMap'
import styles from './Story.module.css'
import Toolbar from './Toolbar'
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/StoryFrame.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react'

import { ElementIds } from '@/types'

import styles from './StoryFrame.module.css'

type StoryFrameProps = {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { useSearchParams } from 'react-router-dom'

import { StoryMeta } from '@/types'

import DarkModeAddon from './addons/DarkModeAddon'
import FullScreenAddon from './addons/FullScreenAddon'
import GridAddon from './addons/GridAddon'
Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/components/ToolbarBtn.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { HTMLAttributes } from 'react'

import styles from './ToolbarBtn.module.css'

type AddonToolbarBtnProps = {
Expand Down
4 changes: 0 additions & 4 deletions packages/storylite/src/components/addons/DarkModeAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { Moon } from 'lucide-react'

import { useEffect } from 'react'

import { useBrowserStorage } from '@storylite/support/dist/react'

import { ColorScheme } from '@/types'

import ToolbarBtn from '../ToolbarBtn'

function DarkModeAddon() {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/addons/FullScreenAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Maximize2, Minimize2 } from 'lucide-react'

import { useState } from 'react'

import ToolbarBtn from '../ToolbarBtn'

function FullScreenAddon() {
Expand Down
5 changes: 0 additions & 5 deletions packages/storylite/src/components/addons/GridAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import './GridAddon.css'

import { Grid } from 'lucide-react'

import React, { useEffect } from 'react'

import { useBrowserStorage } from '@storylite/support/dist/react'

import { ElementIds } from '@/types'

import ToolbarBtn from '../ToolbarBtn'

export default function GridAddon() {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/addons/MeasureAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Box } from 'lucide-react'

import React from 'react'

import ToolbarBtn from '../ToolbarBtn'

export default function MeasureAddon() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ExternalLink } from 'lucide-react'

import ToolbarBtn from '../ToolbarBtn'

export default function OpenStoryAddon({ story }: { story?: string }) {
Expand Down
5 changes: 0 additions & 5 deletions packages/storylite/src/components/addons/OutlineAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import './OutlineAddon.css'

import { BoxSelect as Icon } from 'lucide-react'

import React, { useEffect } from 'react'

import { useBrowserStorage } from '@storylite/support/dist/react'

import { ElementIds } from '@/types'

import ToolbarBtn from '../ToolbarBtn'

export default function OutlineAddon() {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/addons/PropsAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Box } from 'lucide-react'

import React from 'react'

import ToolbarBtn from '../ToolbarBtn'

export default function PropsAddon() {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/addons/RefreshAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Box } from 'lucide-react'

import React from 'react'

import ToolbarBtn from '../ToolbarBtn'

export default function RefreshAddon() {
Expand Down
4 changes: 0 additions & 4 deletions packages/storylite/src/components/addons/ResponsiveAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { Smartphone } from 'lucide-react'

import { useEffect } from 'react'

import { useBrowserStorage } from '@storylite/support/dist/react'

import { ElementIds } from '@/types'

import ToolbarBtn from '../ToolbarBtn'

function ResponsiveAddon() {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/addons/SidebarAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Sidebar } from 'lucide-react'

import { useState } from 'react'

import { ElementIds } from '../../types'
import ToolbarBtn from '../ToolbarBtn'

Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/addons/SourceCodeAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Code } from 'lucide-react'

import React from 'react'

import ToolbarBtn from '../ToolbarBtn'

export default function SourceCodeAddon() {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/components/addons/ZoomAddon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { ZoomIn } from 'lucide-react'

import React from 'react'

import ToolbarBtn from '../ToolbarBtn'

export default function ZoomAddon() {
Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/layouts/ErrorLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'

import globalStyles from '../styles/reset-main.css?inline'
import { ElementIds } from '../types'
import styles from './MainLayout.module.css'
Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/layouts/MainLayout.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@/testing'

import App from './MainLayout'

describe('MainLayout', () => {
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/layouts/MainLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import userStyles from 'storylite-user-styles-ui'

import React from 'react'

import Sidebar from '../components/Sidebar'
import SidebarTitle from '../components/SidebarTitle'
import globalStyles from '../styles/reset-main.css?inline'
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/layouts/SandboxLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import userStyles from 'storylite-user-styles-sandbox'

import React from 'react'
import { useSearchParams } from 'react-router-dom'

import globalStyles from '../styles/reset-sandbox.css?inline'
import { ElementIds } from '../types'
import styles from './SandboxLayout.module.css'
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/lib/vite-plugins/storylitePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { execSync } from 'node:child_process'
import { existsSync } from 'node:fs'
import path from 'node:path'

import { Plugin } from 'vite'

import { StoryLiteUserConfig } from '@/types'

const storyliteConfigFile: string = path.resolve(process.cwd(), 'storylite.config.ts')
Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react'
import ReactDOM from 'react-dom/client'

import './styles/variables.css'

import Router from './router'

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'

import ErrorLayout from '../layouts/ErrorLayout'
import styles from './404.module.css'

Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'

import StoryFrame from '@/components/StoryFrame'
import MainLayout from '@/layouts/MainLayout'

Expand Down
2 changes: 0 additions & 2 deletions packages/storylite/src/pages/sandbox/dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react'

import { Story } from '@/components/Story'

import SandboxLayout from '../../layouts/SandboxLayout'

export default function StoryPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react'
import { useParams } from 'react-router-dom'

import { Story } from '@/components/Story'

import SandboxLayout from '../../../../layouts/SandboxLayout'

export default function StoryPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import { useParams } from 'react-router-dom'

import StoryFrame from '@/components/StoryFrame'
import MainLayout from '@/layouts/MainLayout'

Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
LoaderFunction,
RouterProvider,
} from 'react-router-dom'

import MainLayout from './layouts/MainLayout'
import Error404, { Layout as ErrorLayout } from './pages/404'

Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/testing/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { cleanup, render, RenderOptions } from '@testing-library/react'
import { afterEach } from 'vitest'

import React, { ReactElement } from 'react'
import { BrowserRouter } from 'react-router-dom'

Expand Down
1 change: 0 additions & 1 deletion packages/storylite/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { UserConfig } from 'vite'

import React from 'react'

export enum ElementIds {
Expand Down
1 change: 0 additions & 1 deletion packages/support/src/arrays/arrayShuffle.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { afterAll, describe, expect, it } from 'vitest'

import { arrayShuffle } from './arrayShuffle'

Math.random = vi
Expand Down
1 change: 0 additions & 1 deletion packages/support/src/react/hooks/useBrowserStorage.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { act, renderHook } from '@testing-library/react'

import { useBrowserStorage } from './useBrowserStorage'

describe('useBrowserStorage', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/support/src/styling/classVariants.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { vi } from 'vitest'

import { classVariants } from './classVariants'

describe('classVariants', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/support/src/styling/classVariants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function classVariants<T extends VariantSchema>(
}

const variantsDefined = Object.fromEntries(
Object.entries(variants).filter(([k, v]) => v !== undefined)
Object.entries(variants).filter(([, v]) => v !== undefined)
)

const sortedVariantKeys = Object.keys(variantsDefined).sort()
Expand Down

0 comments on commit d4abcbf

Please sign in to comment.