Skip to content

Commit 7042299

Browse files
authored
Merge pull request #58 from OpenNBS/chore/lint-and-format-review
2 parents c9ffc37 + c9024d3 commit 7042299

File tree

123 files changed

+1165
-3202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1165
-3202
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
# Linting commits
55
6efc953b9f7f648f2be59295a78ce1180f12b32d
6+
337cd93ac40295935a5bbf9268d820bddf9630e0

.github/workflows/lint.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
jobs:
1414
lint:
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
1619
env:
1720
THUMBNAIL_URL: ${{ vars.THUMBNAIL_URL }}
1821

@@ -21,6 +24,7 @@ jobs:
2124
uses: actions/checkout@v4
2225
with:
2326
token: ${{ secrets.GITHUB_TOKEN }}
27+
fetch-depth: 0
2428

2529
- name: Install bun
2630
uses: oven-sh/setup-bun@v2
@@ -30,21 +34,3 @@ jobs:
3034

3135
- name: Run linter
3236
run: bun run lint
33-
34-
- name: Check for changes
35-
id: verify-changed-files
36-
run: |
37-
if [ -n "$(git status --porcelain)" ]; then
38-
echo "changed=true" >> $GITHUB_OUTPUT
39-
else
40-
echo "changed=false" >> $GITHUB_OUTPUT
41-
fi
42-
43-
- name: Commit linter changes
44-
if: steps.verify-changed-files.outputs.changed == 'true'
45-
run: |
46-
git config --local user.email "[email protected]"
47-
git config --local user.name "GitHub Action"
48-
git add .
49-
git commit -m "🔧 Auto-fix: ESLint formatting and fixes"
50-
git push

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ jobs:
2222

2323
- name: Install bun
2424
uses: oven-sh/setup-bun@v2
25+
with:
26+
bun-version: latest
2527

2628
- name: Install dependencies
2729
run: bun install
2830

