@luma-layered-ts/eslint-plugin 1.5.0 → 2.0.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/lib/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import type { TSESLint } from "@typescript-eslint/utils";
2
2
  export declare const rules: {
3
- server: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "ioGlobal" | "schemaBoundary" | "encodedMethod", [{
4
- [x: string]: never;
3
+ server: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "ioGlobal" | "schemaBoundary" | "encodedMethod" | "stringConstruction" | "adapterImpure" | "adapterNodeBuiltin" | "adapterPackageNotAllowed" | "adapterAmbientLocale", [{
4
+ readonly adapterAllowedPackages?: readonly string[];
5
5
  }], unknown, TSESLint.RuleListener> & {
6
6
  name: string;
7
7
  };
8
- react: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod" | "componentParseMethod", [{
8
+ react: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod" | "componentParseMethod", [{
9
9
  [x: string]: never;
10
10
  }], unknown, TSESLint.RuleListener> & {
11
11
  name: string;
12
12
  };
13
- next: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod", [{
13
+ next: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod", [{
14
14
  [x: string]: never;
15
15
  }], unknown, TSESLint.RuleListener> & {
16
16
  name: string;
@@ -20,23 +20,38 @@ export declare const rules: {
20
20
  }], unknown, TSESLint.RuleListener> & {
21
21
  name: string;
22
22
  };
23
+ "strict-collection": TSESLint.RuleModule<"useStrictCollection" | "noMutableCollection", [{
24
+ [x: string]: never;
25
+ }], unknown, TSESLint.RuleListener> & {
26
+ name: string;
27
+ };
28
+ "codec-placement": TSESLint.RuleModule<"codecOutsideAdapter" | "displayTextOutsideAdapter", [{
29
+ [x: string]: never;
30
+ }], unknown, TSESLint.RuleListener> & {
31
+ name: string;
32
+ };
33
+ "require-unsafe-dir": TSESLint.RuleModule<"directiveOutsideUnsafeDir" | "effectOutsideUnsafeDir" | "lifecycleOutsideUnsafeDir" | "effectEscape" | "reactReexportAll" | "dynamicReactAccess", [{
34
+ [x: string]: never;
35
+ }], unknown, TSESLint.RuleListener> & {
36
+ name: string;
37
+ };
23
38
  };
24
39
  export declare const configs: {
25
40
  recommended: {
26
41
  plugins: {
27
42
  "@luma-layered-ts": {
28
43
  rules: {
29
- server: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "ioGlobal" | "schemaBoundary" | "encodedMethod", [{
30
- [x: string]: never;
44
+ server: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "ioGlobal" | "schemaBoundary" | "encodedMethod" | "stringConstruction" | "adapterImpure" | "adapterNodeBuiltin" | "adapterPackageNotAllowed" | "adapterAmbientLocale", [{
45
+ readonly adapterAllowedPackages?: readonly string[];
31
46
  }], unknown, TSESLint.RuleListener> & {
32
47
  name: string;
33
48
  };
34
- react: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod" | "componentParseMethod", [{
49
+ react: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod" | "componentParseMethod", [{
35
50
  [x: string]: never;
36
51
  }], unknown, TSESLint.RuleListener> & {
37
52
  name: string;
38
53
  };
39
- next: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod", [{
54
+ next: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod", [{
40
55
  [x: string]: never;
41
56
  }], unknown, TSESLint.RuleListener> & {
42
57
  name: string;
@@ -46,30 +61,51 @@ export declare const configs: {
46
61
  }], unknown, TSESLint.RuleListener> & {
47
62
  name: string;
48
63
  };
64
+ "strict-collection": TSESLint.RuleModule<"useStrictCollection" | "noMutableCollection", [{
65
+ [x: string]: never;
66
+ }], unknown, TSESLint.RuleListener> & {
67
+ name: string;
68
+ };
69
+ "codec-placement": TSESLint.RuleModule<"codecOutsideAdapter" | "displayTextOutsideAdapter", [{
70
+ [x: string]: never;
71
+ }], unknown, TSESLint.RuleListener> & {
72
+ name: string;
73
+ };
74
+ "require-unsafe-dir": TSESLint.RuleModule<"directiveOutsideUnsafeDir" | "effectOutsideUnsafeDir" | "lifecycleOutsideUnsafeDir" | "effectEscape" | "reactReexportAll" | "dynamicReactAccess", [{
75
+ [x: string]: never;
76
+ }], unknown, TSESLint.RuleListener> & {
77
+ name: string;
78
+ };
49
79
  };
50
80
  };
51
81
  };
