@synergyerp/backend-standards 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/commit-msg +0 -0
- package/.husky/pre-commit +0 -0
- package/.husky/pre-push +0 -0
- package/BACKEND_STANDARDS.md +966 -0
- package/CICD_STANDARDS.md +1888 -0
- package/README.md +7 -7
- package/package.json +16 -13
- package/scripts/check-modularization.mjs +0 -0
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Shared backend standards for all AO Holdings backend projects. Provides unified
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
pnpm add -D @
|
|
8
|
+
pnpm add -D @synergyerp/backend-standards
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## What's Included
|
|
@@ -28,7 +28,7 @@ pnpm add -D @aoholdings/backend-standards
|
|
|
28
28
|
|
|
29
29
|
```javascript
|
|
30
30
|
// eslint.config.js
|
|
31
|
-
export { default } from '@
|
|
31
|
+
export { default } from '@synergyerp/backend-standards';
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### TypeScript
|
|
@@ -36,7 +36,7 @@ export { default } from '@aoholdings/backend-standards';
|
|
|
36
36
|
```jsonc
|
|
37
37
|
// tsconfig.json
|
|
38
38
|
{
|
|
39
|
-
"extends": "@
|
|
39
|
+
"extends": "@synergyerp/backend-standards/tsconfig.base.json",
|
|
40
40
|
}
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ export { default } from '@aoholdings/backend-standards';
|
|
|
44
44
|
|
|
45
45
|
```typescript
|
|
46
46
|
// vitest.config.ts
|
|
47
|
-
import baseConfig from '@
|
|
47
|
+
import baseConfig from '@synergyerp/backend-standards/vitest.config.base';
|
|
48
48
|
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
49
49
|
export default mergeConfig(baseConfig, defineConfig({}));
|
|
50
50
|
```
|
|
@@ -54,13 +54,13 @@ export default mergeConfig(baseConfig, defineConfig({}));
|
|
|
54
54
|
```json
|
|
55
55
|
{
|
|
56
56
|
"scripts": {
|
|
57
|
-
"prepare": "cp -r node_modules/@
|
|
57
|
+
"prepare": "cp -r node_modules/@synergyerp/backend-standards/.husky . 2>/dev/null && chmod +x .husky/* 2>/dev/null || true",
|
|
58
58
|
"lint": "eslint --ext .ts --max-warnings 0 .",
|
|
59
59
|
"lint:fix": "eslint --ext .ts . --fix",
|
|
60
60
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
61
61
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
62
62
|
"check-types": "tsc --noEmit",
|
|
63
|
-
"check-modularization": "node node_modules/@
|
|
63
|
+
"check-modularization": "node node_modules/@synergyerp/backend-standards/scripts/check-modularization.mjs",
|
|
64
64
|
"test": "vitest run",
|
|
65
65
|
"test:watch": "vitest",
|
|
66
66
|
"test:ci": "vitest run --coverage",
|
|
@@ -83,7 +83,7 @@ pnpm add -D husky lint-staged
|
|
|
83
83
|
### CI Pipeline
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
cp node_modules/@
|
|
86
|
+
cp node_modules/@synergyerp/backend-standards/.github/workflows/ci-template.yml .github/workflows/ci.yml
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
## Module Isolation Enforcement
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synergyerp/backend-standards",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "SynergyERP
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "SynergyERP backend standards — ESLint, Prettier, commitlint, Husky, TypeScript configs, modularization enforcement, and PR templates.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "eslint.config.js",
|
|
@@ -19,8 +19,20 @@
|
|
|
19
19
|
"scripts/",
|
|
20
20
|
".husky/",
|
|
21
21
|
".vscode/",
|
|
22
|
-
".github/"
|
|
22
|
+
".github/",
|
|
23
|
+
"BACKEND_STANDARDS.md",
|
|
24
|
+
"CICD_STANDARDS.md"
|
|
23
25
|
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"lint": "eslint .",
|
|
28
|
+
"format": "prettier --write .",
|
|
29
|
+
"format:check": "prettier --check .",
|
|
30
|
+
"check-modularization": "node scripts/check-modularization.mjs; exit 0",
|
|
31
|
+
"check-types": "tsc --noEmit; exit 0",
|
|
32
|
+
"test:ci": "exit 0",
|
|
33
|
+
"test": "exit 0",
|
|
34
|
+
"prepare": "echo 'Standards package ready'"
|
|
35
|
+
},
|
|
24
36
|
"repository": {
|
|
25
37
|
"type": "git",
|
|
26
38
|
"url": "git+https://github.com/aoholdings/backend-standards.git"
|
|
@@ -63,14 +75,5 @@
|
|
|
63
75
|
"typescript": "^5.5.0",
|
|
64
76
|
"vitest": "^3.0.0",
|
|
65
77
|
"@types/node": "^22.0.0"
|
|
66
|
-
},
|
|
67
|
-
"scripts": {
|
|
68
|
-
"lint": "eslint .",
|
|
69
|
-
"format": "prettier --write .",
|
|
70
|
-
"format:check": "prettier --check .",
|
|
71
|
-
"check-modularization": "node scripts/check-modularization.mjs; exit 0",
|
|
72
|
-
"check-types": "tsc --noEmit; exit 0",
|
|
73
|
-
"test:ci": "exit 0",
|
|
74
|
-
"test": "exit 0"
|
|
75
78
|
}
|
|
76
|
-
}
|
|
79
|
+
}
|
|
File without changes
|