Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve tooling #24

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}}
run: bun run ./generate-embeddings.ts
run: bun run .scripts/generate-embeddings.ts
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
3 changes: 1 addition & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
bun run format
git add -A
bunx lint-staged
4 changes: 2 additions & 2 deletions generate-embeddings.ts → .scripts/generate-embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ async function generateEmbeddings() {
});

const pagesLoader = new DirectoryLoader(
'./app/',
'../app/',
{
'.tsx': (path) => new TextLoader(path),
},
true
);

const layoutLoader = new DirectoryLoader(
'./components/layout/',
'../components/layout/',
{
'.tsx': (path) => new TextLoader(path),
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
10 changes: 10 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
"*/**/*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint --fix",
"eslint"
],
"*/**/*.{json,css,md}": [
"prettier --write"
]
}
8 changes: 8 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ const nextConfig = {
},
},

eslint: {
ignoreDuringBuilds: true,
},

typescript: {
ignoreBuildErrors: true,
},

experimental: {
turbo: {
rules: {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@svgr/webpack": "^8.1.0",
"@types/node": "^20",
"@types/react": "^18",
Expand All @@ -52,6 +54,7 @@
"eslint-config-next": "14.2.3",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"postcss": "^8",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.12",
Expand Down
Loading