Skip to content

Commit f028e38

Browse files
committed
Knip improvements
1 parent 7b5e7db commit f028e38

6 files changed

Lines changed: 28 additions & 26 deletions

File tree

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
node_modules
2-
32
/.cache
43
/build
54
.env
6-
75
coverage

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npm run test
1+
npm run test && npm run knip

app/localization/resource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import bosnian from "../../resources/locales/bs/common.json";
33

44
const languages = ["en", "bs"] as const;
55
export const supportedLanguages = [...languages];
6-
export type Language = (typeof languages)[number];
6+
type Language = (typeof languages)[number];
77

8-
export type Resource = {
8+
type Resource = {
99
common: typeof english;
1010
};
1111

knip.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{
22
"$schema": "https://unpkg.com/knip@5/schema.json",
33
"entry": [
4-
"app/root.tsx",
5-
"app/entry.{client,server}.{ts,tsx}",
6-
"app/**/*.{js,ts,tsx}",
74
"scripts/*.{ts,js}",
8-
"remix/*.{ts,js}",
9-
"vite.config.ts",
10-
"vitest.config.ts"
5+
"remix/*.{ts,js}"
6+
],
7+
"ignore": [
8+
"rdt-plugins/**/*"
119
],
1210
"project": [
1311
"**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}",

package-lock.json

Lines changed: 17 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
"test:ui": "vitest --ui --api 9527",
1919
"test:cov": "vitest run --coverage",
2020
"typecheck": "tsc",
21-
"validate": "npm run typecheck && npm run lint && npm run test",
21+
"validate": "npm run typecheck && npm run lint && npm run test && npm run knip",
2222
"prepare": "husky",
2323
"knip": "knip"
2424
},
2525
"dependencies": {
2626
"@remix-run/node": "^2.8.1",
2727
"@remix-run/react": "^2.8.1",
2828
"@remix-run/serve": "^2.8.1",
29+
"@remix-run/web-fetch": "^4.4.2",
2930
"clsx": "^2.1.0",
3031
"i18next": "^23.10.1",
3132
"i18next-browser-languagedetector": "^7.2.1",
@@ -51,12 +52,14 @@
5152
"@vitest/ui": "^1.4.0",
5253
"autoprefixer": "^10.4.19",
5354
"chalk": "^5.3.0",
55+
"dotenv": "^16.4.5",
5456
"eslint": "^8.57.0",
5557
"eslint-import-resolver-typescript": "^3.6.1",
5658
"eslint-plugin-import": "^2.29.1",
5759
"eslint-plugin-jsx-a11y": "^6.8.0",
5860
"eslint-plugin-react": "^7.34.1",
5961
"eslint-plugin-react-hooks": "^4.6.0",
62+
"glob": "^10.3.12",
6063
"happy-dom": "^14.4.0",
6164
"husky": "^9.0.11",
6265
"knip": "^5.9.0",

0 commit comments

Comments
 (0)