@yasainet/eslint 0.0.17 → 0.0.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yasainet/eslint",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "ESLint",
5
5
  "type": "module",
6
6
  "exports": {
@@ -7,16 +7,10 @@ export function createNamingConfigs(featureRoot, prefixLibMapping) {
7
7
  const prefixPattern = `@(${Object.keys(prefixLibMapping).join("|")})`;
8
8
  const sharedPrefixPattern = `@(shared|${Object.keys(prefixLibMapping).join("|")})`;
9
9
 
10
- // DB prefix: value contains "/" = sub-directory origin = DB client
11
- const dbPrefixKeys = Object.entries(prefixLibMapping)
12
- .filter(([, value]) => value.includes("/"))
13
- .map(([key]) => key);
14
-
15
10
  const configs = [
16
11
  {
17
12
  name: "naming/services",
18
13
  files: featuresGlob(featureRoot, "**/services/*.ts"),
19
- ignores: featuresGlob(featureRoot, "shared/services/*.ts"),
20
14
  plugins: { "check-file": checkFile },
21
15
  rules: {
22
16
  "check-file/filename-naming-convention": [
@@ -25,49 +19,18 @@ export function createNamingConfigs(featureRoot, prefixLibMapping) {
25
19
  ],
26
20
  },
27
21
  },
28
- ];
29
-
30
- // Non-shared features: only DB prefixes allowed for repositories
31
- if (dbPrefixKeys.length > 0) {
32
- const dbPrefixPattern = `@(${dbPrefixKeys.join("|")})`;
33
- configs.push({
22
+ {
34
23
  name: "naming/repositories",
35
24
  files: featuresGlob(featureRoot, "**/repositories/*.ts"),
36
- ignores: featuresGlob(featureRoot, "shared/repositories/*.ts"),
37
25
  plugins: { "check-file": checkFile },
38
26
  rules: {
39
27
  "check-file/filename-naming-convention": [
40
28
  "error",
41
- { "**/*.ts": `${dbPrefixPattern}.repo` },
29
+ { "**/*.ts": `${prefixPattern}.repo` },
42
30
  ],
43
31
  },
44
- });
45
- }
46
-
47
- configs.push({
48
- name: "naming/services-shared",
49
- files: featuresGlob(featureRoot, "shared/services/*.ts"),
50
- plugins: { "check-file": checkFile },
51
- rules: {
52
- "check-file/filename-naming-convention": [
53
- "error",
54
- { "**/*.ts": "@(shared).service" },
55
- ],
56
- },
57
- });
58
-
59
- // Shared feature: only "shared" prefix allowed
60
- configs.push({
61
- name: "naming/repositories-shared",
62
- files: featuresGlob(featureRoot, "shared/repositories/*.ts"),
63
- plugins: { "check-file": checkFile },
64
- rules: {
65
- "check-file/filename-naming-convention": [
66
- "error",
67
- { "**/*.ts": "@(shared).repo" },
68
- ],
69
32
  },
70
- });
33
+ ];
71
34
 
72
35
  configs.push(
73
36
  {
@@ -143,7 +106,6 @@ export function createNamingConfigs(featureRoot, prefixLibMapping) {
143
106
  {
144
107
  name: "naming/actions",
145
108
  files: featuresGlob(featureRoot, "**/actions/*.ts"),
146
- ignores: featuresGlob(featureRoot, "shared/actions/*.ts"),
147
109
  plugins: { "check-file": checkFile },
148
110
  rules: {
149
111
  "check-file/filename-naming-convention": [
@@ -152,17 +114,6 @@ export function createNamingConfigs(featureRoot, prefixLibMapping) {
152
114
  ],
153
115
  },
154
116
  },
155
- {
156
- name: "naming/actions-shared",
157
- files: featuresGlob(featureRoot, "shared/actions/*.ts"),
158
- plugins: { "check-file": checkFile },
159
- rules: {
160
- "check-file/filename-naming-convention": [
161
- "error",
162
- { "**/*.ts": "@(shared).action" },
163
- ],
164
- },
165
- },
166
117
  {
167
118
  name: "naming/actions-export",
168
119
  files: featuresGlob(featureRoot, "**/actions/*.ts"),