Skip to content

Commit

Permalink
Remove unnecessary packages (#67)
Browse files Browse the repository at this point in the history
* packages(eslint): remove unnecessary packages

* refactor(*): remove `isFalsy`
  • Loading branch information
GervinFung authored Sep 22, 2024
1 parent 89d0394 commit 3d0f393
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 38 deletions.
2 changes: 2 additions & 0 deletions apps/web/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import process from 'process';

// eslint-disable-next-line import/no-extraneous-dependencies
import { includeIgnoreFile } from '@eslint/compat';
// eslint-disable-next-line import/no-extraneous-dependencies
import eslint from '@eslint/js';
import { node, next } from '@poolofdeath20/eslint-config';
import tseslint from 'typescript-eslint';
Expand Down
3 changes: 3 additions & 0 deletions apps/web/knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const config: KnipConfig = {
'prettier',
'supabase',
'vite-node',
'@eslint/compat',
'@eslint/js',
'typescript-eslint',
],
};

Expand Down
6 changes: 0 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,9 @@
},
"devDependencies": {
"@ducanh2912/next-pwa": "^10.2.8",
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.8.0",
"@poolofdeath20/eslint-config": "^0.4.0",
"@poolofdeath20/tsconfig": "^0.1.1",
"@types/cors": "^2.8.17",
"@types/eslint__js": "^8.42.3",
"@types/file-saver": "^2.0.7",
"@types/jest-image-snapshot": "^6.4.0",
"@types/react": "^18.3.3",
Expand All @@ -59,8 +56,6 @@
"@typescript-eslint/parser": "^7.18.0",
"ci-info": "^4.0.0",
"eslint": "^9.9.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-react": "^7.35.0",
"gen-env-type-def": "^0.0.4",
"jest-image-snapshot": "^6.4.0",
"knip": "^5.27.0",
Expand All @@ -70,7 +65,6 @@
"sql-formatter": "15.3.2",
"supabase": "^1.187.10",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.1",
"vite-node": "^2.0.4",
"vitest": "^2.0.4"
}
Expand Down
5 changes: 2 additions & 3 deletions apps/web/pages/templates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
Optional,
formQueryParamStringFromRecord,
Defined,
isFalsy,
} from '@poolofdeath20/util';
import { saveAs } from 'file-saver';
import iwanthue from 'iwanthue';
Expand Down Expand Up @@ -420,7 +419,7 @@ const Templates = () => {
<ButtonGroup gap={4}>
<Button
colorScheme="messenger"
isDisabled={isFalsy(selected.length)}
isDisabled={!selected.length}
onClick={() => {
copyNotification.unset();
clipboard.copy(combineTemplates(selected));
Expand All @@ -431,7 +430,7 @@ const Templates = () => {
<Divider orientation="vertical" />
<Button
colorScheme="messenger"
isDisabled={isFalsy(selected.length)}
isDisabled={!selected.length}
onClick={() => {
const zip = selected.reduce(
(zip, template) => {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/web/components/templates/query.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { DeepReadonly } from '@poolofdeath20/util';

import { Box, Text } from '@chakra-ui/react';
import styled from '@emotion/styled';
import { equalTo, isFalsy } from '@poolofdeath20/util';
import { equalTo } from '@poolofdeath20/util';
import Fuse from 'fuse.js';
import React from 'react';
import Select from 'react-select';
Expand Down Expand Up @@ -69,7 +69,7 @@ const QuerySection = (
.at(0)?.score ?? 1) <= 0.5
);
}}
isDisabled={isFalsy(props.templates.all.length)}
isDisabled={!props.templates.all.length}
isMulti
loadingMessage={() => {
return (
Expand Down
30 changes: 3 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d0f393

Please sign in to comment.