82
+ linterOptions: {
83
+ noInlineConfig: true;
84
+ };
52
85
  rules: {
53
86
  "@luma-layered-ts/server": "error";
54
87
  "@luma-layered-ts/react": "error";
55
88
  "@luma-layered-ts/require-layer": "error";
89
+ "@luma-layered-ts/strict-collection": "error";
90
+ "@luma-layered-ts/codec-placement": "error";
91
+ "@luma-layered-ts/require-unsafe-dir": "error";
56
92
  };
57
93
  };
58
94
  "recommended-next": {
59
95
  plugins: {
60
96
  "@luma-layered-ts": {
61
97
  rules: {
62
- server: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "ioGlobal" | "schemaBoundary" | "encodedMethod", [{
63
- [x: string]: never;
98
+ server: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "ioGlobal" | "schemaBoundary" | "encodedMethod" | "stringConstruction" | "adapterImpure" | "adapterNodeBuiltin" | "adapterPackageNotAllowed" | "adapterAmbientLocale", [{
99
+ readonly adapterAllowedPackages?: readonly string[];
64
100
  }], unknown, TSESLint.RuleListener> & {
65
101
  name: string;
66
102
  };
67
- react: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod" | "componentParseMethod", [{
103
+ react: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod" | "componentParseMethod", [{
68
104
  [x: string]: never;
69
105
  }], unknown, TSESLint.RuleListener> & {
70
106
  name: string;
71
107
  };
72
- next: TSESLint.RuleModule<"importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod", [{
108
+ next: TSESLint.RuleModule<"noDate" | "importViolation" | "importNonLayer" | "encodedGlobal" | "schemaBoundary" | "encodedMethod", [{
73
109
  [x: string]: never;
74
110
  }], unknown, TSESLint.RuleListener> & {
75
111
  name: string;
@@ -79,14 +115,42 @@ export declare const configs: {
79
115
  }], unknown, TSESLint.RuleListener> & {
80
116
  name: string;
81
117
  };
118
+ "strict-collection": TSESLint.RuleModule<"useStrictCollection" | "noMutableCollection", [{
119
+ [x: string]: never;
120
+ }], unknown, TSESLint.RuleListener> & {
121
+ name: string;
122
+ };
123
+ "codec-placement": TSESLint.RuleModule<"codecOutsideAdapter" | "displayTextOutsideAdapter", [{
124
+ [x: string]: never;
125
+ }], unknown, TSESLint.RuleListener> & {
126
+ name: string;
127
+ };
128
+ "require-unsafe-dir": TSESLint.RuleModule<"directiveOutsideUnsafeDir" | "effectOutsideUnsafeDir" | "lifecycleOutsideUnsafeDir" | "effectEscape" | "reactReexportAll" | "dynamicReactAccess", [{
129
+ [x: string]: never;
130
+ }], unknown, TSESLint.RuleListener> & {
131
+ name: string;
132
+ };
82
133
  };
83
134
  };
84
135
  };
136
+ linterOptions: {
137
+ noInlineConfig: true;
138
+ };
85
139
  rules: {
86
140
  "@luma-layered-ts/server": "error";
87
141
  "@luma-layered-ts/react": "error";
88
142
  "@luma-layered-ts/next": "error";
89
143
  "@luma-layered-ts/require-layer": "error";
144
+ "@luma-layered-ts/strict-collection": "error";
145
+ "@luma-layered-ts/codec-placement": "error";
146
+ "@luma-layered-ts/require-unsafe-dir": "error";
147
+ };
148
+ };
149
+ "unsafe-dir": {
150
+ files: string[];
151
+ linterOptions: {
152
+ noInlineConfig: false;
153
+ reportUnusedDisableDirectives: "error";
90
154
  };
91
155
  };
92
156
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;CAKjB,CAAC;AAMF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQjB,CAAC;AAaF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCnB,CAAC"}
package/lib/index.js CHANGED
@@ -8,35 +8,63 @@ const server_1 = __importDefault(require("./rules/server"));
8
8
  const react_1 = __importDefault(require("./rules/react"));
9
9
  const next_1 = __importDefault(require("./rules/next"));
10
10
  const require_layer_1 = __importDefault(require("./rules/require-layer"));
11
+ const strict_collection_1 = __importDefault(require("./rules/strict-collection"));
12
+ const codec_placement_1 = __importDefault(require("./rules/codec-placement"));
13
+ const require_unsafe_dir_1 = __importDefault(require("./rules/require-unsafe-dir"));
11
14
  exports.rules = {
12
15
  server: server_1.default,
13
16
  react: react_1.default,
14
17
  next: next_1.default,
15
18
  "require-layer": require_layer_1.default,
19
+ "strict-collection": strict_collection_1.default,
20
+ "codec-placement": codec_placement_1.default,
21
+ "require-unsafe-dir": require_unsafe_dir_1.default,
16
22
  };
17
23
  const plugin = {
18
24
  rules: exports.rules,
19
25
  };
26
+ // Inline config is disabled everywhere, so `/* eslint-disable */` cannot suppress
27
+ // require-unsafe-dir itself. The "unsafe-dir" config re-enables it under _unsafe_/.
28
+ // When adding a config here, keep linterOptions and the require-unsafe-dir rule in it.
29
+ const baseLinterOptions = {
30
+ noInlineConfig: true,
31
+ };
20
32
  exports.configs = {
21
33
  recommended: {
22
34
  plugins: {
23
35
  "@luma-layered-ts": plugin,
24
36
  },
37
+ linterOptions: baseLinterOptions,
25
38
  rules: {
26
39
  "@luma-layered-ts/server": "error",
27
40
  "@luma-layered-ts/react": "error",
28
41
  "@luma-layered-ts/require-layer": "error",
42
+ "@luma-layered-ts/strict-collection": "error",
43
+ "@luma-layered-ts/codec-placement": "error",
44
+ "@luma-layered-ts/require-unsafe-dir": "error",
29
45
  },
30
46
  },
31
47
  "recommended-next": {
32
48
  plugins: {
33
49
  "@luma-layered-ts": plugin,
34
50
  },
51
+ linterOptions: baseLinterOptions,
35
52
  rules: {
36
53
  "@luma-layered-ts/server": "error",
37
54
  "@luma-layered-ts/react": "error",
38
55
  "@luma-layered-ts/next": "error",
39
56
  "@luma-layered-ts/require-layer": "error",
57
+ "@luma-layered-ts/strict-collection": "error",
58
+ "@luma-layered-ts/codec-placement": "error",
59
+ "@luma-layered-ts/require-unsafe-dir": "error",
60
+ },
61
+ },
62
+ // Must come after recommended / recommended-next
63
+ "unsafe-dir": {
64
+ files: ["**/_unsafe_/**"],
65
+ linterOptions: {
66
+ noInlineConfig: false,
67
+ reportUnusedDisableDirectives: "error",
40
68
  },
41
69
  },
42
70
  };
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],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;CACuB,CAAC;AAEjC,QAAA,OAAO,GAAG;IACrB,WAAW,EAAE;QACX,OAAO,EAAE;YACP,kBAAkB,EAAE,MAAM;SAC3B;QACD,aAAa,EAAE,iBAAiB;QAChC,KAAK,EAAE;YACL,yBAAyB,EAAE,OAAO;YAClC,wBAAwB,EAAE,OAAO;YACjC,gCAAgC,EAAE,OAAO;YACzC,oCAAoC,EAAE,OAAO;YAC7C,kCAAkC,EAAE,OAAO;YAC3C,qCAAqC,EAAE,OAAO;SAC/C;KACmC;IACtC,kBAAkB,EAAE;QAClB,OAAO,EAAE;YACP,kBAAkB,EAAE,MAAM;SAC3B;QACD,aAAa,EAAE,iBAAiB;QAChC,KAAK,EAAE;YACL,yBAAyB,EAAE,OAAO;YAClC,wBAAwB,EAAE,OAAO;YACjC,uBAAuB,EAAE,OAAO;YAChC,gCAAgC,EAAE,OAAO;YACzC,oCAAoC,EAAE,OAAO;YAC7C,kCAAkC,EAAE,OAAO;YAC3C,qCAAqC,EAAE,OAAO;SAC/C;KACmC;IACtC,iDAAiD;IACjD,YAAY,EAAE;QACZ,KAAK,EAAE,CAAC,gBAAgB,CAAC;QACzB,aAAa,EAAE;YACb,cAAc,EAAE,KAAK;YACrB,6BAA6B,EAAE,OAAO;SACvC;KACmC;CACvC,CAAC"}
package/lib/layers.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { TSESTree } from "@typescript-eslint/utils";
1
2
  export declare const LAYER_NAMES: readonly ["core", "service", "adapter", "infra", "ui/hooks", "ui/components", "ui/containers", "ui/pages", "app/api", "app/pages"];
2
3
  export type LayerName = (typeof LAYER_NAMES)[number];
3
4
  export declare function isTestFile(filePath: string): boolean;
@@ -10,4 +11,14 @@ export declare const ENCODING_GLOBALS: Set<string>;
10
11
  export declare const IO_GLOBALS: Set<string>;
11
12
  export declare const SCHEMA_BOUNDARY_METHODS: Set<string>;
12
13
  export declare const STRING_INTERPRETATION_METHODS: Set<string>;
14
+ export declare const ADAPTER_IMPURE_GLOBALS: Set<string>;
15
+ export declare const ADAPTER_IMPURE_MEMBERS: ReadonlyMap<string, ReadonlySet<string>>;
16
+ export declare function isNodeBuiltinImport(importPath: string): boolean;
17
+ export declare const ADAPTER_AMBIENT_LOCALE_METHODS: Set<string>;
18
+ export declare const INTL_LOCALE_CONSTRUCTORS: Set<string>;
19
+ export declare const STRING_CONSTRUCTION_METHODS: Set<string>;
20
+ export declare const NO_DATE_MESSAGE = "'Date' is not allowed in any layer. Use Temporal.";
21
+ export declare function isDateReference(node: TSESTree.Identifier): boolean;
22
+ export declare const DEFAULT_ADAPTER_PACKAGES: readonly string[];
23
+ export declare function packageName(importPath: string): string | null;
13
24
  //# sourceMappingURL=layers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../src/layers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,oIAWd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AA0BrD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAUnE;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAmBvE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAGjE;AAID,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CASR;AAID,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAEjE;AAOD,eAAO,MAAM,gBAAgB,aAiB3B,CAAC;AAGH,eAAO,MAAM,UAAU,aAQrB,CAAC;AAGH,eAAO,MAAM,uBAAuB,aAWlC,CAAC;AAKH,eAAO,MAA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B,CAAC;AAEtD,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,OAAO,CAmBlE;AAKD,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAGrD,CAAC;AAIF,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ7D"}
package/lib/layers.js CHANGED
@@ -1,12 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.STRING_INTERPRETATION_METHODS = exports.SCHEMA_BOUNDARY_METHODS = exports.IO_GLOBALS = exports.ENCODING_GLOBALS = exports.LAYER_NAMES = void 0;
3
+ exports.DEFAULT_ADAPTER_PACKAGES = exports.NO_DATE_MESSAGE = exports.STRING_CONSTRUCTION_METHODS = exports.INTL_LOCALE_CONSTRUCTORS = exports.ADAPTER_AMBIENT_LOCALE_METHODS = exports.ADAPTER_IMPURE_MEMBERS = exports.ADAPTER_IMPURE_GLOBALS = exports.STRING_INTERPRETATION_METHODS = exports.SCHEMA_BOUNDARY_METHODS = exports.IO_GLOBALS = exports.ENCODING_GLOBALS = exports.LAYER_NAMES = void 0;
4
4
  exports.isTestFile = isTestFile;
5
5
  exports.getLayerFromPath = getLayerFromPath;
6
6
  exports.getLayerFromImport = getLayerFromImport;
7
7
  exports.canImport = canImport;
8
8
  exports.resolveImportPath = resolveImportPath;
9
9
  exports.isNonLayerAliasImport = isNonLayerAliasImport;
10
+ exports.isNodeBuiltinImport = isNodeBuiltinImport;
11
+ exports.isDateReference = isDateReference;
12
+ exports.packageName = packageName;
13
+ const node_module_1 = require("node:module");
14
+ const utils_1 = require("@typescript-eslint/utils");
10
15
  exports.LAYER_NAMES = [
11
16
  "core",
12
17
  "service",
@@ -25,7 +30,8 @@ const allowedImports = {
25
30
  service: ["core"],
26
31
  adapter: ["core", "service"],
27
32
  infra: ["core", "service", "adapter"],
28
- "ui/hooks": ["core", "service"],
33
+ // ui/hooks and app/pages decode client-side input (URL, storage, files, responses) via adapter
34
+ "ui/hooks": ["core", "service", "adapter"],
29
35
  "ui/components": ["core", "ui/hooks"],
30
36
  "ui/containers": ["core", "service", "ui/hooks", "ui/components"],
31
37
  "ui/pages": ["core", "service", "ui/hooks", "ui/components", "ui/containers"],
@@ -34,6 +40,7 @@ const allowedImports = {
34
40
  "app/pages": [
35
41
  "core",
36
42
  "service",
43
+ "adapter",
37
44
  "ui/hooks",
38
45
  "ui/components",
39
46
  "ui/containers",
@@ -45,7 +52,21 @@ const allowedImports = {
45
52
  function isTestFile(filePath) {
46
53
  return /\.(test|spec|stories)\.[^/]+$/.test(filePath);
47
54
  }
55
+ // Next.js file conventions that must sit directly under src/ (outside app/).
56
+ // They are wiring roots like app/, so they get the constraints of the matching app/ layer
57
+ // instead of being exempted from layer checks.
58
+ const NEXT_ROOT_CONVENTIONS = new Map([
59
+ ["proxy", "app/api"],
60
+ ["middleware", "app/api"],
61
+ ["instrumentation", "app/api"],
62
+ ["instrumentation-client", "app/pages"],
63
+ ["mdx-components", "app/pages"],
64
+ ]);
48
65
  function getLayerFromPath(filePath) {
66
+ const rootFile = filePath.match(/\/src\/([^/.]+)\.[^/]+$/);
67
+ const rootLayer = rootFile && NEXT_ROOT_CONVENTIONS.get(rootFile[1]);
68
+ if (rootLayer)
69
+ return rootLayer;
49
70
  // Check app/api before app/pages (more specific first)
50
71
  if (filePath.match(/\/src\/app\/api\//))
51
72
  return "app/api";
@@ -107,7 +128,6 @@ exports.ENCODING_GLOBALS = new Set([
107
128
  "JSON",
108
129
  "String",
109
130
  "Number",
110
- "Date",
111
131
  "Temporal",
112
132
  "globalThis",
113
133
  "Function",
@@ -169,4 +189,133 @@ exports.STRING_INTERPRETATION_METHODS = new Set([
169
189
  "trimStart",
170
190
  "trimEnd",
171
191
  ]);
192
+ // --- adapter purity ---
193
+ // adapter is imported from both server (infra, app/api) and client (ui/hooks, app/pages),
194
+ // so it must be a deterministic codec that runs in any environment.
195
+ // Request/Response/Headers/FormData are Web-standard data types and stay allowed.
196
+ // IO, environment-specific APIs, and global object access (which would bypass this list)
197
+ exports.ADAPTER_IMPURE_GLOBALS = new Set([
198
+ "fetch",
199
+ "process",
200
+ "performance",
201
+ "localStorage",
202
+ "sessionStorage",
203
+ "indexedDB",
204
+ "caches",
205
+ "document",
206
+ "navigator",
207
+ "location",
208
+ "history",
209
+ "XMLHttpRequest",
210
+ "WebSocket",
211
+ "EventSource",
212
+ "BroadcastChannel",
213
+ "Worker",
214
+ "crypto",
215
+ "setTimeout",
216
+ "setInterval",
217
+ "setImmediate",
218
+ "clearTimeout",
219
+ "clearInterval",
220
+ "queueMicrotask",
221
+ "requestAnimationFrame",
222
+ "Buffer",
223
+ "require",
224
+ "__dirname",
225
+ "__filename",
226
+ "globalThis",
227
+ "window",
228
+ "self",
229
+ "global",
230
+ "Function",
231
+ "eval",
232
+ ]);
233
+ // Non-deterministic members: `Math.random`, `Temporal.Now`
234
+ exports.ADAPTER_IMPURE_MEMBERS = new Map([
235
+ ["Math", new Set(["random"])],
236
+ ["Temporal", new Set(["Now"])],
237
+ ]);
238
+ function isNodeBuiltinImport(importPath) {
239
+ return (importPath.startsWith("node:") ||
240
+ node_module_1.builtinModules.includes(importPath.split("/")[0]));
241
+ }
242
+ // Methods that silently use the runtime's locale or time zone.
243
+ // Locale-aware formatting goes through Intl constructors with an explicit locale.
244
+ exports.ADAPTER_AMBIENT_LOCALE_METHODS = new Set([
245
+ "toLocaleString",
246
+ "toLocaleDateString",
247
+ "toLocaleTimeString",
248
+ "toLocaleUpperCase",
249
+ "toLocaleLowerCase",
250
+ "localeCompare",
251
+ ]);
252
+ // Intl constructors whose first argument is the locale
253
+ exports.INTL_LOCALE_CONSTRUCTORS = new Set([
254
+ "DateTimeFormat",
255
+ "NumberFormat",
256
+ "Collator",
257
+ "PluralRules",
258
+ "RelativeTimeFormat",
259
+ "ListFormat",
260
+ "DisplayNames",
261
+ "Segmenter",
262
+ "DurationFormat",
263
+ ]);
264
+ // --- String construction (core/service) ---
265
+ // Inner layers hold canonical values only. Strings are encoded or display representations,
266
+ // so they are produced in adapter (codecs and display formatters).
267
+ exports.STRING_CONSTRUCTION_METHODS = new Set([
268
+ "join",
269
+ "toString",
270
+ "toFixed",
271
+ "toPrecision",
272
+ "toExponential",
273
+ "toUpperCase",
274
+ "toLowerCase",
275
+ "toLocaleString",
276
+ "toLocaleDateString",
277
+ "toLocaleTimeString",
278
+ "toLocaleUpperCase",
279
+ "toLocaleLowerCase",
280
+ ]);
281
+ // --- Date ---
282
+ // Date is banned in every layer (mutable, local time by default, millisecond-only). Use Temporal.
283
+ exports.NO_DATE_MESSAGE = "'Date' is not allowed in any layer. Use Temporal.";
284
+ function isDateReference(node) {
285
+ if (node.name !== "Date")
286
+ return false;
287
+ const parent = node.parent;
288
+ // obj.Date, { Date: x }, class { Date() {} }, Ns.Date
289
+ if ((parent.type === utils_1.AST_NODE_TYPES.MemberExpression &&
290
+ parent.property === node &&
291
+ !parent.computed) ||
292
+ ((parent.type === utils_1.AST_NODE_TYPES.Property ||
293
+ parent.type === utils_1.AST_NODE_TYPES.MethodDefinition ||
294
+ parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition) &&
295
+ parent.key === node &&
296
+ !parent.computed &&
297
+ !(parent.type === utils_1.AST_NODE_TYPES.Property && parent.shorthand)) ||
298
+ (parent.type === utils_1.AST_NODE_TYPES.TSQualifiedName && parent.right === node)) {
299
+ return false;
300
+ }
301
+ return true;
302
+ }
303
+ // --- adapter package allowlist ---
304
+ // Third-party packages can do IO, so adapter imports only packages known to be pure.
305
+ // Projects extend this with the server rule option `adapterAllowedPackages`.
306
+ exports.DEFAULT_ADAPTER_PACKAGES = [
307
+ "effect",
308
+ "@luma-layered-ts/types",
309
+ ];
310
+ // "effect/Schema" -> "effect", "@scope/pkg/sub" -> "@scope/pkg".
311
+ // null for relative, absolute, `@/` alias and `#` subpath imports.
312
+ function packageName(importPath) {
313
+ if (/^[./#]/.test(importPath) || isNonLayerAliasImport(importPath)) {
314
+ return null;
315
+ }
316
+ const segments = importPath.split("/");
317
+ return importPath.startsWith("@")
318
+ ? segments.slice(0, 2).join("/")
319
+ : segments[0];
320
+ }
172
321
  //# sourceMappingURL=layers.js.map
package/lib/layers.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"layers.js","sourceRoot":"","sources":["../src/layers.ts"],"names":[],"mappings":";;;AAuCA,gCAEC;AAED,4CAUC;AAED,gDAmBC;AAED,8BAGC;AAID,8CAYC;AAID,sDAEC;AArGY,QAAA,WAAW,GAAG;IACzB,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;IACP,UAAU;IACV,eAAe;IACf,eAAe;IACf,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAIX,uCAAuC;AACvC,MAAM,cAAc,GAA4C;IAC9D,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAC5B,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;IACrC,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAC/B,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;IACrC,eAAe,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,CAAC;IACjE,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,CAAC;IAC7E,+EAA+E;IAC/E,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;IAClD,WAAW,EAAE;QACX,MAAM;QACN,SAAS;QACT,UAAU;QACV,eAAe;QACf,eAAe;QACf,UAAU;KACX;CACF,CAAC;AAEF,kEAAkE;AAClE,sEAAsE;AACtE,SAAgB,UAAU,CAAC,QAAgB;IACzC,OAAO,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC,C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AAC;AACd,CAAC;AAED,oCAAoC;AACpC,qFAAqF;AACrF,6EAA6E;AAChE,QAAA,wBAAwB,GAAsB;IACzD,QAAQ;IACR,wBAAwB;CACzB,CAAC;AAEF,iEAAiE;AACjE,mEAAmE;AACnE,SAAgB,WAAW,CAAC,UAAkB;IAC5C,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,qBAAqB,CAAC,UAAU,CAAC,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,OAAO,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC;QAC/B,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAChC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,7 @@
1
+ type Options = Record<string, never>;
2
+ type MessageId = "codecOutsideAdapter" | "displayTextOutsideAdapter";
3
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule.js").RuleModule<MessageId, [Options], unknown, import("@typescript-eslint/utils/dist/ts-eslint/Rule.js").RuleListener> & {
4
+ name: string;
5
+ };
6
+ export default _default;
7
+ //# sourceMappingURL=codec-placement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-placement.d.ts","sourceRoot":"","sources":["../../src/rules/codec-placement.ts"],"names":[],"mappings":"AAKA,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAGrC,KAAK,SAAS,GAAG,qBAAqB,GAAG,2BAA2B,CAAC;;;;AA0BrE,wBA6IG"}