Skip to content

Commit

Permalink
more lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed Mar 21, 2024
1 parent 03fb46e commit 556b25f
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 60 deletions.
2 changes: 1 addition & 1 deletion packages/admin/eslint.config.cjs
Expand Up @@ -2,7 +2,7 @@ module.exports = [
...require('eslint-plugin-mmkal').recommendedFlatConfigs,
{
rules: {
'no-coonsole': 'off',
'no-console': 'off',
},
},
]
3 changes: 1 addition & 2 deletions packages/admin/readme.md
Expand Up @@ -13,7 +13,6 @@ A no-config admin UI for running queries against PostgreSQL database, with autoc
- [What about pgAdmin](#what-about-pgadmin)
- [Get started](#get-started)
- [Use as a library](#use-as-a-library)
- [Deployment](#deployment)
- [Auth](#auth)
- [👽 Future](#-future)
<!-- codegen:end -->
Expand All @@ -28,7 +27,7 @@ A no-config admin UI for running queries against PostgreSQL database, with autoc
- autocomplete fully-qualified names for tables not on the current session's `search_path`
- suggest table-qualified columns for join statements (e.g. `select i| from profile p join settings s on s.profile_id = p.id` will suggest `s.id` and `p.id` rather than just `id`)
- results which can be copy-pasted directly into Excel or Google Sheets (using [reactgrid](https://reactgrid.com))
- [schemainspect](https://npmjs.com/package/@pgkit/schemainstpect) explorer of the full schema
- [schemainspect](https://npmjs.com/package/@pgkit/schemainspect) explorer of the full schema
- Simple but informative error reporting
- Multi-statement handling - each query gets a collapsible result table
- Queries stored in `localStorage` so your work is saved between sessions
Expand Down
33 changes: 0 additions & 33 deletions packages/admin/src/client/SqlerLazy.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions packages/admin/src/client/everything-suggester.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/admin/src/client/trpc.ts
@@ -1,4 +1,4 @@
import {QueryClient, QueryClientProvider} from '@tanstack/react-query'
import {QueryClient} from '@tanstack/react-query'
import {httpBatchLink} from '@trpc/client'
import {createTRPCReact} from '@trpc/react-query'
import React, {useState} from 'react'
Expand Down
4 changes: 1 addition & 3 deletions packages/admin/src/packlets/autocomplete/suggest.ts
Expand Up @@ -314,10 +314,8 @@ export const getSuggester = ({schema, searchPath}: SuggesterParmas) => {

const closeness = getCloseness(text, currentWordLower)

/* eslint-disable @stylistic/no-mixed-operators */
if (s.type === 'column') return 0 + closeness / 100
if (s.type === 'table' || s.type === 'view') return 1 + closeness / 100
/* eslint-enable @stylistic/no-mixed-operators */

return closeness
}),
Expand All @@ -344,7 +342,7 @@ const getCloseness = (text: string, currentWord: string): number => {
return 100
}

const wsqlNoDice = ({errors, ...rest}: wsqla.AutocompleteParseResult) => {
const wsqlNoDice = ({errors, ...rest}: wsqla.PostgreSqlAutocompleteResult) => {
return Object.values(rest).every(v => !v || (Array.isArray(v) && v.length === 0))
}

Expand Down

0 comments on commit 556b25f

Please sign in to comment.