Skip to content

Commit 4cf745a

Browse files
committed
chore: update bun types to version 1.2.22 and enhance ESLint configuration with additional spacing rules and core module support
1 parent 7abcd1f commit 4cf745a

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

bun.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@nestjs/platform-express": "^10.4.15",
5151
"@nestjs/swagger": "^11.1.5",
5252
"@nestjs/throttler": "^6.3.0",
53+
"@types/bun": "^1.2.10",
5354
"@types/uuid": "^9.0.8",
5455
"axios": "^1.7.9",
5556
"bcryptjs": "^2.4.3",
@@ -3188,7 +3189,7 @@
31883189

31893190
"@napi-rs/wasm-runtime/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ=="],
31903191

3191-
"@nbw/backend/@types/bun": ["@types/[email protected].20", "", { "dependencies": { "bun-types": "1.2.20" } }, "sha512-dX3RGzQ8+KgmMw7CsW4xT5ITBSCrSbfHc36SNT31EOUg/LA9JWq0VDdEXDRSe1InVWpd2yLUM1FUF/kEOyTzYA=="],
3192+
"@nbw/backend/@types/bun": ["@types/[email protected].22", "", { "dependencies": { "bun-types": "1.2.22" } }, "sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA=="],
31923193

31933194
"@nbw/config/@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": "1.2.22" } }, "sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA=="],
31943195

@@ -4042,7 +4043,7 @@
40424043

40434044
"@jest/types/@types/node/undici-types": ["[email protected]", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
40444045

4045-
"@nbw/backend/@types/bun/bun-types": ["[email protected].20", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-pxTnQYOrKvdOwyiyd/7sMt9yFOenN004Y6O4lCcCUoKVej48FS5cvTw9geRaEcB9TsDZaJKAxPTVvi8tFsVuXA=="],
4046+
"@nbw/backend/@types/bun/bun-types": ["[email protected].22", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-hwaAu8tct/Zn6Zft4U9BsZcXkYomzpHJX28ofvx7k0Zz2HNz54n1n+tDgxoWFGB4PcFvJXJQloPhaV2eP3Q6EA=="],
40464047

40474048
"@nbw/config/@types/bun/bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-hwaAu8tct/Zn6Zft4U9BsZcXkYomzpHJX28ofvx7k0Zz2HNz54n1n+tDgxoWFGB4PcFvJXJQloPhaV2eP3Q6EA=="],
40484049

eslint.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ export default tseslint.config(
1717
'**/*.config.ts',
1818
'**/generated/**',
1919
'.eslintrc.js',
20-
'**/*.spec.ts',
21-
'**/*.test.ts',
2220
],
2321
},
2422

@@ -50,6 +48,8 @@ export default tseslint.config(
5048
},
5149
node: true,
5250
},
51+
// Allow Bun built-in modules
52+
'import/core-modules': ['bun:test', 'bun:sqlite', 'bun'],
5353
},
5454
rules: {
5555
// Manually include rules from the import plugin's recommended configs.
@@ -110,6 +110,15 @@ export default tseslint.config(
110110
}],
111111
'import/newline-after-import': 'error',
112112
'import/no-duplicates': 'error',
113+
114+
// Spacing rules for consistency
115+
'space-infix-ops': 'error', // Enforces spaces around operators like +, =, etc.
116+
'keyword-spacing': ['error', { 'before': true, 'after': true }], // Enforces spaces around keywords like if, else.
117+
'arrow-spacing': ['error', { 'before': true, 'after': true }], // Enforces spaces around arrow in arrow functions.
118+
'space-before-blocks': 'error', // Enforces a space before opening curly braces.
119+
'object-curly-spacing': ['error', 'always'], // Enforces spaces inside curly braces: { foo } not {foo}.
120+
'comma-spacing': ['error', { 'before': false, 'after': true }], // Enforces space after a comma, not before.
121+
'space-before-function-paren': ['error', { 'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always' }], // Controls space before function parentheses.
113122
},
114123
},
115124
);

0 commit comments

Comments
 (0)