@insaeng/eslint-config 0.2.0 → 0.4.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.
@@ -1 +1 @@
1
- {"version":3,"file":"boundaries.d.ts","sourceRoot":"","sources":["../src/boundaries.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAyCD,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,0CAqGzD"}
1
+ {"version":3,"file":"boundaries.d.ts","sourceRoot":"","sources":["../src/boundaries.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAyCD,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,0CAgHzD"}
@@ -53,11 +53,12 @@ export function boundaries(options = {}) {
53
53
  settings: {
54
54
  "boundaries/files": [
55
55
  { category: "domain", pattern: "src/domain/*/*-entity.ts" },
56
- { category: "domain", pattern: "src/domain/*/*-repo.ts" },
56
+ { category: "port", pattern: "src/domain/*/*-repo.ts" },
57
57
  { category: "domain", pattern: "src/domain/*/use-cases/*.ts" },
58
58
  { category: "data", pattern: "src/data/**" },
59
59
  { category: "app", pattern: "src/app/**" },
60
60
  { category: "main", pattern: "src/main.ts" },
61
+ { category: "main", pattern: "src/dependencies.ts" },
61
62
  ],
62
63
  ...(rootDir !== undefined && { "boundaries/root-path": rootDir }),
63
64
  },
@@ -69,9 +70,15 @@ export function boundaries(options = {}) {
69
70
  checkUnknownLocals: true,
70
71
  policies: [
71
72
  {
72
- from: { file: { categories: ["domain", "data", "app"] } },
73
+ from: {
74
+ file: { categories: ["domain", "port", "data", "app"] },
75
+ },
73
76
  allow: { to: { file: { categories: "domain" } } },
74
77
  },
78
+ {
79
+ from: { file: { categories: ["domain", "port", "data"] } },
80
+ allow: { to: { file: { categories: "port" } } },
81
+ },
75
82
  {
76
83
  from: { file: { categories: "data" } },
77
84
  allow: { to: { file: { categories: "data" } } },
@@ -83,7 +90,11 @@ export function boundaries(options = {}) {
83
90
  {
84
91
  from: { file: { categories: "main" } },
85
92
  allow: {
86
- to: { file: { categories: ["domain", "data", "app"] } },
93
+ to: {
94
+ file: {
95
+ categories: ["domain", "port", "data", "app", "main"],
96
+ },
97
+ },
87
98
  },
88
99
  },
89
100
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insaeng/eslint-config",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Strict, type-aware ESLint flat config for insaeng services",
5
5
  "repository": {
6
6
  "type": "git",
package/src/boundaries.ts CHANGED
@@ -67,11 +67,12 @@ export function boundaries(options: BoundariesOptions = {}) {
67
67
  settings: {
68
68
  "boundaries/files": [
69
69
  { category: "domain", pattern: "src/domain/*/*-entity.ts" },
70
- { category: "domain", pattern: "src/domain/*/*-repo.ts" },
70
+ { category: "port", pattern: "src/domain/*/*-repo.ts" },
71
71
  { category: "domain", pattern: "src/domain/*/use-cases/*.ts" },
72
72
  { category: "data", pattern: "src/data/**" },
73
73
  { category: "app", pattern: "src/app/**" },
74
74
  { category: "main", pattern: "src/main.ts" },
75
+ { category: "main", pattern: "src/dependencies.ts" },
75
76
  ],
76
77
  ...(rootDir !== undefined && { "boundaries/root-path": rootDir }),
77
78
  },
@@ -83,9 +84,15 @@ export function boundaries(options: BoundariesOptions = {}) {
83
84
  checkUnknownLocals: true,
84
85
  policies: [
85
86
  {
86
- from: { file: { categories: ["domain", "data", "app"] } },
87
+ from: {
88
+ file: { categories: ["domain", "port", "data", "app"] },
89
+ },
87
90
  allow: { to: { file: { categories: "domain" } } },
88
91
  },
92
+ {
93
+ from: { file: { categories: ["domain", "port", "data"] } },
94
+ allow: { to: { file: { categories: "port" } } },
95
+ },
89
96
  {
90
97
  from: { file: { categories: "data" } },
91
98
  allow: { to: { file: { categories: "data" } } },
@@ -97,7 +104,11 @@ export function boundaries(options: BoundariesOptions = {}) {
97
104
  {
98
105
  from: { file: { categories: "main" } },
99
106
  allow: {
100
- to: { file: { categories: ["domain", "data", "app"] } },
107
+ to: {
108
+ file: {
109
+ categories: ["domain", "port", "data", "app", "main"],
110
+ },
111
+ },
101
112
  },
102
113
  },
103
114
  ],