@thethracian/oxlint-config 0.2.0 → 0.3.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/CHANGELOG.md +13 -0
- package/README.md +125 -19
- package/dist/codemod-fix/cli.d.ts +3 -0
- package/dist/codemod-fix/cli.d.ts.map +1 -0
- package/dist/codemod-fix/cli.js +22 -0
- package/dist/codemod-fix/cli.js.map +1 -0
- package/dist/codemod-fix/index.d.ts +44 -0
- package/dist/codemod-fix/index.d.ts.map +1 -0
- package/dist/codemod-fix/index.js +110 -0
- package/dist/codemod-fix/index.js.map +1 -0
- package/dist/codemods/arrow-body-style.d.ts +7 -0
- package/dist/codemods/arrow-body-style.d.ts.map +1 -0
- package/dist/codemods/arrow-body-style.js +106 -0
- package/dist/codemods/arrow-body-style.js.map +1 -0
- package/dist/codemods/comment-format.d.ts +24 -0
- package/dist/codemods/comment-format.d.ts.map +1 -0
- package/dist/codemods/comment-format.js +100 -0
- package/dist/codemods/comment-format.js.map +1 -0
- package/dist/codemods/explicit-return-types.d.ts +7 -0
- package/dist/codemods/explicit-return-types.d.ts.map +1 -0
- package/dist/codemods/explicit-return-types.js +350 -0
- package/dist/codemods/explicit-return-types.js.map +1 -0
- package/dist/codemods/format-file-header.d.ts +7 -0
- package/dist/codemods/format-file-header.d.ts.map +1 -0
- package/dist/codemods/format-file-header.js +163 -0
- package/dist/codemods/format-file-header.js.map +1 -0
- package/dist/codemods/format-jsdoc-comments.d.ts +7 -0
- package/dist/codemods/format-jsdoc-comments.d.ts.map +1 -0
- package/dist/codemods/format-jsdoc-comments.js +129 -0
- package/dist/codemods/format-jsdoc-comments.js.map +1 -0
- package/dist/codemods/function-declarations.d.ts +7 -0
- package/dist/codemods/function-declarations.d.ts.map +1 -0
- package/dist/codemods/function-declarations.js +202 -0
- package/dist/codemods/function-declarations.js.map +1 -0
- package/dist/codemods/inline-export-lists.d.ts +7 -0
- package/dist/codemods/inline-export-lists.d.ts.map +1 -0
- package/dist/codemods/inline-export-lists.js +168 -0
- package/dist/codemods/inline-export-lists.js.map +1 -0
- package/dist/codemods/internal-export-docs.d.ts +7 -0
- package/dist/codemods/internal-export-docs.d.ts.map +1 -0
- package/dist/codemods/internal-export-docs.js +93 -0
- package/dist/codemods/internal-export-docs.js.map +1 -0
- package/dist/codemods/no-ternary-branch-initializers.d.ts +14 -0
- package/dist/codemods/no-ternary-branch-initializers.d.ts.map +1 -0
- package/dist/codemods/no-ternary-branch-initializers.js +240 -0
- package/dist/codemods/no-ternary-branch-initializers.js.map +1 -0
- package/dist/codemods/no-ternary-variable-initializers.d.ts +14 -0
- package/dist/codemods/no-ternary-variable-initializers.d.ts.map +1 -0
- package/dist/codemods/no-ternary-variable-initializers.js +235 -0
- package/dist/codemods/no-ternary-variable-initializers.js.map +1 -0
- package/dist/codemods/no-ternary.d.ts +7 -0
- package/dist/codemods/no-ternary.d.ts.map +1 -0
- package/dist/codemods/no-ternary.js +215 -0
- package/dist/codemods/no-ternary.js.map +1 -0
- package/dist/codemods/rename-acronyms.d.ts +8 -0
- package/dist/codemods/rename-acronyms.d.ts.map +1 -0
- package/dist/codemods/rename-acronyms.js +193 -0
- package/dist/codemods/rename-acronyms.js.map +1 -0
- package/dist/codemods/run.d.ts +2 -0
- package/dist/codemods/run.d.ts.map +1 -0
- package/dist/codemods/run.js +14 -0
- package/dist/codemods/run.js.map +1 -0
- package/dist/codemods/sort-imports.d.ts +7 -0
- package/dist/codemods/sort-imports.d.ts.map +1 -0
- package/dist/codemods/sort-imports.js +235 -0
- package/dist/codemods/sort-imports.js.map +1 -0
- package/dist/index.d.ts +30 -96
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +157 -95
- package/dist/index.js.map +1 -1
- package/dist/rules/acronym-case.d.ts +7 -3
- package/dist/rules/acronym-case.d.ts.map +1 -1
- package/dist/rules/acronym-case.js +129 -120
- package/dist/rules/acronym-case.js.map +1 -1
- package/dist/rules/acronyms-1.d.ts +3 -0
- package/dist/rules/acronyms-1.d.ts.map +1 -0
- package/dist/rules/acronyms-1.js +407 -0
- package/dist/rules/acronyms-1.js.map +1 -0
- package/dist/rules/acronyms-2.d.ts +3 -0
- package/dist/rules/acronyms-2.d.ts.map +1 -0
- package/dist/rules/acronyms-2.js +407 -0
- package/dist/rules/acronyms-2.js.map +1 -0
- package/dist/rules/acronyms-3.d.ts +3 -0
- package/dist/rules/acronyms-3.d.ts.map +1 -0
- package/dist/rules/acronyms-3.js +407 -0
- package/dist/rules/acronyms-3.js.map +1 -0
- package/dist/rules/acronyms-4.d.ts +3 -0
- package/dist/rules/acronyms-4.d.ts.map +1 -0
- package/dist/rules/acronyms-4.js +377 -0
- package/dist/rules/acronyms-4.js.map +1 -0
- package/dist/rules/acronyms.d.ts +1 -8
- package/dist/rules/acronyms.d.ts.map +1 -1
- package/dist/rules/acronyms.js +14 -1578
- package/dist/rules/acronyms.js.map +1 -1
- package/dist/rules/boolean-prefix.d.ts +11 -2
- package/dist/rules/boolean-prefix.d.ts.map +1 -1
- package/dist/rules/boolean-prefix.js +95 -59
- package/dist/rules/boolean-prefix.js.map +1 -1
- package/dist/rules/camel-case-identifiers.d.ts +3 -4
- package/dist/rules/camel-case-identifiers.d.ts.map +1 -1
- package/dist/rules/camel-case-identifiers.js +59 -40
- package/dist/rules/camel-case-identifiers.js.map +1 -1
- package/dist/rules/char-class.d.ts +26 -13
- package/dist/rules/char-class.d.ts.map +1 -1
- package/dist/rules/char-class.js +56 -24
- package/dist/rules/char-class.js.map +1 -1
- package/dist/rules/diagnostic-guidance.d.ts +91 -0
- package/dist/rules/diagnostic-guidance.d.ts.map +1 -0
- package/dist/rules/diagnostic-guidance.js +243 -0
- package/dist/rules/diagnostic-guidance.js.map +1 -0
- package/dist/rules/effect-default-ast.d.ts +89 -0
- package/dist/rules/effect-default-ast.d.ts.map +1 -0
- package/dist/rules/effect-default-ast.js +208 -0
- package/dist/rules/effect-default-ast.js.map +1 -0
- package/dist/rules/effect-default-compat-rules.d.ts +76 -0
- package/dist/rules/effect-default-compat-rules.d.ts.map +1 -0
- package/dist/rules/effect-default-compat-rules.js +270 -0
- package/dist/rules/effect-default-compat-rules.js.map +1 -0
- package/dist/rules/effect-default-env-rules.d.ts +60 -0
- package/dist/rules/effect-default-env-rules.d.ts.map +1 -0
- package/dist/rules/effect-default-env-rules.js +259 -0
- package/dist/rules/effect-default-env-rules.js.map +1 -0
- package/dist/rules/effect-default-fiber-helpers.d.ts +13 -0
- package/dist/rules/effect-default-fiber-helpers.d.ts.map +1 -0
- package/dist/rules/effect-default-fiber-helpers.js +76 -0
- package/dist/rules/effect-default-fiber-helpers.js.map +1 -0
- package/dist/rules/effect-default-floating-helpers.d.ts +7 -0
- package/dist/rules/effect-default-floating-helpers.d.ts.map +1 -0
- package/dist/rules/effect-default-floating-helpers.js +113 -0
- package/dist/rules/effect-default-floating-helpers.js.map +1 -0
- package/dist/rules/effect-default-helpers.d.ts +8 -32
- package/dist/rules/effect-default-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-helpers.js +11 -458
- package/dist/rules/effect-default-helpers.js.map +1 -1
- package/dist/rules/effect-default-resource-helpers.d.ts +18 -4
- package/dist/rules/effect-default-resource-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-resource-helpers.js +30 -13
- package/dist/rules/effect-default-resource-helpers.js.map +1 -1
- package/dist/rules/effect-default-safety-helpers.d.ts +43 -0
- package/dist/rules/effect-default-safety-helpers.d.ts.map +1 -0
- package/dist/rules/effect-default-safety-helpers.js +126 -0
- package/dist/rules/effect-default-safety-helpers.js.map +1 -0
- package/dist/rules/effect-default-scan-helpers.d.ts +43 -0
- package/dist/rules/effect-default-scan-helpers.d.ts.map +1 -0
- package/dist/rules/effect-default-scan-helpers.js +141 -0
- package/dist/rules/effect-default-scan-helpers.js.map +1 -0
- package/dist/rules/effect-default-schema-helpers.d.ts +37 -0
- package/dist/rules/effect-default-schema-helpers.d.ts.map +1 -0
- package/dist/rules/effect-default-schema-helpers.js +104 -0
- package/dist/rules/effect-default-schema-helpers.js.map +1 -0
- package/dist/rules/effect-default-test-helpers.d.ts +18 -4
- package/dist/rules/effect-default-test-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-test-helpers.js +41 -20
- package/dist/rules/effect-default-test-helpers.js.map +1 -1
- package/dist/rules/effect-default-workflow-helpers.d.ts +91 -0
- package/dist/rules/effect-default-workflow-helpers.d.ts.map +1 -0
- package/dist/rules/effect-default-workflow-helpers.js +247 -0
- package/dist/rules/effect-default-workflow-helpers.js.map +1 -0
- package/dist/rules/effect-default.d.ts +1 -1
- package/dist/rules/effect-default.d.ts.map +1 -1
- package/dist/rules/effect-default.js +198 -637
- package/dist/rules/effect-default.js.map +1 -1
- package/dist/rules/effect-exported-declarations.d.ts +19 -0
- package/dist/rules/effect-exported-declarations.d.ts.map +1 -0
- package/dist/rules/effect-exported-declarations.js +237 -0
- package/dist/rules/effect-exported-declarations.js.map +1 -0
- package/dist/rules/effect-path-options.d.ts +49 -11
- package/dist/rules/effect-path-options.d.ts.map +1 -1
- package/dist/rules/effect-path-options.js +85 -52
- package/dist/rules/effect-path-options.js.map +1 -1
- package/dist/rules/effect-rule-aliases.d.ts +55 -0
- package/dist/rules/effect-rule-aliases.d.ts.map +1 -0
- package/dist/rules/effect-rule-aliases.js +278 -0
- package/dist/rules/effect-rule-aliases.js.map +1 -0
- package/dist/rules/effect-rule-core.d.ts +46 -24
- package/dist/rules/effect-rule-core.d.ts.map +1 -1
- package/dist/rules/effect-rule-core.js +263 -303
- package/dist/rules/effect-rule-core.js.map +1 -1
- package/dist/rules/effect-rule-names.d.ts +12 -3
- package/dist/rules/effect-rule-names.d.ts.map +1 -1
- package/dist/rules/effect-rule-names.js +15 -3
- package/dist/rules/effect-rule-names.js.map +1 -1
- package/dist/rules/effect-source-comments.d.ts +7 -0
- package/dist/rules/effect-source-comments.d.ts.map +1 -0
- package/dist/rules/effect-source-comments.js +227 -0
- package/dist/rules/effect-source-comments.js.map +1 -0
- package/dist/rules/effect-source-helpers.d.ts +4 -9
- package/dist/rules/effect-source-helpers.d.ts.map +1 -1
- package/dist/rules/effect-source-helpers.js +7 -333
- package/dist/rules/effect-source-helpers.js.map +1 -1
- package/dist/rules/effect-source-navigation.d.ts +25 -0
- package/dist/rules/effect-source-navigation.d.ts.map +1 -0
- package/dist/rules/effect-source-navigation.js +244 -0
- package/dist/rules/effect-source-navigation.js.map +1 -0
- package/dist/rules/effect-source-scan.d.ts +30 -7
- package/dist/rules/effect-source-scan.d.ts.map +1 -1
- package/dist/rules/effect-source-scan.js +377 -297
- package/dist/rules/effect-source-scan.js.map +1 -1
- package/dist/rules/effect-strict-ast-specs.d.ts +8 -0
- package/dist/rules/effect-strict-ast-specs.d.ts.map +1 -0
- package/dist/rules/effect-strict-ast-specs.js +166 -0
- package/dist/rules/effect-strict-ast-specs.js.map +1 -0
- package/dist/rules/effect-strict-boundary-helpers.d.ts +25 -0
- package/dist/rules/effect-strict-boundary-helpers.d.ts.map +1 -0
- package/dist/rules/effect-strict-boundary-helpers.js +127 -0
- package/dist/rules/effect-strict-boundary-helpers.js.map +1 -0
- package/dist/rules/effect-strict-core-specs.d.ts +8 -0
- package/dist/rules/effect-strict-core-specs.d.ts.map +1 -0
- package/dist/rules/effect-strict-core-specs.js +334 -0
- package/dist/rules/effect-strict-core-specs.js.map +1 -0
- package/dist/rules/effect-strict-external-helpers.d.ts +25 -0
- package/dist/rules/effect-strict-external-helpers.d.ts.map +1 -0
- package/dist/rules/effect-strict-external-helpers.js +87 -0
- package/dist/rules/effect-strict-external-helpers.js.map +1 -0
- package/dist/rules/effect-strict-helpers.d.ts +75 -33
- package/dist/rules/effect-strict-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-helpers.js +124 -246
- package/dist/rules/effect-strict-helpers.js.map +1 -1
- package/dist/rules/effect-strict-internals.d.ts +198 -0
- package/dist/rules/effect-strict-internals.d.ts.map +1 -0
- package/dist/rules/effect-strict-internals.js +477 -0
- package/dist/rules/effect-strict-internals.js.map +1 -0
- package/dist/rules/effect-strict-segment-helpers.d.ts +79 -0
- package/dist/rules/effect-strict-segment-helpers.d.ts.map +1 -0
- package/dist/rules/effect-strict-segment-helpers.js +308 -0
- package/dist/rules/effect-strict-segment-helpers.js.map +1 -0
- package/dist/rules/effect-strict.d.ts +1 -1
- package/dist/rules/effect-strict.d.ts.map +1 -1
- package/dist/rules/effect-strict.js +10 -661
- package/dist/rules/effect-strict.js.map +1 -1
- package/dist/rules/max-import-depth.d.ts +2 -2
- package/dist/rules/max-import-depth.d.ts.map +1 -1
- package/dist/rules/max-import-depth.js +52 -17
- package/dist/rules/max-import-depth.js.map +1 -1
- package/dist/rules/max-line-length.d.ts +9 -2
- package/dist/rules/max-line-length.d.ts.map +1 -1
- package/dist/rules/max-line-length.js +62 -7
- package/dist/rules/max-line-length.js.map +1 -1
- package/dist/rules/no-commented-out-code.d.ts +3 -7
- package/dist/rules/no-commented-out-code.d.ts.map +1 -1
- package/dist/rules/no-commented-out-code.js +157 -102
- package/dist/rules/no-commented-out-code.js.map +1 -1
- package/dist/rules/pascal-case-types.d.ts +1 -1
- package/dist/rules/pascal-case-types.d.ts.map +1 -1
- package/dist/rules/pascal-case-types.js +65 -46
- package/dist/rules/pascal-case-types.js.map +1 -1
- package/dist/rules/plugin-commented-out-code-rule.d.ts +32 -0
- package/dist/rules/plugin-commented-out-code-rule.d.ts.map +1 -0
- package/dist/rules/plugin-commented-out-code-rule.js +135 -0
- package/dist/rules/plugin-commented-out-code-rule.js.map +1 -0
- package/dist/rules/plugin.d.ts +3 -121
- package/dist/rules/plugin.d.ts.map +1 -1
- package/dist/rules/plugin.js +195 -201
- package/dist/rules/plugin.js.map +1 -1
- package/dist/rules/private-underscore.d.ts +1 -1
- package/dist/rules/private-underscore.d.ts.map +1 -1
- package/dist/rules/private-underscore.js +11 -4
- package/dist/rules/private-underscore.js.map +1 -1
- package/dist/rules/require-file-doc.d.ts +5 -6
- package/dist/rules/require-file-doc.d.ts.map +1 -1
- package/dist/rules/require-file-doc.js +127 -78
- package/dist/rules/require-file-doc.js.map +1 -1
- package/dist/rules/require-function-doc-ignored-text.d.ts +7 -0
- package/dist/rules/require-function-doc-ignored-text.d.ts.map +1 -0
- package/dist/rules/require-function-doc-ignored-text.js +67 -0
- package/dist/rules/require-function-doc-ignored-text.js.map +1 -0
- package/dist/rules/require-function-doc-local-exports.d.ts +7 -0
- package/dist/rules/require-function-doc-local-exports.d.ts.map +1 -0
- package/dist/rules/require-function-doc-local-exports.js +114 -0
- package/dist/rules/require-function-doc-local-exports.js.map +1 -0
- package/dist/rules/require-function-doc.d.ts +3 -18
- package/dist/rules/require-function-doc.d.ts.map +1 -1
- package/dist/rules/require-function-doc.js +404 -218
- package/dist/rules/require-function-doc.js.map +1 -1
- package/dist/rules/source-cache.d.ts +19 -0
- package/dist/rules/source-cache.d.ts.map +1 -0
- package/dist/rules/source-cache.js +63 -0
- package/dist/rules/source-cache.js.map +1 -0
- package/package.json +15 -10
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
interface DiagnosticInput {
|
|
2
|
+
example: string;
|
|
3
|
+
fix: string;
|
|
4
|
+
summary: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Internal helper exported for package-local composition.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare const diagnosticMessage: (input: DiagnosticInput) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Internal helper exported for package-local composition.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const renameDiagnosticMessage: (kind: string, name: string, replacement: string) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Internal helper exported for package-local composition.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare const typeDiagnosticMessage: (kind: string, name: string, replacement: string) => string;
|
|
24
|
+
/**
|
|
25
|
+
* Internal helper exported for package-local composition.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const constantDiagnosticMessage: (name: string, replacement: string) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Internal helper exported for package-local composition.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare const booleanDiagnosticMessage: (name: string) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Internal helper exported for package-local composition.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare const privateMemberDiagnosticMessage: (kind: "method" | "property", name: string, replacement: string) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Internal helper exported for package-local composition.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare const acronymDiagnosticMessage: (name: string, replacement: string, violations: readonly string[]) => string;
|
|
48
|
+
/**
|
|
49
|
+
* Internal helper exported for package-local composition.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare const jsExtensionDiagnosticMessage: (specifier: string) => string;
|
|
54
|
+
/**
|
|
55
|
+
* Internal helper exported for package-local composition.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export declare const localExportListDiagnosticMessage: () => string;
|
|
60
|
+
/**
|
|
61
|
+
* Internal helper exported for package-local composition.
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export declare const importDepthDiagnosticMessage: (depth: number, maxDepth: number, importPath: string) => string;
|
|
66
|
+
/**
|
|
67
|
+
* Internal helper exported for package-local composition.
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare const lineLengthDiagnosticMessage: (line: number, length: number) => string;
|
|
72
|
+
/**
|
|
73
|
+
* Internal helper exported for package-local composition.
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare const fileDocDiagnosticMessage: () => string;
|
|
78
|
+
/**
|
|
79
|
+
* Internal helper exported for package-local composition.
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
export declare const functionDocDiagnosticMessage: () => string;
|
|
84
|
+
/**
|
|
85
|
+
* Internal helper exported for package-local composition.
|
|
86
|
+
*
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export declare const effectDiagnosticMessage: (ruleName: string, summary: string) => string;
|
|
90
|
+
export {};
|
|
91
|
+
//# sourceMappingURL=diagnostic-guidance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostic-guidance.d.ts","sourceRoot":"","sources":["../../src/rules/diagnostic-guidance.ts"],"names":[],"mappings":"AAIA,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAqFD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,eAAe,KAAG,MACsB,CAAC;AAElF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,aAAa,MAAM,KAAG,MAKtF,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,aAAa,MAAM,KAAG,MAKpF,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,MAAM,MAAM,EAAE,aAAa,MAAM,KAAG,MAK1E,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,KAAG,MAKpD,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACzC,MAAM,QAAQ,GAAG,UAAU,EAC3B,MAAM,MAAM,EACZ,aAAa,MAAM,KAClB,MAUF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,MAAM,EACZ,aAAa,MAAM,EACnB,YAAY,SAAS,MAAM,EAAE,KAC5B,MAWF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,WAAW,MAAM,KAAG,MAK7D,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,QAAO,MAKhD,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,MAAM,EACb,UAAU,MAAM,EAChB,YAAY,MAAM,KACjB,MAKC,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAG,MAKvE,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAAO,MAYxC,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,QAAO,MAoB5C,CAAC;AASL;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAI,UAAU,MAAM,EAAE,SAAS,MAAM,KAAG,MAG3E,CAAC"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------- */
|
|
2
|
+
/* LLM-friendly diagnostic guidance for custom rules. */
|
|
3
|
+
/* -------------------------------------------------------------------------- */
|
|
4
|
+
const markdownCode = (code) => `\`\`\`ts\n${code}\n\`\`\``;
|
|
5
|
+
const effectName = ['Eff', 'ect'].join('');
|
|
6
|
+
const JAVASCRIPT_EXTENSION_LENGTH = 3;
|
|
7
|
+
const ruleGuidanceByName = [
|
|
8
|
+
{
|
|
9
|
+
example: 'const User = Schema.Struct({ id: Schema.String })\nconst user = yield* Schema.decodeUnknown(User)(input)',
|
|
10
|
+
fix: 'Decode untrusted data with Schema at the boundary and pass typed values inward.',
|
|
11
|
+
keys: ['schema'],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
example: `it.effect("uses test services", () => ${effectName}.gen(function* () {\n` +
|
|
15
|
+
` yield* ${effectName}.provide(program, TestLayer)\n}))`,
|
|
16
|
+
fix: 'Use Effect-aware tests with explicit test services, TestClock, and isolated layers.',
|
|
17
|
+
keys: ['test', 'TestClock'],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
example: 'class UserRepo extends Context.Tag("UserRepo")<UserRepo, Service>() {}\nexport const UserRepoLive = Layer.succeed(UserRepo, service)',
|
|
21
|
+
fix: 'Move concrete service construction into named Layers and keep domain code dependent on tags.',
|
|
22
|
+
keys: ['layer', 'service', 'tag'],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
example: `export const loadUser = ${effectName}.fn("loadUser")(function* (id: UserId) {\n` +
|
|
26
|
+
' return yield* UserRepo.find(id)\n})',
|
|
27
|
+
fix: 'Return an Effect from library code and run it only at the configured application boundary.',
|
|
28
|
+
keys: ['run', 'entrypoint', 'Promise'],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
example: `const fiber = yield* ${effectName}.forkScoped(worker)\nyield* Fiber.join(fiber)`,
|
|
32
|
+
fix: 'Observe, join, interrupt, scope, supervise, or return every forked fiber.',
|
|
33
|
+
keys: ['fiber', 'fork'],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
example: 'class NotFound extends Data.TaggedError("NotFound")<{ id: string }> {}\n' +
|
|
37
|
+
`yield* ${effectName}.fail(new NotFound({ id }))`,
|
|
38
|
+
fix: 'Use tagged typed errors, preserve causes, and recover with specific catchTag/catchTags handlers.',
|
|
39
|
+
keys: ['error', 'catch', 'fail'],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
example: `yield* call.pipe(\n ${effectName}.timeout("5 seconds"),\n` +
|
|
43
|
+
` ${effectName}.retry(Schedule.exponential("100 millis").pipe(Schedule.jittered)),\n` +
|
|
44
|
+
` ${effectName}.withSpan("UserClient.load"),\n)`,
|
|
45
|
+
fix: 'Make external effects bounded, observable, and deliberately retried when idempotent.',
|
|
46
|
+
keys: ['retry', 'timeout', 'span'],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
example: `yield* ${effectName}.scoped(\n` +
|
|
50
|
+
` ${effectName}.acquireRelease(openResource, closeResource).pipe(\n` +
|
|
51
|
+
` ${effectName}.flatMap(useResource),\n ),\n)`,
|
|
52
|
+
fix: 'Scope resource lifetimes and guard scarce shared resources with Effect resource primitives.',
|
|
53
|
+
keys: ['stream', 'resource', 'Semaphore'],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
example: `const program = ${effectName}.gen(function* () {\n const user = yield* loadUser(id)\n return user\n})`,
|
|
57
|
+
fix: 'Use direct Effect.gen sequencing with yield* instead of nested callbacks or returned Effects.',
|
|
58
|
+
keys: ['gen', 'yield', 'flatMap'],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
example: 'const config = yield* Config.string("API_TOKEN")\nconst now = yield* Clock.currentTimeMillis',
|
|
62
|
+
fix: 'Read environment, time, randomness, and platform APIs through Effect services.',
|
|
63
|
+
keys: ['env', 'Clock', 'Random'],
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
const fallbackEffectGuidance = {
|
|
67
|
+
example: `const program = ${effectName}.gen(function* () {\n return yield* operation.pipe(${effectName}.withSpan("operation"))\n})`,
|
|
68
|
+
fix: 'Rewrite the code to make the Effect boundary, error channel, resource lifetime, and execution point explicit.',
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Internal helper exported for package-local composition.
|
|
72
|
+
*
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
export const diagnosticMessage = (input) => `${input.summary}\nFix: ${input.fix}\nExample:\n${markdownCode(input.example)}`;
|
|
76
|
+
/**
|
|
77
|
+
* Internal helper exported for package-local composition.
|
|
78
|
+
*
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
export const renameDiagnosticMessage = (kind, name, replacement) => diagnosticMessage({
|
|
82
|
+
example: `${kind} ${replacement}`,
|
|
83
|
+
fix: `Rename '${name}' to '${replacement}' and update every reference in the same change.`,
|
|
84
|
+
summary: `${kind} names must follow the configured naming convention.`,
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* Internal helper exported for package-local composition.
|
|
88
|
+
*
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
export const typeDiagnosticMessage = (kind, name, replacement) => diagnosticMessage({
|
|
92
|
+
example: `${kind} ${replacement} {}`,
|
|
93
|
+
fix: `Rename ${kind} '${name}' to '${replacement}' and update all references.`,
|
|
94
|
+
summary: 'Type declarations must use PascalCase.',
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Internal helper exported for package-local composition.
|
|
98
|
+
*
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
export const constantDiagnosticMessage = (name, replacement) => diagnosticMessage({
|
|
102
|
+
example: `const ${replacement} = value\nconst ${name.toUpperCase()} = value`,
|
|
103
|
+
fix: `Rename '${name}' to '${replacement}' for ordinary constants, or '${name.toUpperCase()}' for true module-level constants.`,
|
|
104
|
+
summary: 'Constants must be camelCase unless they are true UPPER_CASE constants.',
|
|
105
|
+
});
|
|
106
|
+
/**
|
|
107
|
+
* Internal helper exported for package-local composition.
|
|
108
|
+
*
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
export const booleanDiagnosticMessage = (name) => diagnosticMessage({
|
|
112
|
+
example: `const is${name[0]?.toUpperCase() ?? ''}${name.slice(1)} = true`,
|
|
113
|
+
fix: `Rename boolean '${name}' with an is/has/should/can predicate prefix and update references.`,
|
|
114
|
+
summary: 'Boolean identifiers must read like predicates.',
|
|
115
|
+
});
|
|
116
|
+
/**
|
|
117
|
+
* Internal helper exported for package-local composition.
|
|
118
|
+
*
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
export const privateMemberDiagnosticMessage = (kind, name, replacement) => {
|
|
122
|
+
let example = `private ${replacement}: string`;
|
|
123
|
+
if (kind === 'method') {
|
|
124
|
+
example = `private ${replacement}(): void {}`;
|
|
125
|
+
}
|
|
126
|
+
return diagnosticMessage({
|
|
127
|
+
example,
|
|
128
|
+
fix: `Rename private ${kind} '${name}' to '${replacement}' and update internal references.`,
|
|
129
|
+
summary: 'Private class members require a leading underscore.',
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Internal helper exported for package-local composition.
|
|
134
|
+
*
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
export const acronymDiagnosticMessage = (name, replacement, violations) => {
|
|
138
|
+
const listed = violations.map((acr) => `'${acr}'`).join(', ');
|
|
139
|
+
let pluralSuffix = '';
|
|
140
|
+
if (violations.length > 1) {
|
|
141
|
+
pluralSuffix = 's';
|
|
142
|
+
}
|
|
143
|
+
return diagnosticMessage({
|
|
144
|
+
example: `const ${replacement} = value`,
|
|
145
|
+
fix: `Rename '${name}' to '${replacement}' and update references; acronym${pluralSuffix} ${listed} must stay uppercase.`,
|
|
146
|
+
summary: 'Known programming acronyms must use one consistent uppercase spelling.',
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Internal helper exported for package-local composition.
|
|
151
|
+
*
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
export const jsExtensionDiagnosticMessage = (specifier) => diagnosticMessage({
|
|
155
|
+
example: `import { helper } from '${specifier.slice(0, -JAVASCRIPT_EXTENSION_LENGTH)}'`,
|
|
156
|
+
fix: `Remove the emitted .js suffix from '${specifier}'. Do not replace it with another runtime extension.`,
|
|
157
|
+
summary: 'Local TypeScript source imports must not use emitted JavaScript extensions.',
|
|
158
|
+
});
|
|
159
|
+
/**
|
|
160
|
+
* Internal helper exported for package-local composition.
|
|
161
|
+
*
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
export const localExportListDiagnosticMessage = () => diagnosticMessage({
|
|
165
|
+
example: 'export const helper = (): void => {}',
|
|
166
|
+
fix: 'Move each local export modifier to the declaration it exports and remove the export list.',
|
|
167
|
+
summary: 'Local export lists hide public surface ownership.',
|
|
168
|
+
});
|
|
169
|
+
/**
|
|
170
|
+
* Internal helper exported for package-local composition.
|
|
171
|
+
*
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
export const importDepthDiagnosticMessage = (depth, maxDepth, importPath) => diagnosticMessage({
|
|
175
|
+
example: "import { helper } from '@/shared/helper'",
|
|
176
|
+
fix: `Flatten the module boundary or use a configured path alias instead of '${importPath}'.`,
|
|
177
|
+
summary: `Import path depth ${depth} exceeds the maximum of ${maxDepth}.`,
|
|
178
|
+
});
|
|
179
|
+
/**
|
|
180
|
+
* Internal helper exported for package-local composition.
|
|
181
|
+
*
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
export const lineLengthDiagnosticMessage = (line, length) => diagnosticMessage({
|
|
185
|
+
example: 'const result = pipe(\n input,\n stepOne,\n stepTwo,\n)',
|
|
186
|
+
fix: 'Break the expression into named intermediate values or multiline pipeline/call formatting.',
|
|
187
|
+
summary: `Line ${line} has ${length} characters, exceeding the maximum of 150.`,
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* Internal helper exported for package-local composition.
|
|
191
|
+
*
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
export const fileDocDiagnosticMessage = () => diagnosticMessage({
|
|
195
|
+
example: `/* -------------------------------------------------------------------------- */
|
|
196
|
+
/* Effect rules for validating service layers. */
|
|
197
|
+
/* -------------------------------------------------------------------------- */`,
|
|
198
|
+
fix: `Add a top-of-file divider header in this exact format:
|
|
199
|
+
/* -------------------------------------------------------------------------- */
|
|
200
|
+
/* Describe this file's purpose here. */
|
|
201
|
+
/* -------------------------------------------------------------------------- */
|
|
202
|
+
|
|
203
|
+
The text line must be a real description of what the file is for; declaration JSDoc does not count.`,
|
|
204
|
+
summary: 'Missing file-purpose header.',
|
|
205
|
+
});
|
|
206
|
+
/**
|
|
207
|
+
* Internal helper exported for package-local composition.
|
|
208
|
+
*
|
|
209
|
+
* @internal
|
|
210
|
+
*/
|
|
211
|
+
export const functionDocDiagnosticMessage = () => diagnosticMessage({
|
|
212
|
+
example: `/**
|
|
213
|
+
* Parse user input into a validated command.
|
|
214
|
+
*
|
|
215
|
+
* @param input - Untrusted request payload.
|
|
216
|
+
* @returns A typed command ready for the domain layer.
|
|
217
|
+
* @throws Does not throw; validation failures are returned in the Effect error channel.
|
|
218
|
+
*/`,
|
|
219
|
+
fix: `Add a /** ... */ block immediately above the export in this shape:
|
|
220
|
+
/**
|
|
221
|
+
* Describe what this exported declaration does.
|
|
222
|
+
*
|
|
223
|
+
* @param name - Describe this parameter.
|
|
224
|
+
* @returns Describe the return value.
|
|
225
|
+
* @throws Describe expected error conditions, or state that it does not throw.
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
The prose must be specific; generated placeholder text does not satisfy the rule.`,
|
|
229
|
+
summary: 'Missing public declaration JSDoc.',
|
|
230
|
+
});
|
|
231
|
+
const matchesRuleGuidance = (ruleName, guidance) => guidance.keys.some((key) => ruleName.includes(key));
|
|
232
|
+
const effectGuidance = (ruleName) => ruleGuidanceByName.find((guidance) => matchesRuleGuidance(ruleName, guidance)) ??
|
|
233
|
+
fallbackEffectGuidance;
|
|
234
|
+
/**
|
|
235
|
+
* Internal helper exported for package-local composition.
|
|
236
|
+
*
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
export const effectDiagnosticMessage = (ruleName, summary) => {
|
|
240
|
+
const guidance = effectGuidance(ruleName);
|
|
241
|
+
return diagnosticMessage({ ...guidance, summary });
|
|
242
|
+
};
|
|
243
|
+
//# sourceMappingURL=diagnostic-guidance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostic-guidance.js","sourceRoot":"","sources":["../../src/rules/diagnostic-guidance.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAchF,MAAM,YAAY,GA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|
2
|
+
report: (descriptor: {
|
|
3
|
+
message: string;
|
|
4
|
+
node: object;
|
|
5
|
+
}) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Internal helper exported for package-local composition.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export type ASTValue = boolean | null | number | object | string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Internal helper exported for package-local composition.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const reportAST: (context: RuleContext, message: string, node: object) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Internal helper exported for package-local composition.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare const objectValue: (node: ASTValue, key: string) => ASTValue;
|
|
25
|
+
/**
|
|
26
|
+
* Internal helper exported for package-local composition.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare const arrayValue: (node: ASTValue) => ASTValue[];
|
|
31
|
+
/**
|
|
32
|
+
* Internal helper exported for package-local composition.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare const nodeType: (node: ASTValue) => string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Internal helper exported for package-local composition.
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare const identifierName: (node: ASTValue) => string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Internal helper exported for package-local composition.
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export declare const literalValue: (node: ASTValue) => ASTValue;
|
|
49
|
+
/**
|
|
50
|
+
* Internal helper exported for package-local composition.
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare const isStringLikeLiteral: (node: ASTValue) => boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Internal helper exported for package-local composition.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare const memberParts: (node: ASTValue) => {
|
|
61
|
+
objectName?: string;
|
|
62
|
+
propertyName?: string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Internal helper exported for package-local composition.
|
|
66
|
+
*
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
export declare const effectCallPredicate: (source: string, names: readonly string[]) => ((callee: ASTValue) => boolean);
|
|
70
|
+
/**
|
|
71
|
+
* Internal helper exported for package-local composition.
|
|
72
|
+
*
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
export declare const propertyKeyName: (node: ASTValue) => string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Internal helper exported for package-local composition.
|
|
78
|
+
*
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
export declare const typeReferenceName: (node: ASTValue) => string | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Internal helper exported for package-local composition.
|
|
84
|
+
*
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export declare const effectServiceSelfName: (superClass: ASTValue, source: string) => string | undefined;
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=effect-default-ast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect-default-ast.d.ts","sourceRoot":"","sources":["../../src/rules/effect-default-ast.ts"],"names":[],"mappings":"AAKA,UAAU,WAAW;IACnB,MAAM,EAAE,CAAC,UAAU,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACjE;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7E;;;;GAIG;AACH,eAA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|
+
/* -------------------------------------------------------------------------- */
|
|
2
|
+
/* Shared AST helpers for custom Effect rule modules. */
|
|
3
|
+
/* -------------------------------------------------------------------------- */
|
|
4
|
+
import { effectFunctionAliases, effectImportAliases } from './effect-rule-core.js';
|
|
5
|
+
/**
|
|
6
|
+
* Internal helper exported for package-local composition.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export const reportAST = (context, message, node) => {
|
|
11
|
+
context.report({ message, node });
|
|
12
|
+
};
|
|
13
|
+
const isASTValue = (value) => value === undefined ||
|
|
14
|
+
value === null ||
|
|
15
|
+
['boolean', 'number', 'object', 'string'].includes(typeof value);
|
|
16
|
+
/**
|
|
17
|
+
* Internal helper exported for package-local composition.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export const objectValue = (node, key) => {
|
|
22
|
+
if (typeof node !== 'object' || node === null) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const value = Reflect.get(node, key);
|
|
26
|
+
if (isASTValue(value)) {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Internal helper exported for package-local composition.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export const arrayValue = (node) => {
|
|
37
|
+
if (Array.isArray(node)) {
|
|
38
|
+
return node.filter(isASTValue);
|
|
39
|
+
}
|
|
40
|
+
return [];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Internal helper exported for package-local composition.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export const nodeType = (node) => {
|
|
48
|
+
const type = objectValue(node, 'type');
|
|
49
|
+
if (typeof type === 'string') {
|
|
50
|
+
return type;
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Internal helper exported for package-local composition.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export const identifierName = (node) => {
|
|
60
|
+
if (nodeType(node) === 'Identifier') {
|
|
61
|
+
const name = objectValue(node, 'name');
|
|
62
|
+
if (typeof name === 'string') {
|
|
63
|
+
return name;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return undefined;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Internal helper exported for package-local composition.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export const literalValue = (node) => {
|
|
74
|
+
if (nodeType(node) === 'Literal') {
|
|
75
|
+
return objectValue(node, 'value');
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Internal helper exported for package-local composition.
|
|
81
|
+
*
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
export const isStringLikeLiteral = (node) => {
|
|
85
|
+
if (typeof literalValue(node) === 'string') {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
if (nodeType(node) !== 'TemplateLiteral') {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
const expressions = objectValue(node, 'expressions');
|
|
92
|
+
if (!Array.isArray(expressions)) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
return expressions.length === 0;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Internal helper exported for package-local composition.
|
|
99
|
+
*
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
export const memberParts = (node) => {
|
|
103
|
+
if (nodeType(node) !== 'MemberExpression') {
|
|
104
|
+
return {};
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
objectName: identifierName(objectValue(node, 'object')),
|
|
108
|
+
propertyName: identifierName(objectValue(node, 'property')),
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Internal helper exported for package-local composition.
|
|
113
|
+
*
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
export const effectCallPredicate = (source, names) => {
|
|
117
|
+
const memberNames = new Set(names);
|
|
118
|
+
const importAliases = new Set(effectImportAliases(source));
|
|
119
|
+
const functionAliases = new Set(names.flatMap((name) => effectFunctionAliases(source, 'Effect', name)));
|
|
120
|
+
return (callee) => {
|
|
121
|
+
const { objectName, propertyName } = memberParts(callee);
|
|
122
|
+
if (objectName && propertyName) {
|
|
123
|
+
return importAliases.has(objectName) && memberNames.has(propertyName);
|
|
124
|
+
}
|
|
125
|
+
const calleeName = identifierName(callee);
|
|
126
|
+
return Boolean(calleeName && functionAliases.has(calleeName));
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
const typeReferenceQualifiedName = (typeName) => {
|
|
130
|
+
if (nodeType(typeName) !== 'TSQualifiedName') {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
const leftName = identifierName(objectValue(typeName, 'left'));
|
|
134
|
+
const rightName = identifierName(objectValue(typeName, 'right'));
|
|
135
|
+
if (leftName && rightName) {
|
|
136
|
+
return `${leftName}.${rightName}`;
|
|
137
|
+
}
|
|
138
|
+
return undefined;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Internal helper exported for package-local composition.
|
|
142
|
+
*
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
export const propertyKeyName = (node) => {
|
|
146
|
+
const name = identifierName(node);
|
|
147
|
+
if (name) {
|
|
148
|
+
return name;
|
|
149
|
+
}
|
|
150
|
+
const value = literalValue(node);
|
|
151
|
+
if (typeof value === 'string') {
|
|
152
|
+
return value;
|
|
153
|
+
}
|
|
154
|
+
return undefined;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Internal helper exported for package-local composition.
|
|
158
|
+
*
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
export const typeReferenceName = (node) => {
|
|
162
|
+
if (nodeType(node) !== 'TSTypeReference') {
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
const typeName = objectValue(node, 'typeName');
|
|
166
|
+
if (nodeType(typeName) === 'Identifier') {
|
|
167
|
+
return identifierName(typeName);
|
|
168
|
+
}
|
|
169
|
+
return typeReferenceQualifiedName(typeName);
|
|
170
|
+
};
|
|
171
|
+
const firstTypeArgumentName = (node) => {
|
|
172
|
+
const typeArguments = objectValue(node, 'typeArguments');
|
|
173
|
+
const params = objectValue(typeArguments, 'params');
|
|
174
|
+
const [firstParam] = arrayValue(params);
|
|
175
|
+
return typeReferenceName(firstParam);
|
|
176
|
+
};
|
|
177
|
+
const effectServiceSelfFromInnerCall = (inner, outerSelf, source) => {
|
|
178
|
+
const { objectName, propertyName } = memberParts(objectValue(inner, 'callee'));
|
|
179
|
+
if (objectName === 'Context' && propertyName === 'Tag') {
|
|
180
|
+
return outerSelf;
|
|
181
|
+
}
|
|
182
|
+
if (objectName &&
|
|
183
|
+
propertyName === 'Service' &&
|
|
184
|
+
effectImportAliases(source).includes(objectName)) {
|
|
185
|
+
return firstTypeArgumentName(inner);
|
|
186
|
+
}
|
|
187
|
+
return undefined;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Internal helper exported for package-local composition.
|
|
191
|
+
*
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
export const effectServiceSelfName = (superClass, source) => {
|
|
195
|
+
if (nodeType(superClass) !== 'CallExpression') {
|
|
196
|
+
return undefined;
|
|
197
|
+
}
|
|
198
|
+
const typeArguments = objectValue(superClass, 'typeArguments');
|
|
199
|
+
const params = objectValue(typeArguments, 'params');
|
|
200
|
+
const [firstParam] = arrayValue(params);
|
|
201
|
+
const outerSelf = typeReferenceName(firstParam);
|
|
202
|
+
const inner = objectValue(superClass, 'callee');
|
|
203
|
+
if (nodeType(inner) !== 'CallExpression') {
|
|
204
|
+
return undefined;
|
|
205
|
+
}
|
|
206
|
+
return effectServiceSelfFromInnerCall(inner, outerSelf, source);
|
|
207
|
+
};
|
|
208
|
+
//# sourceMappingURL=effect-default-ast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect-default-ast.js","sourceRoot":"","sources":["../../src/rules/effect-default-ast.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAahF;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAoB,EAAE,OAAe,EAAE,IAAY,EAAQ,EAAE;IACrF,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAc,EAAqB,EAAE,CACvD,KAAK,KAAK,SAAS;IACnB,KAAK,KAAK,IAAI;IACd,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEnE;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAc,EAAE,GAAW,EAAY,EAAE;IACnE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,KAAK,GAAY,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAc,EAAc,EAAE;IACvD,IAAI,KAAK,CAAC,OAAO,CA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