Skip to content

Commit

Permalink
Merge pull request #131 from hyparam/add-eslint-rule
Browse files Browse the repository at this point in the history
mainly to avoid two or more lines at the end
  • Loading branch information
severo authored Dec 13, 2024
2 parents d5e48a2 + a354de0 commit ec67fd7
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion apps/hyparquet-demo/src/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default function Layout({ children, className, progress, error }: LayoutP
</>
}


export function Spinner({ className }: { className: string }) {
return <div className={cn('spinner', className)}></div>
}
2 changes: 0 additions & 2 deletions apps/hyparquet-demo/src/ParquetLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export default function ParquetLayout({ byteLength, metadata }: LayoutProps): Re
</div>
}


function Cell<N extends bigint | number>({ name, start, end }: { name: string, start: N, end: N }) {
const bytes = end - start
return <div className="cell">
Expand Down Expand Up @@ -122,7 +121,6 @@ function ColumnIndexes({ metadata }: { metadata: FileMetaData }) {
</Group>
}


/**
* Find the start byte offset for a column chunk.
*
Expand Down
1 change: 0 additions & 1 deletion apps/hyparquet-demo/src/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ReactNode, useRef } from 'react'
import audioSvg from './assets/audio.svg'
import hyparquetMp3 from './assets/hyparquet.mp3'


export default function Welcome(): ReactNode {
const audio = useRef<HTMLAudioElement>(null)

Expand Down
7 changes: 5 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const sharedJsRules = {
'no-constant-condition': 'off',
'no-extra-parens': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
'no-trailing-spaces': 'error',
'no-unused-vars': 'off',
'no-useless-concat': 'error',
Expand Down Expand Up @@ -46,9 +47,11 @@ export const sharedTsRules = {
'@typescript-eslint/no-unused-vars': 'warn',
}


/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: ['**/coverage/**'],
},
{
languageOptions: {
globals: {
Expand All @@ -60,6 +63,6 @@ export default [
...javascript.configs.recommended.rules,
...sharedJsRules,
},
files: ['*.js', 'test/**/*.js'],
files: ['eslint.config.js', 'test/**/*.js'],
},
]
1 change: 0 additions & 1 deletion packages/cli/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import replace from '@rollup/plugin-replace'
import terser from '@rollup/plugin-terser'
import postcss from 'rollup-plugin-postcss'


export default [
// app bundle
{
Expand Down
1 change: 0 additions & 1 deletion packages/components/demo/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ export default function App() {
},
}} />
}

1 change: 0 additions & 1 deletion packages/components/src/components/viewers/ParquetView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export default function ParquetView({ source, setProgress, setError, config }: V
}
}, [loading, resolveUrl, requestInit, setError, setProgress])


// Clear loading state on content change
useEffect(() => {
setLoading(LoadingState.NotLoaded)
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/lib/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ export function replaceSearchParams(params?: Record<string, string>, options?: {
export function appendSearchParams(params?: Record<string, string>): string {
return replaceSearchParams(params, { appendOnly: true })
}

2 changes: 0 additions & 2 deletions packages/components/src/lib/sources/hyperparamSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,3 @@ export function getHyperparamSource(sourceId: string, { endpoint, requestInit }:
}
}
}


0 comments on commit ec67fd7

Please sign in to comment.