@monorepolint/rules 0.5.0-alpha.103 → 0.5.0-alpha.107

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.
Files changed (75) hide show
  1. package/.turbo/turbo-lint.log +34 -31
  2. package/.turbo/turbo-test.log +131 -124
  3. package/.turbo/turbo-transpile-typescript.log +9 -9
  4. package/build/js/chunk-GMT7IGKM.js +25 -0
  5. package/build/js/chunk-GMT7IGKM.js.map +1 -0
  6. package/build/js/index.js +61 -94
  7. package/build/js/index.js.map +1 -1
  8. package/build/js/public/util.js +7 -0
  9. package/build/js/public/util.js.map +1 -0
  10. package/build/tsconfig.tsbuildinfo +1 -1
  11. package/build/types/alphabeticalDependencies.d.ts +1 -15
  12. package/build/types/alphabeticalDependencies.d.ts.map +1 -1
  13. package/build/types/alphabeticalScripts.d.ts +1 -15
  14. package/build/types/alphabeticalScripts.d.ts.map +1 -1
  15. package/build/types/bannedDependencies.d.ts +36 -104
  16. package/build/types/bannedDependencies.d.ts.map +1 -1
  17. package/build/types/consistentDependencies.d.ts +3 -23
  18. package/build/types/consistentDependencies.d.ts.map +1 -1
  19. package/build/types/consistentVersions.d.ts +8 -34
  20. package/build/types/consistentVersions.d.ts.map +1 -1
  21. package/build/types/fileContents.d.ts +17 -89
  22. package/build/types/fileContents.d.ts.map +1 -1
  23. package/build/types/index.d.ts +13 -13
  24. package/build/types/index.d.ts.map +1 -1
  25. package/build/types/mustSatisfyPeerDependencies.d.ts +189 -483
  26. package/build/types/mustSatisfyPeerDependencies.d.ts.map +1 -1
  27. package/build/types/nestedWorkspaces.d.ts +1 -15
  28. package/build/types/nestedWorkspaces.d.ts.map +1 -1
  29. package/build/types/packageEntry.d.ts +30 -91
  30. package/build/types/packageEntry.d.ts.map +1 -1
  31. package/build/types/packageOrder.d.ts +3 -23
  32. package/build/types/packageOrder.d.ts.map +1 -1
  33. package/build/types/packageScript.d.ts +16 -68
  34. package/build/types/packageScript.d.ts.map +1 -1
  35. package/build/types/public/util.d.ts +2 -0
  36. package/build/types/public/util.d.ts.map +1 -0
  37. package/build/types/requireDependency.d.ts +22 -86
  38. package/build/types/requireDependency.d.ts.map +1 -1
  39. package/build/types/standardTsconfig.d.ts +9 -69
  40. package/build/types/standardTsconfig.d.ts.map +1 -1
  41. package/build/types/util/makeRule.d.ts +13 -0
  42. package/build/types/util/makeRule.d.ts.map +1 -0
  43. package/package.json +18 -12
  44. package/src/__tests__/alphabeticalScripts.spec.ts +2 -2
  45. package/src/__tests__/bannedDependencies.spec.ts +1 -3
  46. package/src/__tests__/consistentDependencies.spec.ts +2 -2
  47. package/src/__tests__/consistentVersions.spec.ts +1 -1
  48. package/src/__tests__/fileContents.spec.ts +16 -12
  49. package/src/__tests__/mustSatisfyPeerDependencies.spec.ts +1 -1
  50. package/src/__tests__/nestedWorkspaces.spec.ts +1 -1
  51. package/src/__tests__/packageEntry.spec.ts +40 -30
  52. package/src/__tests__/packageOrder.spec.ts +20 -12
  53. package/src/__tests__/packageScript.spec.ts +55 -39
  54. package/src/__tests__/requireDependency.spec.ts +2 -2
  55. package/src/alphabeticalDependencies.ts +5 -7
  56. package/src/alphabeticalScripts.ts +5 -7
  57. package/src/bannedDependencies.ts +6 -8
  58. package/src/consistentDependencies.ts +6 -7
  59. package/src/consistentVersions.ts +5 -6
  60. package/src/fileContents.ts +7 -8
  61. package/src/index.ts +13 -13
  62. package/src/mustSatisfyPeerDependencies.ts +5 -9
  63. package/src/nestedWorkspaces.ts +6 -7
  64. package/src/packageEntry.ts +6 -7
  65. package/src/packageOrder.ts +6 -7
  66. package/src/packageScript.ts +5 -7
  67. package/src/public/util.ts +1 -0
  68. package/src/requireDependency.ts +6 -6
  69. package/src/standardTsconfig.ts +7 -9
  70. package/src/util/makeRule.ts +29 -0
  71. package/build/js/index.cjs +0 -1491
  72. package/build/js/index.cjs.map +0 -1
  73. package/build/types/util/createNewRuleConversion.d.ts +0 -30
  74. package/build/types/util/createNewRuleConversion.d.ts.map +0 -1
  75. package/src/util/createNewRuleConversion.ts +0 -38