2931
- name: Run tests
30-
run: bun test
32+
run: bun test

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun run lint-staged

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/.next/*
2+
**/dist/*
3+
*.hbs
4+
node_modules/*

.prettierrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
"tabWidth": 2,
33
"trailingComma": "all",
44
"singleQuote": true,
5-
"jsxSingleQuote": true,
6-
"cssEnable": ["css", "less", "sass", "scss"],
7-
"jsonEnable": ["json", "jsonc"]
5+
"jsxSingleQuote": true
86
}

.vscode/settings.json

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
11
{
2-
"editor.formatOnSave": true,
3-
"eslint.validate": [
4-
"typescript"
5-
],
6-
"eslint.run": "onType",
7-
"eslint.format.enable": true,
8-
"mdx.server.enable": true,
9-
"editor.codeActionsOnSave": {
10-
"source.fixAll": "explicit"
11-
},
12-
"workbench.colorCustomizations": {
13-
"activityBar.activeBackground": "#fac977",
14-
"activityBar.background": "#fac977",
15-
"activityBar.foreground": "#15202b",
16-
"activityBar.inactiveForeground": "#15202b99",
17-
"activityBarBadge.background": "#069a62",
18-
"activityBarBadge.foreground": "#e7e7e7",
19-
"commandCenter.border": "#15202b99",
20-
"sash.hoverBorder": "#fac977",
21-
"statusBar.background": "#f8b646",
22-
"statusBar.foreground": "#15202b",
23-
"statusBarItem.hoverBackground": "#f6a315",
24-
"statusBarItem.remoteBackground": "#f8b646",
25-
"statusBarItem.remoteForeground": "#15202b",
26-
"titleBar.activeBackground": "#f8b646",
27-
"titleBar.activeForeground": "#15202b",
28-
"titleBar.inactiveBackground": "#f8b64699",
29-
"titleBar.inactiveForeground": "#15202b99"
30-
},
31-
"peacock.color": "#f8b646"
32-
}
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true,
4+
"eslint.validate": ["typescript", "javascript"],
5+
"[json]": {
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[jsonc]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
},
11+
"eslint.run": "onType",
12+
"eslint.useFlatConfig": true,
13+
"eslint.format.enable": true,
14+
"editor.codeActionsOnSave": {
15+
"source.fixAll.eslint": "explicit"
16+
}
17+
}

NoteBlockWorld.code-workspace

Lines changed: 71 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,72 @@
11
{
2-
"folders": [
3-
{
4-
"path": ".",
5-
"name": "Root"
6-
},
7-
{
8-
"path": "./apps/backend",
9-
"name": "Backend"
10-
},
11-
{
12-
"path": "./apps/frontend",
13-
"name": "Frontend"
14-
},
15-
{
16-
"path": "./packages/configs",
17-
"name": "configs"
18-
},
19-
{
20-
"path": "./packages/database",
21-
"name": "database"
22-
},
23-
{
24-
"path": "./packages/song",
25-
"name": "song"
26-
},
27-
{
28-
"path": "./packages/sounds",
29-
"name": "sounds"
30-
},
31-
{
32-
"path": "./packages/thumbnail",
33-
"name": "thumbnail"
34-
},
35-
],
36-
"settings": {
37-
"window.title": "${dirty}${rootName}${separator}${profileName}${separator}${appName}",
38-
"editor.formatOnSave": true,
39-
"eslint.validate": [
40-
"typescript"
41-
],
42-
"eslint.run": "onType",
43-
"eslint.format.enable": true,
44-
"mdx.server.enable": true,
45-
"editor.codeActionsOnSave": {
46-
"source.fixAll": "explicit"
47-
},
48-
"search.exclude": {
49-
"**/.git": true,
50-
"**/node_modules": true,
51-
"**/dist": true,
52-
},
53-
"workbench.colorCustomizations": {
54-
"activityBar.activeBackground": "#fac977",
55-
"activityBar.background": "#fac977",
56-
"activityBar.foreground": "#15202b",
57-
"activityBar.inactiveForeground": "#15202b99",
58-
"activityBarBadge.background": "#069a62",
59-
"activityBarBadge.foreground": "#e7e7e7",
60-
"commandCenter.border": "#15202b99",
61-
"sash.hoverBorder": "#fac977",
62-
"statusBar.background": "#f8b646",
63-
"statusBar.foreground": "#15202b",
64-
"statusBarItem.hoverBackground": "#f6a315",
65-
"statusBarItem.remoteBackground": "#f8b646",
66-
"statusBarItem.remoteForeground": "#15202b",
67-
"titleBar.activeBackground": "#f8b646",
68-
"titleBar.activeForeground": "#15202b",
69-
"titleBar.inactiveBackground": "#f8b64699",
70-
"titleBar.inactiveForeground": "#15202b99"
71-
},
72-
"peacock.color": "#f8b646"
73-
}
74-
}
2+
"folders": [
3+
{
4+
"path": ".",
5+
"name": "Root",
6+
},
7+
{
8+
"path": "./apps/backend",
9+
"name": "Backend",
10+
},
11+
{
12+
"path": "./apps/frontend",
13+
"name": "Frontend",
14+
},
15+
{
16+
"path": "./packages/configs",
17+
"name": "configs",
18+
},
19+
{
20+
"path": "./packages/database",
21+
"name": "database",
22+
},
23+
{
24+
"path": "./packages/song",
25+
"name": "song",
26+
},
27+
{
28+
"path": "./packages/sounds",
29+
"name": "sounds",
30+
},
31+
{
32+
"path": "./packages/thumbnail",
33+
"name": "thumbnail",
34+
},
35+
],
36+
"settings": {
37+
"window.title": "${dirty}${rootName}${separator}${profileName}${separator}${appName}",
38+
"editor.formatOnSave": true,
39+
"eslint.validate": ["typescript"],
40+
"eslint.run": "onType",
41+
"eslint.format.enable": true,
42+
"mdx.server.enable": true,
43+
"editor.codeActionsOnSave": {
44+
"source.fixAll": "explicit",
45+
},
46+
"search.exclude": {
47+
"**/.git": true,
48+
"**/node_modules": true,
49+
"**/dist": true,
50+
},
51+
"workbench.colorCustomizations": {
52+
"activityBar.activeBackground": "#fac977",
53+
"activityBar.background": "#fac977",
54+
"activityBar.foreground": "#15202b",
55+
"activityBar.inactiveForeground": "#15202b99",
56+
"activityBarBadge.background": "#069a62",
57+
"activityBarBadge.foreground": "#e7e7e7",
58+
"commandCenter.border": "#15202b99",
59+
"sash.hoverBorder": "#fac977",
60+
"statusBar.background": "#f8b646",
61+
"statusBar.foreground": "#15202b",
62+
"statusBarItem.hoverBackground": "#f6a315",
63+
"statusBarItem.remoteBackground": "#f8b646",
64+
"statusBarItem.remoteForeground": "#15202b",
65+
"titleBar.activeBackground": "#f8b646",
66+
"titleBar.activeForeground": "#15202b",
67+
"titleBar.inactiveBackground": "#f8b64699",
68+
"titleBar.inactiveForeground": "#15202b99",
69+
},
70+
"peacock.color": "#f8b646",
71+
},
72+
}

apps/backend/nest-cli.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
{
2-
"$schema": "https://json.schemastore.org/nest-cli",
3-
"collection": "@nestjs/schematics",
4-
"sourceRoot": "src",
5-
"entryFile": "server/src/main.js",
6-
"compilerOptions": {
7-
"deleteOutDir": true,
8-
"plugins": [
9-
"@nestjs/swagger/plugin"
10-
],
11-
"assets": [
12-
{
13-
"include": "mailing/templates/**/*.{hbs,png}",
14-
"outDir": "dist/server/src/",
15-
"exclude": "dist/**/*"
16-
},
17-
"**/assets/**/*"
18-
],
19-
"watchAssets": true
20-
}
21-
}
2+
"$schema": "https://json.schemastore.org/nest-cli",
3+
"collection": "@nestjs/schematics",
4+
"sourceRoot": "src",
5+
"entryFile": "server/src/main.js",
6+
"compilerOptions": {
7+
"deleteOutDir": true,
8+
"plugins": ["@nestjs/swagger/plugin"],
9+
"assets": [
10+
{
11+
"include": "mailing/templates/**/*.{hbs,png}",
12+
"outDir": "dist/server/src/",
13+
"exclude": "dist/**/*"
14+
},
15+
"**/assets/**/*"
16+
],
17+
"watchAssets": true
18+
}
19+
}

apps/backend/src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { UserModule } from './user/user.module';
2121
imports: [
2222
ConfigModule.forRoot({
2323
isGlobal: true,
24-
envFilePath: ['.env.development', '.env.production'],
24+
envFilePath: ['.env.test', '.env.development', '.env.production'],
2525
validate,
2626
}),
2727
//DatabaseModule,

0 commit comments

Comments
 (0)