-
-
Notifications
You must be signed in to change notification settings - Fork 4
chore: Review formatting and linting rules + add pre-commit hook #58
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
552a36c
chore: remove @stylistic/eslint-plugin from devDependencies and updat…
tomast1337 ccc1e50
build: fix typo in `start` script for frontend
Bentroen e4ab68d
chore: add missing `outDir` property to `tsconfig.base.json`
Bentroen cb73492
chore: remove workbench color customizations from VS Code settings file
Bentroen a238ce7
chore: enforce `eslint.useFlatConfig` in VS Code settings
Bentroen 7d2db0f
chore: remove unused `tests` package
Bentroen 7f61f41
chore: adjust ESLint dependencies in global `package.json`
Bentroen c7e6eb2
chore: remove `eslint-config-prettier` and `eslint-plugin-prettier`
Bentroen 986c01a
chore: add `types/jest` to global dependencies
Bentroen c8cb2ab
chore: adjust ESLint config to use modern definition
Bentroen 4b09277
chore: remove @typescript-eslint` packages in favor of monorepo install
Bentroen 7073aa3
chore: adjust ESLint included files config
Bentroen ba1b7b1
fix: adjust ESLint import validation from error to warn
Bentroen fb4ef98
chore: treat `@nbw/**` imports as internal
Bentroen 21b48c9
chore: remove invalid css and json Prettier configs
Bentroen 57606f2
chore: use `.mjs` extension in ESLint config
Bentroen 0a610fc
fix: remove file type filter on lint
Bentroen 337cd93
style: format and lint codebase with Prettier + ESLint
Bentroen e456484
chore: run Prettier on pre-commit hook via `husky` and `lint-staged`
Bentroen 163da29
chore: rename `prettier` script to `format`
Bentroen 7a17c9e
chore: add linting commit to `.git-blame-ignore-revs`
Bentroen 4cd0908
chore: add CI test setup script and update workflow for test environment
tomast1337 7e56b63
chore: remove test CI setup script and clean up workflow environment …
tomast1337 8d64b7b
test: refactor S3Client mock in FileService tests for clarity and res…
tomast1337 5480860
fix: set default value for allowDownload in SongUploadService
tomast1337 c9b2ea9
fix: update import path for SongFileType in UploadSong.context.tsx
tomast1337 652a807
fix: update import for undefined from zod and adjust file assignment …
tomast1337 1805cac
fix: simplify ad hide button logic and improve error handling for ad …
tomast1337 7f15299
chore: add ESLint environment declaration for browser in adasync.js
tomast1337 b478f5c
chore: add ESLint environment declaration for browser in adasync.js
tomast1337 6b92ca2
revert: #b478f5c7dd7bff1aaba656c0b18c8b4dd44b4cbb
tomast1337 131366a
chore: add browser-specific ESLint configuration for public files
tomast1337 54f7c73
chore: update lint workflow to ensure correct branch handling and set…
tomast1337 d160e07
chore: update lint workflow to include permissions and improve branch…
tomast1337 719f373
🔧 Auto-fix: ESLint formatting and fixes
actions-user ecae6fe
Remove ESLint environment comment from adasync.js
tomast1337 dd7dded
Add error logging for ad loading
tomast1337 c9024d3
Remove auto-commit steps from linter workflow
tomast1337 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
|
||
# Linting commits | ||
6efc953b9f7f648f2be59295a78ce1180f12b32d | ||
337cd93ac40295935a5bbf9268d820bddf9630e0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,9 @@ on: | |
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
env: | ||
THUMBNAIL_URL: ${{ vars.THUMBNAIL_URL }} | ||
|
||
|
@@ -21,6 +24,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Install bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
@@ -30,21 +34,3 @@ jobs: | |
|
||
- name: Run linter | ||
run: bun run lint | ||
|
||
- name: Check for changes | ||
id: verify-changed-files | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "changed=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Commit linter changes | ||
if: steps.verify-changed-files.outputs.changed == 'true' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "🔧 Auto-fix: ESLint formatting and fixes" | ||
git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bun run lint-staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/.next/* | ||
**/dist/* | ||
*.hbs | ||
node_modules/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,17 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"eslint.validate": [ | ||
"typescript" | ||
], | ||
"eslint.run": "onType", | ||
"eslint.format.enable": true, | ||
"mdx.server.enable": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit" | ||
}, | ||
"workbench.colorCustomizations": { | ||
"activityBar.activeBackground": "#fac977", | ||
"activityBar.background": "#fac977", | ||
"activityBar.foreground": "#15202b", | ||
"activityBar.inactiveForeground": "#15202b99", | ||
"activityBarBadge.background": "#069a62", | ||
"activityBarBadge.foreground": "#e7e7e7", | ||
"commandCenter.border": "#15202b99", | ||
"sash.hoverBorder": "#fac977", | ||
"statusBar.background": "#f8b646", | ||
"statusBar.foreground": "#15202b", | ||
"statusBarItem.hoverBackground": "#f6a315", | ||
"statusBarItem.remoteBackground": "#f8b646", | ||
"statusBarItem.remoteForeground": "#15202b", | ||
"titleBar.activeBackground": "#f8b646", | ||
"titleBar.activeForeground": "#15202b", | ||
"titleBar.inactiveBackground": "#f8b64699", | ||
"titleBar.inactiveForeground": "#15202b99" | ||
}, | ||
"peacock.color": "#f8b646" | ||
} | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.validate": ["typescript", "javascript"], | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"eslint.run": "onType", | ||
"eslint.useFlatConfig": true, | ||
"eslint.format.enable": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,72 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": ".", | ||
"name": "Root" | ||
}, | ||
{ | ||
"path": "./apps/backend", | ||
"name": "Backend" | ||
}, | ||
{ | ||
"path": "./apps/frontend", | ||
"name": "Frontend" | ||
}, | ||
{ | ||
"path": "./packages/configs", | ||
"name": "configs" | ||
}, | ||
{ | ||
"path": "./packages/database", | ||
"name": "database" | ||
}, | ||
{ | ||
"path": "./packages/song", | ||
"name": "song" | ||
}, | ||
{ | ||
"path": "./packages/sounds", | ||
"name": "sounds" | ||
}, | ||
{ | ||
"path": "./packages/thumbnail", | ||
"name": "thumbnail" | ||
}, | ||
], | ||
"settings": { | ||
"window.title": "${dirty}${rootName}${separator}${profileName}${separator}${appName}", | ||
"editor.formatOnSave": true, | ||
"eslint.validate": [ | ||
"typescript" | ||
], | ||
"eslint.run": "onType", | ||
"eslint.format.enable": true, | ||
"mdx.server.enable": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit" | ||
}, | ||
"search.exclude": { | ||
"**/.git": true, | ||
"**/node_modules": true, | ||
"**/dist": true, | ||
}, | ||
"workbench.colorCustomizations": { | ||
"activityBar.activeBackground": "#fac977", | ||
"activityBar.background": "#fac977", | ||
"activityBar.foreground": "#15202b", | ||
"activityBar.inactiveForeground": "#15202b99", | ||
"activityBarBadge.background": "#069a62", | ||
"activityBarBadge.foreground": "#e7e7e7", | ||
"commandCenter.border": "#15202b99", | ||
"sash.hoverBorder": "#fac977", | ||
"statusBar.background": "#f8b646", | ||
"statusBar.foreground": "#15202b", | ||
"statusBarItem.hoverBackground": "#f6a315", | ||
"statusBarItem.remoteBackground": "#f8b646", | ||
"statusBarItem.remoteForeground": "#15202b", | ||
"titleBar.activeBackground": "#f8b646", | ||
"titleBar.activeForeground": "#15202b", | ||
"titleBar.inactiveBackground": "#f8b64699", | ||
"titleBar.inactiveForeground": "#15202b99" | ||
}, | ||
"peacock.color": "#f8b646" | ||
} | ||
} | ||
"folders": [ | ||
{ | ||
"path": ".", | ||
"name": "Root", | ||
}, | ||
{ | ||
"path": "./apps/backend", | ||
"name": "Backend", | ||
}, | ||
{ | ||
"path": "./apps/frontend", | ||
"name": "Frontend", | ||
}, | ||
{ | ||
"path": "./packages/configs", | ||
"name": "configs", | ||
}, | ||
{ | ||
"path": "./packages/database", | ||
"name": "database", | ||
}, | ||
{ | ||
"path": "./packages/song", | ||
"name": "song", | ||
}, | ||
{ | ||
"path": "./packages/sounds", | ||
"name": "sounds", | ||
}, | ||
{ | ||
"path": "./packages/thumbnail", | ||
"name": "thumbnail", | ||
}, | ||
], | ||
"settings": { | ||
"window.title": "${dirty}${rootName}${separator}${profileName}${separator}${appName}", | ||
"editor.formatOnSave": true, | ||
"eslint.validate": ["typescript"], | ||
"eslint.run": "onType", | ||
"eslint.format.enable": true, | ||
"mdx.server.enable": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit", | ||
}, | ||
"search.exclude": { | ||
"**/.git": true, | ||
"**/node_modules": true, | ||
"**/dist": true, | ||
}, | ||
"workbench.colorCustomizations": { | ||
"activityBar.activeBackground": "#fac977", | ||
"activityBar.background": "#fac977", | ||
"activityBar.foreground": "#15202b", | ||
"activityBar.inactiveForeground": "#15202b99", | ||
"activityBarBadge.background": "#069a62", | ||
"activityBarBadge.foreground": "#e7e7e7", | ||
"commandCenter.border": "#15202b99", | ||
"sash.hoverBorder": "#fac977", | ||
"statusBar.background": "#f8b646", | ||
"statusBar.foreground": "#15202b", | ||
"statusBarItem.hoverBackground": "#f6a315", | ||
"statusBarItem.remoteBackground": "#f8b646", | ||
"statusBarItem.remoteForeground": "#15202b", | ||
"titleBar.activeBackground": "#f8b646", | ||
"titleBar.activeForeground": "#15202b", | ||
"titleBar.inactiveBackground": "#f8b64699", | ||
"titleBar.inactiveForeground": "#15202b99", | ||
}, | ||
"peacock.color": "#f8b646", | ||
}, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/nest-cli", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src", | ||
"entryFile": "server/src/main.js", | ||
"compilerOptions": { | ||
"deleteOutDir": true, | ||
"plugins": [ | ||
"@nestjs/swagger/plugin" | ||
], | ||
"assets": [ | ||
{ | ||
"include": "mailing/templates/**/*.{hbs,png}", | ||
"outDir": "dist/server/src/", | ||
"exclude": "dist/**/*" | ||
}, | ||
"**/assets/**/*" | ||
], | ||
"watchAssets": true | ||
} | ||
} | ||
"$schema": "https://json.schemastore.org/nest-cli", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src", | ||
"entryFile": "server/src/main.js", | ||
"compilerOptions": { | ||
"deleteOutDir": true, | ||
"plugins": ["@nestjs/swagger/plugin"], | ||
"assets": [ | ||
{ | ||
"include": "mailing/templates/**/*.{hbs,png}", | ||
"outDir": "dist/server/src/", | ||
"exclude": "dist/**/*" | ||
}, | ||
"**/assets/**/*" | ||
], | ||
"watchAssets": true | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.