@@ -1 +1 @@
1
- {"version":3,"file":"mustSatisfyPeerDependencies.d.ts","sourceRoot":"","sources":["../../src/mustSatisfyPeerDependencies.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAK9B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuKZ,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,OAAO,OAAO,CAGlE,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,QAAa,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oCAAoC,QAC0H,CAAC;AAE5K;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,yBAAyB,QACmL,CAAC;AAE1N;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,QACghB,CAAC;AAyNziB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAoFrF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAmEnE;AAoBD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC;AAC3D,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,UAAU,CAEnE"}
1
+ {"version":3,"file":"mustSatisfyPeerDependencies.d.ts","sourceRoot":"","sources":["../../src/mustSatisfyPeerDependencies.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAK9B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuKZ,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAItC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,QAAa,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oCAAoC,QAC0H,CAAC;AAE5K;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,yBAAyB,QACmL,CAAC;AAE1N;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,QACghB,CAAC;AAyNziB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAoFrF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAmEnE;AAoBD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC;AAC3D,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,UAAU,CAEnE"}
@@ -4,21 +4,7 @@
4
4
  * Licensed under the MIT license. See LICENSE file in the project root for details.
5
5
  *
6
6
  */
7
- import { Context, RuleModule } from "@monorepolint/config";
8
7
  import * as r from "runtypes";
9
8
  export declare const Options: r.Literal<undefined>;
10
- type Options = r.Static<typeof Options>;
11
- export declare const nestedWorkspaces: RuleModule<typeof Options>;
12
- export declare const NestedWorkspaces: {
13
- new (ruleEntry: import("@monorepolint/config").RuleEntry<undefined>): {
14
- readonly id: string;
15
- options: undefined;
16
- readonly name: string;
17
- checkFunc: import("@monorepolint/config").Checker<r.Literal<undefined>>;
18
- readonly optionsRuntype: r.Literal<undefined>;
19
- readonly ruleEntry: import("@monorepolint/config").RuleEntry<undefined>;
20
- check: (context: Context) => void | Promise<void>;
21
- };
22
- };
23
- export {};
9
+ export declare const nestedWorkspaces: (ruleEntry: import("@monorepolint/config").RuleEntry<undefined>) => import("@monorepolint/config").RuleModule<r.Literal<undefined>>;
24
10
  //# sourceMappingURL=nestedWorkspaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nestedWorkspaces.d.ts","sourceRoot":"","sources":["../../src/nestedWorkspaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,eAAO,MAAM,OAAO,sBAAc,CAAC;AAEnC,KAAK,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAGxC,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,OAAO,OAAO,CAyCvD,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;CAAgE,CAAC"}
1
+ {"version":3,"file":"nestedWorkspaces.d.ts","sourceRoot":"","sources":["../../src/nestedWorkspaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,eAAO,MAAM,OAAO,sBAAc,CAAC;AAKnC,eAAO,MAAM,gBAAgB,qIA0C3B,CAAC"}
@@ -4,7 +4,6 @@
4
4
  * Licensed under the MIT license. See LICENSE file in the project root for details.
5
5
  *
6
6
  */
7
- import { Context, RuleModule } from "@monorepolint/config";
8
7
  import * as r from "runtypes";
9
8
  export declare const Options: r.Union<[r.Intersect<[r.Record<{
10
9
  entries: r.Dictionary<r.Unknown, string | number | symbol>;
@@ -19,97 +18,37 @@ export declare const Options: r.Union<[r.Intersect<[r.Record<{
19
18
  entriesExist: r.Array<r.String, false>;
20
19
  }, false>]>;
21
20
  export type Options = r.Static<typeof Options>;
22
- export declare const packageEntry: RuleModule<typeof Options>;
23
- export declare const PackageEntry: {
24
- new (ruleEntry: import("@monorepolint/config").RuleEntry<({
25
- entries: {
26
- [x: string]: unknown;
27
- [x: number]: unknown;
28
- [x: symbol]: unknown;
29
- };
30
- } & {
31
- entriesExist?: undefined;
32
- }) | ({
33
- entriesExist: string[];
34
- } & {
35
- entries?: undefined;
36
- }) | {
37
- entries: {
38
- [x: string]: unknown;
39
- [x: number]: unknown;
40
- [x: symbol]: unknown;
41
- };
42
- entriesExist: string[];
43
- }>): {
44
- readonly id: string;
45
- options: ({
46
- entries: {
47
- [x: string]: unknown;
48
- [x: number]: unknown;
49
- [x: symbol]: unknown;
50
- };
51
- } & {
52
- entriesExist?: undefined;
53
- }) | ({
54
- entriesExist: string[];
55
- } & {
56
- entries?: undefined;
57
- }) | {
58
- entries: {
59
- [x: string]: unknown;
60
- [x: number]: unknown;
61
- [x: symbol]: unknown;
62
- };
63
- entriesExist: string[];
64
- } | undefined;
65
- readonly name: string;
66
- checkFunc: import("@monorepolint/config").Checker<r.Union<[r.Intersect<[r.Record<{
67
- entries: r.Dictionary<r.Unknown, string | number | symbol>;
68
- }, false>, r.Partial<{
69
- entriesExist: r.Literal<undefined>;
70
- }, false>]>, r.Intersect<[r.Record<{
71
- entriesExist: r.Array<r.String, false>;
72
- }, false>, r.Partial<{
73
- entries: r.Literal<undefined>;
74
- }, false>]>, r.Record<{
75
- entries: r.Dictionary<r.Unknown, string | number | symbol>;
76
- entriesExist: r.Array<r.String, false>;
77
- }, false>]>>;
78
- readonly optionsRuntype: r.Union<[r.Intersect<[r.Record<{
79
- entries: r.Dictionary<r.Unknown, string | number | symbol>;
80
- }, false>, r.Partial<{
81
- entriesExist: r.Literal<undefined>;
82
- }, false>]>, r.Intersect<[r.Record<{
83
- entriesExist: r.Array<r.String, false>;
84
- }, false>, r.Partial<{
85
- entries: r.Literal<undefined>;
86
- }, false>]>, r.Record<{
87
- entries: r.Dictionary<r.Unknown, string | number | symbol>;
88
- entriesExist: r.Array<r.String, false>;
89
- }, false>]>;
90
- readonly ruleEntry: import("@monorepolint/config").RuleEntry<({
91
- entries: {
92
- [x: string]: unknown;
93
- [x: number]: unknown;
94
- [x: symbol]: unknown;
95
- };
96
- } & {
97
- entriesExist?: undefined;
98
- }) | ({
99
- entriesExist: string[];
100
- } & {
101
- entries?: undefined;
102
- }) | {
103
- entries: {
104
- [x: string]: unknown;
105
- [x: number]: unknown;
106
- [x: symbol]: unknown;
107
- };
108
- entriesExist: string[];
109
- }>;
110
- check: (context: Context) => void | Promise<void>;
21
+ export declare const packageEntry: (ruleEntry: import("@monorepolint/config").RuleEntry<({
22
+ entries: {
23
+ [x: string]: unknown;
24
+ [x: number]: unknown;
25
+ [x: symbol]: unknown;
111
26
  };
112
- };
27
+ } & {
28
+ entriesExist?: undefined;
29
+ }) | ({
30
+ entriesExist: string[];
31
+ } & {
32
+ entries?: undefined;
33
+ }) | {
34
+ entries: {
35
+ [x: string]: unknown;
36
+ [x: number]: unknown;
37
+ [x: symbol]: unknown;
38
+ };
39
+ entriesExist: string[];
40
+ }>) => import("@monorepolint/config").RuleModule<r.Union<[r.Intersect<[r.Record<{
41
+ entries: r.Dictionary<r.Unknown, string | number | symbol>;
42
+ }, false>, r.Partial<{
43
+ entriesExist: r.Literal<undefined>;
44
+ }, false>]>, r.Intersect<[r.Record<{
45
+ entriesExist: r.Array<r.String, false>;
46
+ }, false>, r.Partial<{
47
+ entries: r.Literal<undefined>;
48
+ }, false>]>, r.Record<{
49
+ entries: r.Dictionary<r.Unknown, string | number | symbol>;
50
+ entriesExist: r.Array<r.String, false>;
51
+ }, false>]>>;
113
52
  export declare function createStandardizedEntryErrorMessage(key: string): string;
114
53
  export declare function createExpectedEntryErrorMessage(key: string): string;
115
54
  //# sourceMappingURL=packageEntry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageEntry.d.ts","sourceRoot":"","sources":["../../src/packageEntry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,eAAO,MAAM,OAAO;;;;;;;;;;;WAuBnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,OAAO,OAAO,CAyCnD,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwD,CAAC;AAElF,wBAAgB,mCAAmC,CAAC,GAAG,EAAE,MAAM,UAE9D;AAED,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,MAAM,UAE1D"}
1
+ {"version":3,"file":"packageEntry.d.ts","sourceRoot":"","sources":["../../src/packageEntry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,eAAO,MAAM,OAAO;;;;;;;;;;;WAuBnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA0CvB,CAAC;AAEH,wBAAgB,mCAAmC,CAAC,GAAG,EAAE,MAAM,UAE9D;AAED,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,MAAM,UAE1D"}
@@ -4,30 +4,10 @@
4
4
  * Licensed under the MIT license. See LICENSE file in the project root for details.
5
5
  *
6
6
  */
7
- import { Context, RuleModule } from "@monorepolint/config";
8
7
  import * as r from "runtypes";
9
- export declare const packageOrder: RuleModule<r.Union<[r.Record<{
8
+ export declare const packageOrder: (ruleEntry: import("@monorepolint/config").RuleEntry<{
9
+ order: string[] | ((...args: any[]) => any);
10
+ } | undefined>) => import("@monorepolint/config").RuleModule<r.Union<[r.Record<{
10
11
  order: r.Union<[r.Array<r.String, false>, r.Function]>;
11
12
  }, false>, r.Literal<undefined>]>>;
12
- export declare const PackageOrder: {
13
- new (ruleEntry: import("@monorepolint/config").RuleEntry<{
14
- order: ((...args: any[]) => any) | string[];
15
- } | undefined>): {
16
- readonly id: string;
17
- options: {
18
- order: ((...args: any[]) => any) | string[];
19
- } | undefined;
20
- readonly name: string;
21
- checkFunc: import("@monorepolint/config").Checker<r.Union<[r.Record<{
22
- order: r.Union<[r.Array<r.String, false>, r.Function]>;
23
- }, false>, r.Literal<undefined>]>>;
24
- readonly optionsRuntype: r.Union<[r.Record<{
25
- order: r.Union<[r.Array<r.String, false>, r.Function]>;
26
- }, false>, r.Literal<undefined>]>;
27
- readonly ruleEntry: import("@monorepolint/config").RuleEntry<{
28
- order: ((...args: any[]) => any) | string[];
29
- } | undefined>;
30
- check: (context: Context) => void | Promise<void>;
31
- };
32
- };
33
13
  //# sourceMappingURL=packageOrder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageOrder.d.ts","sourceRoot":"","sources":["../../src/packageOrder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AA4C9B,eAAO,MAAM,YAAY;;kCA8BM,CAAC;AAEhC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;CAAwD,CAAC"}
1
+ {"version":3,"file":"packageOrder.d.ts","sourceRoot":"","sources":["../../src/packageOrder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AA4C9B,eAAO,MAAM,YAAY;;;;kCA+BvB,CAAC"}
@@ -4,7 +4,6 @@
4
4
  * Licensed under the MIT license. See LICENSE file in the project root for details.
5
5
  *
6
6
  */
7
- import { Context, RuleModule } from "@monorepolint/config";
8
7
  import * as r from "runtypes";
9
8
  export declare const Options: r.Record<{
10
9
  scripts: r.Dictionary<r.Union<[r.String, r.Record<{
@@ -14,76 +13,25 @@ export declare const Options: r.Record<{
14
13
  }, false>;
15
14
  export type Options = r.Static<typeof Options>;
16
15
  export declare const MSG_NO_SCRIPTS_BLOCK = "No scripts block in package.json";
17
- export declare const packageScript: RuleModule<r.Record<{
16
+ export declare const packageScript: (ruleEntry: import("@monorepolint/config").RuleEntry<{
17
+ scripts: {
18
+ [x: string]: string | {
19
+ options: (string | undefined)[];
20
+ fixValue?: string | false | undefined;
21
+ };
22
+ [x: number]: string | {
23
+ options: (string | undefined)[];
24
+ fixValue?: string | false | undefined;
25
+ };
26
+ [x: symbol]: string | {
27
+ options: (string | undefined)[];
28
+ fixValue?: string | false | undefined;
29
+ };
30
+ };
31
+ }>) => import("@monorepolint/config").RuleModule<r.Record<{
18
32
  scripts: r.Dictionary<r.Union<[r.String, r.Record<{
19
33
  options: r.Array<r.Union<[r.String, r.Literal<undefined>]>, false>;
20
34
  fixValue: r.Optional<r.Union<[r.String, r.Literal<undefined>, r.Literal<false>]>>;
21
35
  }, false>]>, string | number | symbol>;
22
36
  }, false>>;
23
- export declare const PackageScript: {
24
- new (ruleEntry: import("@monorepolint/config").RuleEntry<{
25
- scripts: {
26
- [x: string]: string | {
27
- options: (string | undefined)[];
28
- fixValue?: string | false | undefined;
29
- };
30
- [x: number]: string | {
31
- options: (string | undefined)[];
32
- fixValue?: string | false | undefined;
33
- };
34
- [x: symbol]: string | {
35
- options: (string | undefined)[];
36
- fixValue?: string | false | undefined;
37
- };
38
- };
39
- }>): {
40
- readonly id: string;
41
- options: {
42
- scripts: {
43
- [x: string]: string | {
44
- options: (string | undefined)[];
45
- fixValue?: string | false | undefined;
46
- };
47
- [x: number]: string | {
48
- options: (string | undefined)[];
49
- fixValue?: string | false | undefined;
50
- };
51
- [x: symbol]: string | {
52
- options: (string | undefined)[];
53
- fixValue?: string | false | undefined;
54
- };
55
- };
56
- } | undefined;
57
- readonly name: string;
58
- checkFunc: import("@monorepolint/config").Checker<r.Record<{
59
- scripts: r.Dictionary<r.Union<[r.String, r.Record<{
60
- options: r.Array<r.Union<[r.String, r.Literal<undefined>]>, false>;
61
- fixValue: r.Optional<r.Union<[r.String, r.Literal<undefined>, r.Literal<false>]>>;
62
- }, false>]>, string | number | symbol>;
63
- }, false>>;
64
- readonly optionsRuntype: r.Record<{
65
- scripts: r.Dictionary<r.Union<[r.String, r.Record<{
66
- options: r.Array<r.Union<[r.String, r.Literal<undefined>]>, false>;
67
- fixValue: r.Optional<r.Union<[r.String, r.Literal<undefined>, r.Literal<false>]>>;
68
- }, false>]>, string | number | symbol>;
69
- }, false>;
70
- readonly ruleEntry: import("@monorepolint/config").RuleEntry<{
71
- scripts: {
72
- [x: string]: string | {
73
- options: (string | undefined)[];
74
- fixValue?: string | false | undefined;
75
- };
76
- [x: number]: string | {
77
- options: (string | undefined)[];
78
- fixValue?: string | false | undefined;
79
- };
80
- [x: symbol]: string | {
81
- options: (string | undefined)[];
82
- fixValue?: string | false | undefined;
83
- };
84
- };
85
- }>;
86
- check: (context: Context) => void | Promise<void>;
87
- };
88
- };
89
37
  //# sourceMappingURL=packageScript.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageScript.d.ts","sourceRoot":"","sources":["../../src/packageScript.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAI3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,eAAO,MAAM,OAAO;;;;;SAUlB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,eAAO,MAAM,aAAa;;;;;UAqEK,CAAC;AAEhC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0D,CAAC"}
1
+ {"version":3,"file":"packageScript.d.ts","sourceRoot":"","sources":["../../src/packageScript.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,eAAO,MAAM,OAAO;;;;;SAUlB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;UAsExB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { makeRule } from "../util/makeRule.js";
2
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/public/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
@@ -4,96 +4,32 @@
4
4
  * Licensed under the MIT license. See LICENSE file in the project root for details.
5
5
  *
6
6
  */
7
- import { Context, RuleModule } from "@monorepolint/config";
8
7
  import * as r from "runtypes";
9
- export declare const requireDependency: RuleModule<r.Partial<{
8
+ export declare const requireDependency: (ruleEntry: import("@monorepolint/config").RuleEntry<{
9
+ dependencies?: {
10
+ [x: string]: string;
11
+ [x: number]: string;
12
+ [x: symbol]: string;
13
+ } | undefined;
14
+ devDependencies?: {
15
+ [x: string]: string;
16
+ [x: number]: string;
17
+ [x: symbol]: string;
18
+ } | undefined;
19
+ peerDependencies?: {
20
+ [x: string]: string;
21
+ [x: number]: string;
22
+ [x: symbol]: string;
23
+ } | undefined;
24
+ optionalDependencies?: {
25
+ [x: string]: string;
26
+ [x: number]: string;
27
+ [x: symbol]: string;
28
+ } | undefined;
29
+ }>) => import("@monorepolint/config").RuleModule<r.Partial<{
10
30
  dependencies: r.Dictionary<r.String, string | number | symbol>;
11
31
  devDependencies: r.Dictionary<r.String, string | number | symbol>;
12
32
  peerDependencies: r.Dictionary<r.String, string | number | symbol>;
13
33
  optionalDependencies: r.Dictionary<r.String, string | number | symbol>;
14
34
  }, false>>;
15
- export declare const RequireDependency: {
16
- new (ruleEntry: import("@monorepolint/config").RuleEntry<{
17
- dependencies?: {
18
- [x: string]: string;
19
- [x: number]: string;
20
- [x: symbol]: string;
21
- } | undefined;
22
- devDependencies?: {
23
- [x: string]: string;
24
- [x: number]: string;
25
- [x: symbol]: string;
26
- } | undefined;
27
- peerDependencies?: {
28
- [x: string]: string;
29
- [x: number]: string;
30
- [x: symbol]: string;
31
- } | undefined;
32
- optionalDependencies?: {
33
- [x: string]: string;
34
- [x: number]: string;
35
- [x: symbol]: string;
36
- } | undefined;
37
- }>): {
38
- readonly id: string;
39
- options: {
40
- dependencies?: {
41
- [x: string]: string;
42
- [x: number]: string;
43
- [x: symbol]: string;
44
- } | undefined;
45
- devDependencies?: {
46
- [x: string]: string;
47
- [x: number]: string;
48
- [x: symbol]: string;
49
- } | undefined;
50
- peerDependencies?: {
51
- [x: string]: string;
52
- [x: number]: string;
53
- [x: symbol]: string;
54
- } | undefined;
55
- optionalDependencies?: {
56
- [x: string]: string;
57
- [x: number]: string;
58
- [x: symbol]: string;
59
- } | undefined;
60
- } | undefined;
61
- readonly name: string;
62
- checkFunc: import("@monorepolint/config").Checker<r.Partial<{
63
- dependencies: r.Dictionary<r.String, string | number | symbol>;
64
- devDependencies: r.Dictionary<r.String, string | number | symbol>;
65
- peerDependencies: r.Dictionary<r.String, string | number | symbol>;
66
- optionalDependencies: r.Dictionary<r.String, string | number | symbol>;
67
- }, false>>;
68
- readonly optionsRuntype: r.Partial<{
69
- dependencies: r.Dictionary<r.String, string | number | symbol>;
70
- devDependencies: r.Dictionary<r.String, string | number | symbol>;
71
- peerDependencies: r.Dictionary<r.String, string | number | symbol>;
72
- optionalDependencies: r.Dictionary<r.String, string | number | symbol>;
73
- }, false>;
74
- readonly ruleEntry: import("@monorepolint/config").RuleEntry<{
75
- dependencies?: {
76
- [x: string]: string;
77
- [x: number]: string;
78
- [x: symbol]: string;
79
- } | undefined;
80
- devDependencies?: {
81
- [x: string]: string;
82
- [x: number]: string;
83
- [x: symbol]: string;
84
- } | undefined;
85
- peerDependencies?: {
86
- [x: string]: string;
87
- [x: number]: string;
88
- [x: symbol]: string;
89
- } | undefined;
90
- optionalDependencies?: {
91
- [x: string]: string;
92
- [x: number]: string;
93
- [x: symbol]: string;
94
- } | undefined;
95
- }>;
96
- check: (context: Context) => void | Promise<void>;
97
- };
98
- };
99
35
  //# sourceMappingURL=requireDependency.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"requireDependency.d.ts","sourceRoot":"","sources":["../../src/requireDependency.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAW9B,eAAO,MAAM,iBAAiB;;;;;UA+CC,CAAC;AAEhC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAkE,CAAC"}
1
+ {"version":3,"file":"requireDependency.d.ts","sourceRoot":"","sources":["../../src/requireDependency.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAY9B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;UAgD5B,CAAC"}
@@ -4,7 +4,6 @@
4
4
  * Licensed under the MIT license. See LICENSE file in the project root for details.
5
5
  *
6
6
  */
7
- import { Context, RuleModule } from "@monorepolint/config";
8
7
  import * as r from "runtypes";
9
8
  declare const Options: r.Constraint<r.Partial<{
10
9
  file: r.String;
@@ -25,7 +24,15 @@ declare const Options: r.Constraint<r.Partial<{
25
24
  }, unknown>;
26
25
  export interface Options extends r.Static<typeof Options> {
27
26
  }
28
- export declare const standardTsconfig: RuleModule<r.Constraint<r.Partial<{
27
+ export declare const standardTsconfig: (ruleEntry: import("@monorepolint/config").RuleEntry<{
28
+ file?: string | undefined;
29
+ generator?: ((...args: any[]) => any) | undefined;
30
+ tsconfigReferenceFile?: string | undefined;
31
+ template?: string | {} | undefined;
32
+ templateFile?: string | undefined;
33
+ excludedReferences?: string[] | undefined;
34
+ additionalReferences?: string[] | undefined;
35
+ }>) => import("@monorepolint/config").RuleModule<r.Constraint<r.Partial<{
29
36
  file: r.String;
30
37
  generator: r.Function;
31
38
  tsconfigReferenceFile: r.String;
@@ -42,72 +49,5 @@ export declare const standardTsconfig: RuleModule<r.Constraint<r.Partial<{
42
49
  excludedReferences?: string[] | undefined;
43
50
  additionalReferences?: string[] | undefined;
44
51
  }, unknown>>;
45
- export declare const StandardTsConfig: {
46
- new (ruleEntry: import("@monorepolint/config").RuleEntry<{
47
- file?: string | undefined;
48
- generator?: ((...args: any[]) => any) | undefined;
49
- tsconfigReferenceFile?: string | undefined;
50
- template?: string | {} | undefined;
51
- templateFile?: string | undefined;
52
- excludedReferences?: string[] | undefined;
53
- additionalReferences?: string[] | undefined;
54
- }>): {
55
- readonly id: string;
56
- options: {
57
- file?: string | undefined;
58
- generator?: ((...args: any[]) => any) | undefined;
59
- tsconfigReferenceFile?: string | undefined;
60
- template?: string | {} | undefined;
61
- templateFile?: string | undefined;
62
- excludedReferences?: string[] | undefined;
63
- additionalReferences?: string[] | undefined;
64
- } | undefined;
65
- readonly name: string;
66
- checkFunc: import("@monorepolint/config").Checker<r.Constraint<r.Partial<{
67
- file: r.String;
68
- generator: r.Function;
69
- tsconfigReferenceFile: r.String;
70
- template: r.Union<[r.Record<{}, false>, r.String]>;
71
- templateFile: r.String;
72
- excludedReferences: r.Union<[r.Array<r.String, false>, r.Literal<undefined>]>;
73
- additionalReferences: r.Union<[r.Array<r.String, false>, r.Literal<undefined>]>;
74
- }, false>, {
75
- file?: string | undefined;
76
- generator?: ((...args: any[]) => any) | undefined;
77
- tsconfigReferenceFile?: string | undefined;
78
- template?: string | {} | undefined;
79
- templateFile?: string | undefined;
80
- excludedReferences?: string[] | undefined;
81
- additionalReferences?: string[] | undefined;
82
- }, unknown>>;
83
- readonly optionsRuntype: r.Constraint<r.Partial<{
84
- file: r.String;
85
- generator: r.Function;
86
- tsconfigReferenceFile: r.String;
87
- template: r.Union<[r.Record<{}, false>, r.String]>;
88
- templateFile: r.String;
89
- excludedReferences: r.Union<[r.Array<r.String, false>, r.Literal<undefined>]>;
90
- additionalReferences: r.Union<[r.Array<r.String, false>, r.Literal<undefined>]>;
91
- }, false>, {
92
- file?: string | undefined;
93
- generator?: ((...args: any[]) => any) | undefined;
94
- tsconfigReferenceFile?: string | undefined;
95
- template?: string | {} | undefined;
96
- templateFile?: string | undefined;
97
- excludedReferences?: string[] | undefined;
98
- additionalReferences?: string[] | undefined;
99
- }, unknown>;
100
- readonly ruleEntry: import("@monorepolint/config").RuleEntry<{
101
- file?: string | undefined;
102
- generator?: ((...args: any[]) => any) | undefined;
103
- tsconfigReferenceFile?: string | undefined;
104
- template?: string | {} | undefined;
105
- templateFile?: string | undefined;
106
- excludedReferences?: string[] | undefined;
107
- additionalReferences?: string[] | undefined;
108
- }>;
109
- check: (context: Context) => void | Promise<void>;
110
- };
111
- };
112
52
  export {};
113
53
  //# sourceMappingURL=standardTsconfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"standardTsconfig.d.ts","sourceRoot":"","sources":["../../src/standardTsconfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAK3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAI9B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;WAuBT,CAAC;AAEL,MAAM,WAAW,OAAQ,SAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC;CAAG;AAE5D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;YAiCE,CAAC;AAEhC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgE,CAAC"}
1
+ {"version":3,"file":"standardTsconfig.d.ts","sourceRoot":"","sources":["../../src/standardTsconfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAK9B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;WAuBT,CAAC;AAEL,MAAM,WAAW,OAAQ,SAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC;CAAG;AAE5D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;YAkC3B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Context, RuleEntry, RuleModule } from "@monorepolint/config";
2
+ import * as r from "runtypes";
3
+ export declare function makeRule<T extends r.Runtype<unknown>>({ name, check, optionsRuntype, printStats, }: {
4
+ name: string;
5
+ check: (context: Context, options: r.Static<T>, extra: {
6
+ id: string;
7
+ }) => Promise<unknown> | unknown;
8
+ optionsRuntype: T;
9
+ printStats?: () => void;
10
+ }): RuleFunction<T>;
11
+ type RuleFunction<T extends r.Runtype<any>> = (ruleEntry: RuleEntry<r.Static<T>>) => RuleModule<T>;
12
+ export {};
13
+ //# sourceMappingURL=makeRule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeRule.d.ts","sourceRoot":"","sources":["../../../src/util/makeRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EACrD,IAAI,EACJ,KAAK,EACL,cAAc,EACd,UAAU,GACX,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACrG,cAAc,EAAE,CAAC,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,GAAG,YAAY,CAAC,CAAC,CAAC,CAYlB;AAED,KAAK,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monorepolint/rules",
3
- "version": "0.5.0-alpha.103+241c1b6",
3
+ "version": "0.5.0-alpha.107+27faf77",
4
4
  "author": "Eric L Anderson (https://github.com/ericanderson)",
5
5
  "contributors": [
6
6
  "Mac Lockard (https://github.com/maclockard)"
@@ -11,10 +11,16 @@
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./build/types/index.d.ts",
14
- "import": "./build/js/index.js",
15
- "require": "./build/js/index.cjs"
14
+ "import": "./build/js/index.js"
15
+ },
16
+ "./*": {
17
+ "types": "./build/types/public/*.d.ts",
18
+ "import": "./build/js/public/*.js"
16
19
  }
17
20
  },
21
+ "engines": {
22
+ "node": ">=16"
23
+ },
18
24
  "scripts": {
19
25
  "clean": "rm -rf build dist lib node_modules *.tgz tsconfig.tsbuildinfo",
20
26
  "compile-typescript": "tsc --build",
@@ -24,15 +30,15 @@
24
30
  "transpile-typescript": "tsup --config ../../tsup.config.cjs"
25
31
  },
26
32
  "dependencies": {
27
- "@monorepolint/config": "^0.5.0-alpha.103+241c1b6",
28
- "@monorepolint/core": "^0.5.0-alpha.103+241c1b6",
29
- "@monorepolint/utils": "^0.5.0-alpha.103+241c1b6",
33
+ "@monorepolint/config": "^0.5.0-alpha.107+27faf77",
34
+ "@monorepolint/core": "^0.5.0-alpha.107+27faf77",
35
+ "@monorepolint/utils": "^0.5.0-alpha.107+27faf77",
30
36
  "globby": "^13.1.2",
31
37
  "jest-diff": "^29.3.1",
32
38
  "resolve-package-path": "^4.0.3",
33
39
  "runtypes": "^6.6.0",
34
40
  "semver": "^7.3.8",
35
- "tslib": "^2.3.1"
41
+ "tslib": "^2.5.0"
36
42
  },
37
43
  "devDependencies": {
38
44
  "@jest/globals": "^29.3.1",
@@ -43,15 +49,15 @@
43
49
  "@typescript-eslint/parser": "^5.45.1",
44
50
  "eslint": "^8.29.0",
45
51
  "jest": "^29.3.1",
46
- "prettier": "^2.8.0",
52
+ "prettier": "^2.8.3",
47
53
  "tmp": "^0.2.1",
48
- "ts-jest": "^29.0.3",
49
- "tslib": "^2.4.1",
54
+ "ts-jest": "^29.0.5",
55
+ "tslib": "^2.5.0",
50
56
  "tsup": "^6.5.0",
51
- "typescript": "^4.9.3"
57
+ "typescript": "^4.9.5"
52
58
  },
53
59
  "publishConfig": {
54
60
  "access": "public"
55
61
  },
56
- "gitHead": "241c1b6bcf55ee188dd2ee3f652de4c91e0817aa"
62
+ "gitHead": "27faf7744e0ea03e0609e09747c2c314b56f6e88"
57
63
  }