Skip to content

Commit

Permalink
Add ts files in "generated" on knip
Browse files Browse the repository at this point in the history
  • Loading branch information
shreeyash07 committed Nov 19, 2024
1 parent 2bfbe59 commit f480da7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 42 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion docker-compose-with-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
environment:
APP_TITLE: ${APP_TITLE:-CMS}
APP_GRAPHQL_ENDPOINT: ${APP_GRAPHQL_ENDPOINT:-http://localhost:8001/graphql/}
APP_GRAPHQL_CODEGEN_ENDPOINT: ${APP_GRAPHQL_CODEGEN_ENDPOINT:-http://web:8001/graphql/}
APP_GRAPHQL_CODEGEN_ENDPOINT: ${APP_GRAPHQL_CODEGEN_ENDPOINT:-./backend/schema.graphql}
volumes:
- ../:/code
ports:
Expand Down
11 changes: 6 additions & 5 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignoreBinaries": ["awk", "ip"],
"ignore": ["generated/**/*.ts"],
"entry": [
"src/index.tsx!",
"src/**/*.test.ts",
"src/**/*.test.tsx",
"src/index.tsx!"
"src/**/*.test.tsx"
],
"project": [
"src/**/*.tsx!",
"src/**/*.ts!",
"src/**/*.d.ts",
"src/**/*.test.ts",
"src/**/*.test.tsx",
"src/**/*.tsx!",
"src/**/*.ts!"
"generated/**/*.ts"
]
}
27 changes: 10 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,29 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"generate:type": "graphql-codegen --require dotenv/config --config codegen.ts",
"prestart": "pnpm generate:type",
"start": "vite",
"dev": "vite",
"preview": "vite preview",
"test": "vitest",
"coverage": "vitest run --coverage",
"prestart": "pnpm initialize",
"get-hostname": "ip route | awk '/default/ { print $3 }'",
"replace-localhost": "awk \"{sub(/localhost/, \\\"$(pnpm -s get-hostname)\\\")}1\"",
"generate:type": "APP_GRAPHQL_CODEGEN_ENDPOINT=$(echo $APP_GRAPHQL_CODEGEN_ENDPOINT | pnpm -s replace-localhost) graphql-codegen --require dotenv/config --config codegen.ts",
"initialize": "pnpm generate:type",
"prebuild": "pnpm initialize",
"prebuild": "pnpm generate:type",
"build": "vite build",
"pretypecheck": "pnpm initialize",
"pretypecheck": "pnpm generate:type",
"typecheck": "tsc",
"prelint:js": "pnpm initialize",
"prelint:unused": "pnpm generate:type",
"lint:unused": "knip --no-gitignore --tags=-knipignore",
"prelint:js": "pnpm generate:type",
"lint:js": "eslint src",
"prelint:css": "pnpm initialize",
"lint:css": "stylelint \"./src/**/*.css\"",
"prelint": "pnpm initialize",
"lint": "pnpm lint:js && pnpm lint:css",
"lint:fix": "pnpm lint:js --fix && pnpm lint:css --fix",
"prelint:unused": "pnpm initialize",
"lint:unused": "knip --tags=-knipignore",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"postinstall": "patch-package"
},
"dependencies": {
"@apollo/client": "^3.11.8",
"@togglecorp/fujs": "^2.0.0",
"@julr/vite-plugin-validate-env": "^1.1.1",
"@graphql-typed-document-node/core": "^3.2.0",
"graphql": "^16.9.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -41,7 +35,6 @@
"devDependencies": {
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/client-preset": "^4.3.3",
"@graphql-typed-document-node/core": "^3.2.0",
"@types/node": "^20.1.3",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

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

16 changes: 0 additions & 16 deletions type.template.tsx

This file was deleted.

0 comments on commit f480da7

Please sign in to comment.