@kutur-kit/oxc 0.0.0-stage → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +42 -2
- package/dist/anti-slop.d.ts +4 -0
- package/dist/anti-slop.d.ts.map +1 -0
- package/dist/anti-slop.js +42 -0
- package/dist/anti-slop.js.map +1 -0
- package/dist/base.d.ts +4 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +45 -0
- package/dist/base.js.map +1 -0
- package/dist/effect.d.ts +4 -0
- package/dist/effect.d.ts.map +1 -0
- package/dist/effect.js +8 -0
- package/dist/effect.js.map +1 -0
- package/dist/format.d.ts +4 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +26 -0
- package/dist/format.js.map +1 -0
- package/dist/plugin.d.ts +3 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +7 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/no-yield-in-if.d.ts +2 -0
- package/dist/rules/no-yield-in-if.d.ts.map +1 -0
- package/dist/rules/no-yield-in-if.js +30 -0
- package/dist/rules/no-yield-in-if.js.map +1 -0
- package/dist/vendor/anti-slop/effect/index.d.ts +4 -0
- package/dist/vendor/anti-slop/effect/index.d.ts.map +1 -0
- package/dist/vendor/anti-slop/effect/index.js +19 -0
- package/dist/vendor/anti-slop/effect/index.js.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-effect-error-tag.d.ts +2 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-effect-error-tag.d.ts.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-effect-error-tag.js +40 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-effect-error-tag.js.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tag-comparison.d.ts +2 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tag-comparison.d.ts.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tag-comparison.js +33 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tag-comparison.js.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tagged-construction.d.ts +2 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tagged-construction.d.ts.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tagged-construction.js +28 -0
- package/dist/vendor/anti-slop/effect/rules/no-manual-tagged-construction.js.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-service-constructor-imports.d.ts +3 -0
- package/dist/vendor/anti-slop/effect/rules/no-service-constructor-imports.d.ts.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/no-service-constructor-imports.js +45 -0
- package/dist/vendor/anti-slop/effect/rules/no-service-constructor-imports.js.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/prefer-effect-match.d.ts +2 -0
- package/dist/vendor/anti-slop/effect/rules/prefer-effect-match.d.ts.map +1 -0
- package/dist/vendor/anti-slop/effect/rules/prefer-effect-match.js +49 -0
- package/dist/vendor/anti-slop/effect/rules/prefer-effect-match.js.map +1 -0
- package/dist/vendor/anti-slop/effect/shared/tagged-values.d.ts +9 -0
- package/dist/vendor/anti-slop/effect/shared/tagged-values.d.ts.map +1 -0
- package/dist/vendor/anti-slop/effect/shared/tagged-values.js +69 -0
- package/dist/vendor/anti-slop/effect/shared/tagged-values.js.map +1 -0
- package/dist/vendor/anti-slop/index.d.ts +4 -0
- package/dist/vendor/anti-slop/index.d.ts.map +1 -0
- package/dist/vendor/anti-slop/index.js +45 -0
- package/dist/vendor/anti-slop/index.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-array-filter-map.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-array-filter-map.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-array-filter-map.js +31 -0
- package/dist/vendor/anti-slop/rules/no-array-filter-map.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-chained-type-assertions.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-chained-type-assertions.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-chained-type-assertions.js +61 -0
- package/dist/vendor/anti-slop/rules/no-chained-type-assertions.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-conditional-empty-object-spread.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-conditional-empty-object-spread.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-conditional-empty-object-spread.js +41 -0
- package/dist/vendor/anti-slop/rules/no-conditional-empty-object-spread.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-known-value-widening.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-known-value-widening.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-known-value-widening.js +301 -0
- package/dist/vendor/anti-slop/rules/no-known-value-widening.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-module-mocking.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-module-mocking.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-module-mocking.js +70 -0
- package/dist/vendor/anti-slop/rules/no-module-mocking.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-object-parameters.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-object-parameters.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-object-parameters.js +57 -0
- package/dist/vendor/anti-slop/rules/no-object-parameters.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-reduce-accumulator-copy.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-reduce-accumulator-copy.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-reduce-accumulator-copy.js +100 -0
- package/dist/vendor/anti-slop/rules/no-reduce-accumulator-copy.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-reflect-apply.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-reflect-apply.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-reflect-apply.js +26 -0
- package/dist/vendor/anti-slop/rules/no-reflect-apply.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-reflect-get.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-reflect-get.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-reflect-get.js +26 -0
- package/dist/vendor/anti-slop/rules/no-reflect-get.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-runtime-typeof.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-runtime-typeof.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-runtime-typeof.js +65 -0
- package/dist/vendor/anti-slop/rules/no-runtime-typeof.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-shape-in-symbol-names.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-shape-in-symbol-names.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-shape-in-symbol-names.js +41 -0
- package/dist/vendor/anti-slop/rules/no-shape-in-symbol-names.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unknown-parameters.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-unknown-parameters.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unknown-parameters.js +52 -0
- package/dist/vendor/anti-slop/rules/no-unknown-parameters.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unknown-returns.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-unknown-returns.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unknown-returns.js +59 -0
- package/dist/vendor/anti-slop/rules/no-unknown-returns.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unknown-type-aliases.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-unknown-type-aliases.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unknown-type-aliases.js +41 -0
- package/dist/vendor/anti-slop/rules/no-unknown-type-aliases.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unsafe-dictionary-type.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-unsafe-dictionary-type.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-unsafe-dictionary-type.js +135 -0
- package/dist/vendor/anti-slop/rules/no-unsafe-dictionary-type.js.map +1 -0
- package/dist/vendor/anti-slop/rules/no-widen-then-assert.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/no-widen-then-assert.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/no-widen-then-assert.js +271 -0
- package/dist/vendor/anti-slop/rules/no-widen-then-assert.js.map +1 -0
- package/dist/vendor/anti-slop/rules/require-readable-spacing.d.ts +4 -0
- package/dist/vendor/anti-slop/rules/require-readable-spacing.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/require-readable-spacing.js +42 -0
- package/dist/vendor/anti-slop/rules/require-readable-spacing.js.map +1 -0
- package/dist/vendor/anti-slop/rules/require-safety-comment-for-type-assertion.d.ts +3 -0
- package/dist/vendor/anti-slop/rules/require-safety-comment-for-type-assertion.d.ts.map +1 -0
- package/dist/vendor/anti-slop/rules/require-safety-comment-for-type-assertion.js +101 -0
- package/dist/vendor/anti-slop/rules/require-safety-comment-for-type-assertion.js.map +1 -0
- package/dist/vendor/anti-slop/shared/array-method.d.ts +13 -0
- package/dist/vendor/anti-slop/shared/array-method.d.ts.map +1 -0
- package/dist/vendor/anti-slop/shared/array-method.js +85 -0
- package/dist/vendor/anti-slop/shared/array-method.js.map +1 -0
- package/dist/vendor/anti-slop/shared/dictionary-types.d.ts +21 -0
- package/dist/vendor/anti-slop/shared/dictionary-types.d.ts.map +1 -0
- package/dist/vendor/anti-slop/shared/dictionary-types.js +378 -0
- package/dist/vendor/anti-slop/shared/dictionary-types.js.map +1 -0
- package/dist/vendor/anti-slop/shared/function-parameters.d.ts +9 -0
- package/dist/vendor/anti-slop/shared/function-parameters.d.ts.map +1 -0
- package/dist/vendor/anti-slop/shared/function-parameters.js +41 -0
- package/dist/vendor/anti-slop/shared/function-parameters.js.map +1 -0
- package/dist/vendor/anti-slop/shared/lexical-type-parameters.d.ts +6 -0
- package/dist/vendor/anti-slop/shared/lexical-type-parameters.d.ts.map +1 -0
- package/dist/vendor/anti-slop/shared/lexical-type-parameters.js +48 -0
- package/dist/vendor/anti-slop/shared/lexical-type-parameters.js.map +1 -0
- package/dist/vendor/anti-slop/shared/reflect-method.d.ts +4 -0
- package/dist/vendor/anti-slop/shared/reflect-method.d.ts.map +1 -0
- package/dist/vendor/anti-slop/shared/reflect-method.js +21 -0
- package/dist/vendor/anti-slop/shared/reflect-method.js.map +1 -0
- package/dist/vendor/anti-slop/shared/scope.d.ts +4 -0
- package/dist/vendor/anti-slop/shared/scope.d.ts.map +1 -0
- package/dist/vendor/anti-slop/shared/scope.js +12 -0
- package/dist/vendor/anti-slop/shared/scope.js.map +1 -0
- package/dist/vendor/anti-slop/shared/type-alias-resolution.d.ts +24 -0
- package/dist/vendor/anti-slop/shared/type-alias-resolution.d.ts.map +1 -0
- package/dist/vendor/anti-slop/shared/type-alias-resolution.js +163 -0
- package/dist/vendor/anti-slop/shared/type-alias-resolution.js.map +1 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-ast.d.ts +28 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-ast.d.ts.map +1 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-ast.js +29 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-ast.js.map +1 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-between-statements.d.ts +5 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-between-statements.d.ts.map +1 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-between-statements.js +699 -0
- package/dist/vendor/anti-slop/vendor/eslint-stylistic/padding-line-between-statements.js.map +1 -0
- package/package.json +71 -3
- package/src/anti-slop.ts +48 -0
- package/src/base.ts +49 -0
- package/src/effect.ts +12 -0
- package/src/format.ts +28 -0
- package/src/plugin.ts +8 -0
- package/src/rules/no-yield-in-if.ts +40 -0
- package/src/vendor/anti-slop/LICENSE +21 -0
- package/src/vendor/anti-slop/UPSTREAM.md +10 -0
- package/src/vendor/anti-slop/effect/index.ts +21 -0
- package/src/vendor/anti-slop/effect/rules/no-manual-effect-error-tag.ts +52 -0
- package/src/vendor/anti-slop/effect/rules/no-manual-tag-comparison.ts +45 -0
- package/src/vendor/anti-slop/effect/rules/no-manual-tagged-construction.ts +37 -0
- package/src/vendor/anti-slop/effect/rules/no-service-constructor-imports.ts +52 -0
- package/src/vendor/anti-slop/effect/rules/prefer-effect-match.ts +54 -0
- package/src/vendor/anti-slop/effect/shared/tagged-values.ts +97 -0
- package/src/vendor/anti-slop/index.ts +47 -0
- package/src/vendor/anti-slop/rules/no-array-filter-map.ts +28 -0
- package/src/vendor/anti-slop/rules/no-chained-type-assertions.ts +77 -0
- package/src/vendor/anti-slop/rules/no-conditional-empty-object-spread.ts +49 -0
- package/src/vendor/anti-slop/rules/no-known-value-widening.ts +415 -0
- package/src/vendor/anti-slop/rules/no-module-mocking.ts +80 -0
- package/src/vendor/anti-slop/rules/no-object-parameters.ts +83 -0
- package/src/vendor/anti-slop/rules/no-reduce-accumulator-copy.ts +109 -0
- package/src/vendor/anti-slop/rules/no-reflect-apply.ts +28 -0
- package/src/vendor/anti-slop/rules/no-reflect-get.ts +28 -0
- package/src/vendor/anti-slop/rules/no-runtime-typeof.ts +77 -0
- package/src/vendor/anti-slop/rules/no-shape-in-symbol-names.ts +46 -0
- package/src/vendor/anti-slop/rules/no-unknown-parameters.ts +69 -0
- package/src/vendor/anti-slop/rules/no-unknown-returns.ts +82 -0
- package/src/vendor/anti-slop/rules/no-unknown-type-aliases.ts +54 -0
- package/src/vendor/anti-slop/rules/no-unsafe-dictionary-type.ts +154 -0
- package/src/vendor/anti-slop/rules/no-widen-then-assert.ts +366 -0
- package/src/vendor/anti-slop/rules/require-readable-spacing.ts +47 -0
- package/src/vendor/anti-slop/rules/require-safety-comment-for-type-assertion.ts +131 -0
- package/src/vendor/anti-slop/shared/array-method.ts +94 -0
- package/src/vendor/anti-slop/shared/dictionary-types.ts +515 -0
- package/src/vendor/anti-slop/shared/function-parameters.ts +49 -0
- package/src/vendor/anti-slop/shared/lexical-type-parameters.ts +61 -0
- package/src/vendor/anti-slop/shared/reflect-method.ts +24 -0
- package/src/vendor/anti-slop/shared/scope.ts +15 -0
- package/src/vendor/anti-slop/shared/type-alias-resolution.ts +250 -0
- package/src/vendor/anti-slop/vendor/eslint-stylistic/LICENSE +22 -0
- package/src/vendor/anti-slop/vendor/eslint-stylistic/UPSTREAM.md +28 -0
- package/src/vendor/anti-slop/vendor/eslint-stylistic/padding-line-ast.ts +51 -0
- package/src/vendor/anti-slop/vendor/eslint-stylistic/padding-line-between-statements.ts +906 -0
- package/src/vendor/anti-slop/vendor/eslint-stylistic/padding-line-options.d.ts +87 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kutur Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kutur-kit/oxc
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Oxlint and Oxfmt presets for TypeScript, with optional Effect rules.
|
|
4
|
+
|
|
5
|
+
| Export | Required tools |
|
|
6
|
+
| ------------ | ------------------------------------------- |
|
|
7
|
+
| `/base` | `oxlint`, `oxlint-tsgolint` |
|
|
8
|
+
| `/effect` | `oxlint`, `oxlint-tsgolint`, `@effect/tsgo` |
|
|
9
|
+
| `/format` | `oxfmt` |
|
|
10
|
+
| `/anti-slop` | `oxlint` |
|
|
11
|
+
|
|
12
|
+
## Linting
|
|
13
|
+
|
|
14
|
+
`oxlint.config.ts`:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import antiSlop from "@kutur-kit/oxc/anti-slop";
|
|
18
|
+
import effect from "@kutur-kit/oxc/effect";
|
|
19
|
+
import { defineConfig } from "oxlint";
|
|
20
|
+
|
|
21
|
+
export default defineConfig({
|
|
22
|
+
extends: [effect, antiSlop],
|
|
23
|
+
options: { typeAware: true, maxWarnings: 0 },
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Install the required tools in `devDependencies` and include linted files in your tsconfig. For Effect rules, run `pnpm exec effect-tsgo patch --oxlint` after installation. Check [supported tool versions](https://github.com/Effect-TS/tsgo#supported-package-versions) when upgrading.
|
|
28
|
+
|
|
29
|
+
`/anti-slop` is optional and includes the generic and Effect rules from [anti-slop](https://github.com/dmmulroy/anti-slop).
|
|
30
|
+
|
|
31
|
+
## Formatting
|
|
32
|
+
|
|
33
|
+
`oxfmt.config.ts`:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import format from "@kutur-kit/oxc/format";
|
|
37
|
+
import { defineConfig } from "oxfmt";
|
|
38
|
+
|
|
39
|
+
export default defineConfig({
|
|
40
|
+
...format,
|
|
41
|
+
ignorePatterns: ["**/dist/**", "**/coverage/**"],
|
|
42
|
+
});
|
|
43
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anti-slop.d.ts","sourceRoot":"","sources":["../src/anti-slop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAM3C,QAAA,MAAM,QAAQ,EAAE,YAuCf,CAAC;eAEa,QAAQ"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
const extension = import.meta.url.endsWith(".ts") ? "ts" : "js";
|
|
3
|
+
const antiSlop = {
|
|
4
|
+
jsPlugins: [
|
|
5
|
+
{
|
|
6
|
+
name: "anti-slop",
|
|
7
|
+
specifier: fileURLToPath(new URL(`./vendor/anti-slop/index.${extension}`, import.meta.url)),
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: "anti-slop-effect",
|
|
11
|
+
specifier: fileURLToPath(new URL(`./vendor/anti-slop/effect/index.${extension}`, import.meta.url)),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
rules: {
|
|
15
|
+
"oxc/no-accumulating-spread": "error",
|
|
16
|
+
"anti-slop/no-array-filter-map": "error",
|
|
17
|
+
"anti-slop/no-reduce-accumulator-copy": "error",
|
|
18
|
+
"anti-slop/no-chained-type-assertions": "error",
|
|
19
|
+
"anti-slop/no-conditional-empty-object-spread": "error",
|
|
20
|
+
"anti-slop/no-known-value-widening": "error",
|
|
21
|
+
"anti-slop/no-module-mocking": "error",
|
|
22
|
+
"anti-slop/no-object-parameters": "error",
|
|
23
|
+
"anti-slop/no-reflect-apply": "error",
|
|
24
|
+
"anti-slop/no-reflect-get": "error",
|
|
25
|
+
"anti-slop/no-runtime-typeof": "error",
|
|
26
|
+
"anti-slop/no-unsafe-dictionary-type": "error",
|
|
27
|
+
"anti-slop/no-shape-in-symbol-names": "error",
|
|
28
|
+
"anti-slop/no-unknown-parameters": "error",
|
|
29
|
+
"anti-slop/no-unknown-returns": "error",
|
|
30
|
+
"anti-slop/no-unknown-type-aliases": "error",
|
|
31
|
+
"anti-slop/no-widen-then-assert": "error",
|
|
32
|
+
"anti-slop/require-readable-spacing": "error",
|
|
33
|
+
"anti-slop/require-safety-comment-for-type-assertion": "error",
|
|
34
|
+
"anti-slop-effect/no-manual-effect-error-tag": "error",
|
|
35
|
+
"anti-slop-effect/no-manual-tag-comparison": "error",
|
|
36
|
+
"anti-slop-effect/no-manual-tagged-construction": "error",
|
|
37
|
+
"anti-slop-effect/no-service-constructor-imports": "error",
|
|
38
|
+
"anti-slop-effect/prefer-effect-match": "error",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
export default antiSlop;
|
|
42
|
+
//# sourceMappingURL=anti-slop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anti-slop.js","sourceRoot":"","sources":["../src/anti-slop.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAEhE,MAAM,QAAQ,GAAiB;IAC7B,SAAS,EAAE;QACT;YACE,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,aAAa,CAAC,IAAI,GAAG,CAAC,4BAA4B,SAAS,EAAE,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;SAC5F;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,SAAS,EAAE,aAAa,CACtB,IAAI,GAAG,CAAC,mCAAmC,SAAS,EAAE,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CACzE;SACF;KACF;IACD,KAAK,EAAE;QACL,4BAA4B,EAAE,OAAO;QACrC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,OAAO;QAC/C,sCAAsC,EAAE,OAAO;QAC/C,8CAA8C,EAAE,OAAO;QACvD,mCAAmC,EAAE,OAAO;QAC5C,6BAA6B,EAAE,OAAO;QACtC,gCAAgC,EAAE,OAAO;QACzC,4BAA4B,EAAE,OAAO;QACrC,0BAA0B,EAAE,OAAO;QACnC,6BAA6B,EAAE,OAAO;QACtC,qCAAqC,EAAE,OAAO;QAC9C,oCAAoC,EAAE,OAAO;QAC7C,iCAAiC,EAAE,OAAO;QAC1C,8BAA8B,EAAE,OAAO;QACvC,mCAAmC,EAAE,OAAO;QAC5C,gCAAgC,EAAE,OAAO;QACzC,oCAAoC,EAAE,OAAO;QAC7C,qDAAqD,EAAE,OAAO;QAC9D,6CAA6C,EAAE,OAAO;QACtD,2CAA2C,EAAE,OAAO;QACpD,gDAAgD,EAAE,OAAO;QACzD,iDAAiD,EAAE,OAAO;QAC1D,sCAAsC,EAAE,OAAO;KAChD;CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAM3C,QAAA,MAAM,IAAI,EAAE,YAwCX,CAAC;eAEa,IAAI"}
|
package/dist/base.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
const extension = import.meta.url.endsWith(".ts") ? "ts" : "js";
|
|
3
|
+
const base = {
|
|
4
|
+
jsPlugins: [
|
|
5
|
+
{
|
|
6
|
+
name: "kit",
|
|
7
|
+
specifier: fileURLToPath(new URL(`./plugin.${extension}`, import.meta.url)),
|
|
8
|
+
},
|
|
9
|
+
{ name: "sonarjs", specifier: fileURLToPath(import.meta.resolve("eslint-plugin-sonarjs")) },
|
|
10
|
+
],
|
|
11
|
+
plugins: ["typescript", "oxc", "unicorn", "import"],
|
|
12
|
+
categories: { correctness: "error" },
|
|
13
|
+
rules: {
|
|
14
|
+
"kit/no-yield-in-if": "error",
|
|
15
|
+
"sonarjs/cognitive-complexity": ["error", 15],
|
|
16
|
+
"max-depth": ["error", 3],
|
|
17
|
+
"typescript/no-explicit-any": "error",
|
|
18
|
+
"typescript/switch-exhaustiveness-check": "error",
|
|
19
|
+
"typescript/no-deprecated": "error",
|
|
20
|
+
"typescript/no-unsafe-assignment": "error",
|
|
21
|
+
"typescript/no-unsafe-argument": "error",
|
|
22
|
+
"typescript/no-unsafe-call": "error",
|
|
23
|
+
"typescript/no-unsafe-member-access": "error",
|
|
24
|
+
"typescript/no-unsafe-return": "error",
|
|
25
|
+
"typescript/consistent-type-imports": "error",
|
|
26
|
+
"typescript/consistent-type-exports": "error",
|
|
27
|
+
"typescript/no-import-type-side-effects": "error",
|
|
28
|
+
"typescript/no-non-null-assertion": "error",
|
|
29
|
+
"typescript/no-floating-promises": "error",
|
|
30
|
+
"typescript/no-misused-promises": "error",
|
|
31
|
+
"import/first": "error",
|
|
32
|
+
"import/no-self-import": "error",
|
|
33
|
+
"import/no-mutable-exports": "error",
|
|
34
|
+
"no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
|
|
35
|
+
eqeqeq: ["error", "always", { null: "ignore" }],
|
|
36
|
+
"no-var": "error",
|
|
37
|
+
"unicorn/prefer-node-protocol": "error",
|
|
38
|
+
"unicorn/filename-case": ["error", { cases: { kebabCase: true, pascalCase: true } }],
|
|
39
|
+
"no-debugger": "error",
|
|
40
|
+
"prefer-const": "error",
|
|
41
|
+
},
|
|
42
|
+
options: { typeAware: true },
|
|
43
|
+
};
|
|
44
|
+
export default base;
|
|
45
|
+
//# sourceMappingURL=base.js.map
|
package/dist/base.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAEhE,MAAM,IAAI,GAAiB;IACzB,SAAS,EAAE;QACT;YACE,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,aAAa,CAAC,IAAI,GAAG,CAAC,YAAY,SAAS,EAAE,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;SAC5E;QACD,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,EAAE;KAC5F;IACD,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;IACnD,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE;IACpC,KAAK,EAAE;QACL,oBAAoB,EAAE,OAAO;QAC7B,8BAA8B,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;QAC7C,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QACzB,4BAA4B,EAAE,OAAO;QACrC,wCAAwC,EAAE,OAAO;QACjD,0BAA0B,EAAE,OAAO;QACnC,iCAAiC,EAAE,OAAO;QAC1C,+BAA+B,EAAE,OAAO;QACxC,2BAA2B,EAAE,OAAO;QACpC,oCAAoC,EAAE,OAAO;QAC7C,6BAA6B,EAAE,OAAO;QACtC,oCAAoC,EAAE,OAAO;QAC7C,oCAAoC,EAAE,OAAO;QAC7C,wCAAwC,EAAE,OAAO;QACjD,kCAAkC,EAAE,OAAO;QAC3C,iCAAiC,EAAE,OAAO;QAC1C,gCAAgC,EAAE,OAAO;QACzC,cAAc,EAAE,OAAO;QACvB,uBAAuB,EAAE,OAAO;QAChC,2BAA2B,EAAE,OAAO;QACpC,sBAAsB,EAAE,CAAC,OAAO,EAAE,EAAE,wBAAwB,EAAE,IAAI,EAAE,CAAC;QACrE,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC/C,QAAQ,EAAE,OAAO;QACjB,8BAA8B,EAAE,OAAO;QACvC,uBAAuB,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;QACpF,aAAa,EAAE,OAAO;QACtB,cAAc,EAAE,OAAO;KACxB;IACD,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;CAC7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/dist/effect.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../src/effect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAM3C,QAAA,MAAM,MAAM,EAAE,YAGb,CAAC;eAEa,MAAM"}
|
package/dist/effect.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect.js","sourceRoot":"","sources":["../src/effect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,MAAM,GAAiB;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC;IAC5B,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;CAC7B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/format.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC,QAAA,MAAM,MAAM,EAAE,WAuBb,CAAC;eAEa,MAAM"}
|
package/dist/format.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const format = {
|
|
2
|
+
printWidth: 100,
|
|
3
|
+
tabWidth: 2,
|
|
4
|
+
useTabs: false,
|
|
5
|
+
semi: true,
|
|
6
|
+
singleQuote: false,
|
|
7
|
+
trailingComma: "all",
|
|
8
|
+
endOfLine: "lf",
|
|
9
|
+
sortImports: {
|
|
10
|
+
groups: [
|
|
11
|
+
"type",
|
|
12
|
+
"builtin",
|
|
13
|
+
"external",
|
|
14
|
+
["internal", "subpath"],
|
|
15
|
+
["parent", "sibling", "index"],
|
|
16
|
+
"style",
|
|
17
|
+
"unknown",
|
|
18
|
+
],
|
|
19
|
+
order: "asc",
|
|
20
|
+
newlinesBetween: true,
|
|
21
|
+
sortSideEffects: false,
|
|
22
|
+
},
|
|
23
|
+
sortPackageJson: { sortScripts: true },
|
|
24
|
+
};
|
|
25
|
+
export default format;
|
|
26
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAgB;IAC1B,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,KAAK;IAClB,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE;QACX,MAAM,EAAE;YACN,MAAM;YACN,SAAS;YACT,UAAU;YACV,CAAC,UAAU,EAAE,SAAS,CAAC;YACvB,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;YAC9B,OAAO;YACP,SAAS;SACV;QACD,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,IAAI;QACrB,eAAe,EAAE,KAAK;KACvB;IACD,eAAe,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;CACvC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":""}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAChC,KAAK,EAAE,EAAE,gBAAgB,EAAE,WAAW,EAAE;CACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-yield-in-if.d.ts","sourceRoot":"","sources":["../../src/rules/no-yield-in-if.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,gCAmCtB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineRule } from "@oxlint/plugins";
|
|
2
|
+
export const noYieldInIf = defineRule({
|
|
3
|
+
meta: {
|
|
4
|
+
type: "suggestion",
|
|
5
|
+
docs: { description: "Disallow yield in if conditions and branches." },
|
|
6
|
+
schema: [],
|
|
7
|
+
messages: {
|
|
8
|
+
noYieldInIf: "Move yield outside the if statement. Compose the conditional operation first.",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
createOnce(context) {
|
|
12
|
+
return {
|
|
13
|
+
YieldExpression(node) {
|
|
14
|
+
for (let parent = node.parent; parent !== null; parent = parent.parent) {
|
|
15
|
+
if (parent.type === "IfStatement") {
|
|
16
|
+
context.report({ node, messageId: "noYieldInIf" });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// A nested generator owns its yields, even when declared inside an if.
|
|
20
|
+
if (parent.type === "FunctionDeclaration" ||
|
|
21
|
+
parent.type === "FunctionExpression" ||
|
|
22
|
+
parent.type === "ArrowFunctionExpression") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=no-yield-in-if.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-yield-in-if.js","sourceRoot":"","sources":["../../src/rules/no-yield-in-if.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE;QACtE,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,WAAW,EAAE,+EAA+E;SAC7F;KACF;IACD,UAAU,CAAC,OAAO;QAChB,OAAO;YACL,eAAe,CAAC,IAAI;gBAClB,KACE,IAAI,MAAM,GAAuB,IAAI,CAAC,MAAM,EAC5C,MAAM,KAAK,IAAI,EACf,MAAM,GAAG,MAAM,CAAC,MAAM,EACtB,CAAC;oBACD,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;wBAClC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;wBAEnD,OAAO;oBACT,CAAC;oBAED,uEAAuE;oBACvE,IACE,MAAM,CAAC,IAAI,KAAK,qBAAqB;wBACrC,MAAM,CAAC,IAAI,KAAK,oBAAoB;wBACpC,MAAM,CAAC,IAAI,KAAK,yBAAyB,EACzC,CAAC;wBACD,OAAO;oBACT,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/vendor/anti-slop/effect/index.ts"],"names":[],"mappings":"AAQA,qEAAqE;AACrE,QAAA,MAAM,oBAAoB,kCASxB,CAAC;eAEY,oBAAoB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { eslintCompatPlugin } from "@oxlint/plugins";
|
|
2
|
+
import { noManualEffectErrorTagRule } from "./rules/no-manual-effect-error-tag.js";
|
|
3
|
+
import { noManualTagComparisonRule } from "./rules/no-manual-tag-comparison.js";
|
|
4
|
+
import { noManualTaggedConstructionRule } from "./rules/no-manual-tagged-construction.js";
|
|
5
|
+
import { noServiceConstructorImportsRule } from "./rules/no-service-constructor-imports.js";
|
|
6
|
+
import { preferEffectMatchRule } from "./rules/prefer-effect-match.js";
|
|
7
|
+
/** Opt-in Oxlint rules for Effect service and Layer architecture. */
|
|
8
|
+
const antiSlopEffectPlugin = eslintCompatPlugin({
|
|
9
|
+
meta: { name: "anti-slop-effect" },
|
|
10
|
+
rules: {
|
|
11
|
+
"no-manual-effect-error-tag": noManualEffectErrorTagRule,
|
|
12
|
+
"no-manual-tag-comparison": noManualTagComparisonRule,
|
|
13
|
+
"no-manual-tagged-construction": noManualTaggedConstructionRule,
|
|
14
|
+
"no-service-constructor-imports": noServiceConstructorImportsRule,
|
|
15
|
+
"prefer-effect-match": preferEffectMatchRule,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export default antiSlopEffectPlugin;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/vendor/anti-slop/effect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,qEAAqE;AACrE,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;IAC/C,IAAI,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;IAClC,KAAK,EAAE;QACN,4BAA4B,EAAE,0BAA0B;QACxD,0BAA0B,EAAE,yBAAyB;QACrD,+BAA+B,EAAE,8BAA8B;QAC/D,gCAAgC,EAAE,+BAA+B;QACjE,qBAAqB,EAAE,qBAAqB;KAC5C;CACD,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-manual-effect-error-tag.d.ts","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-manual-effect-error-tag.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,0BAA0B,gCA0CrC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineRule } from "@oxlint/plugins";
|
|
2
|
+
import { isInsideBroadEffectHandler, isReasonTagMember, isTagMember, tagMemberFromComparison, } from "../shared/tagged-values.js";
|
|
3
|
+
export const noManualEffectErrorTagRule = defineRule({
|
|
4
|
+
meta: {
|
|
5
|
+
type: "problem",
|
|
6
|
+
docs: {
|
|
7
|
+
description: "Use Effect tagged error handlers instead of manually branching on `_tag` in a catch handler.",
|
|
8
|
+
},
|
|
9
|
+
messages: {
|
|
10
|
+
tag: "Use Effect.catchTag or Effect.catchTags instead of manually discriminating a tagged error in a broad Effect catch handler.",
|
|
11
|
+
reason: "Use Effect.catchReason or Effect.catchReasons instead of manually discriminating a tagged `reason` in a broad Effect catch handler.",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
createOnce(context) {
|
|
15
|
+
return {
|
|
16
|
+
BinaryExpression(node) {
|
|
17
|
+
const tagMember = tagMemberFromComparison(node);
|
|
18
|
+
if (tagMember === undefined ||
|
|
19
|
+
!isInsideBroadEffectHandler(node)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
context.report({
|
|
23
|
+
node,
|
|
24
|
+
messageId: isReasonTagMember(tagMember) ? "reason" : "tag",
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
SwitchStatement(node) {
|
|
28
|
+
if (!isTagMember(node.discriminant) ||
|
|
29
|
+
!isInsideBroadEffectHandler(node)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
context.report({
|
|
33
|
+
node,
|
|
34
|
+
messageId: isReasonTagMember(node.discriminant) ? "reason" : "tag",
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=no-manual-effect-error-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-manual-effect-error-tag.js","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-manual-effect-error-tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACN,0BAA0B,EAC1B,iBAAiB,EACjB,WAAW,EACX,uBAAuB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC;IACpD,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EACV,8FAA8F;SAC/F;QACD,QAAQ,EAAE;YACT,GAAG,EAAE,4HAA4H;YACjI,MAAM,EACL,qIAAqI;SACtI;KACD;IACD,UAAU,CAAC,OAAO;QACjB,OAAO;YACN,gBAAgB,CAAC,IAAI;gBACpB,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;gBAChD,IACC,SAAS,KAAK,SAAS;oBACvB,CAAC,0BAA0B,CAAC,IAAI,CAAC,EAChC,CAAC;oBACF,OAAO;gBACR,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC;oBACd,IAAI;oBACJ,SAAS,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;iBAC1D,CAAC,CAAC;YACJ,CAAC;YACD,eAAe,CAAC,IAAI;gBACnB,IACC,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;oBAC/B,CAAC,0BAA0B,CAAC,IAAI,CAAC,EAChC,CAAC;oBACF,OAAO;gBACR,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC;oBACd,IAAI;oBACJ,SAAS,EAAE,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;iBAClE,CAAC,CAAC;YACJ,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-manual-tag-comparison.d.ts","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-manual-tag-comparison.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB,gCAoCpC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineRule } from "@oxlint/plugins";
|
|
2
|
+
import { isInsideBroadEffectHandler, isTagMember, tagMemberFromComparison, } from "../shared/tagged-values.js";
|
|
3
|
+
export const noManualTagComparisonRule = defineRule({
|
|
4
|
+
meta: {
|
|
5
|
+
type: "problem",
|
|
6
|
+
docs: {
|
|
7
|
+
description: "Use Effect Match or Predicate helpers instead of manually branching on `_tag`.",
|
|
8
|
+
},
|
|
9
|
+
messages: {
|
|
10
|
+
manualComparison: "Use Match.tag/Match.tags for tagged-value branching, or Predicate.isTagged for a simple reusable predicate.",
|
|
11
|
+
manualSwitch: "Use Match.value(value).pipe(Match.tag/Match.tags/Match.tagsExhaustive) or the tagged enum `$match` helper instead of switching on `_tag`.",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
createOnce(context) {
|
|
15
|
+
return {
|
|
16
|
+
BinaryExpression(node) {
|
|
17
|
+
if (tagMemberFromComparison(node) === undefined ||
|
|
18
|
+
isInsideBroadEffectHandler(node)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
context.report({ node, messageId: "manualComparison" });
|
|
22
|
+
},
|
|
23
|
+
SwitchStatement(node) {
|
|
24
|
+
if (!isTagMember(node.discriminant) ||
|
|
25
|
+
isInsideBroadEffectHandler(node)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
context.report({ node, messageId: "manualSwitch" });
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=no-manual-tag-comparison.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-manual-tag-comparison.js","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-manual-tag-comparison.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACN,0BAA0B,EAC1B,WAAW,EACX,uBAAuB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;IACnD,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EACV,gFAAgF;SACjF;QACD,QAAQ,EAAE;YACT,gBAAgB,EACf,6GAA6G;YAC9G,YAAY,EACX,2IAA2I;SAC5I;KACD;IACD,UAAU,CAAC,OAAO;QACjB,OAAO;YACN,gBAAgB,CAAC,IAAI;gBACpB,IACC,uBAAuB,CAAC,IAAI,CAAC,KAAK,SAAS;oBAC3C,0BAA0B,CAAC,IAAI,CAAC,EAC/B,CAAC;oBACF,OAAO;gBACR,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC;YACzD,CAAC;YACD,eAAe,CAAC,IAAI;gBACnB,IACC,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;oBAC/B,0BAA0B,CAAC,IAAI,CAAC,EAC/B,CAAC;oBACF,OAAO;gBACR,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;YACrD,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-manual-tagged-construction.d.ts","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-manual-tagged-construction.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,8BAA8B,gCA4BzC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineRule } from "@oxlint/plugins";
|
|
2
|
+
import { isMatchPatternObject, isStringLiteral, propertyName, } from "../shared/tagged-values.js";
|
|
3
|
+
export const noManualTaggedConstructionRule = defineRule({
|
|
4
|
+
meta: {
|
|
5
|
+
type: "problem",
|
|
6
|
+
docs: {
|
|
7
|
+
description: "Construct tagged values with their existing Effect constructor instead of writing `_tag` manually.",
|
|
8
|
+
},
|
|
9
|
+
messages: {
|
|
10
|
+
manualConstruction: "Use the existing Schema tagged `.make`, tagged class/error constructor, or Data.taggedEnum variant constructor instead of writing a literal `_tag` object.",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
createOnce(context) {
|
|
14
|
+
return {
|
|
15
|
+
ObjectExpression(node) {
|
|
16
|
+
if (isMatchPatternObject(node))
|
|
17
|
+
return;
|
|
18
|
+
const tag = node.properties.find((property) => property.type === "Property" &&
|
|
19
|
+
propertyName(property) === "_tag" &&
|
|
20
|
+
isStringLiteral(property.value));
|
|
21
|
+
if (tag !== undefined) {
|
|
22
|
+
context.report({ node: tag, messageId: "manualConstruction" });
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=no-manual-tagged-construction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-manual-tagged-construction.js","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-manual-tagged-construction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACN,oBAAoB,EACpB,eAAe,EACf,YAAY,GACZ,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,CAAC;IACxD,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EACV,oGAAoG;SACrG;QACD,QAAQ,EAAE;YACT,kBAAkB,EACjB,4JAA4J;SAC7J;KACD;IACD,UAAU,CAAC,OAAO;QACjB,OAAO;YACN,gBAAgB,CAAC,IAAI;gBACpB,IAAI,oBAAoB,CAAC,IAAI,CAAC;oBAAE,OAAO;gBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAC/B,CAAC,QAAQ,EAAE,EAAE,CACZ,QAAQ,CAAC,IAAI,KAAK,UAAU;oBAC5B,YAAY,CAAC,QAAQ,CAAC,KAAK,MAAM;oBACjC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAChC,CAAC;gBACF,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;oBACvB,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC,CAAC;gBAChE,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-service-constructor-imports.d.ts","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-service-constructor-imports.ts"],"names":[],"mappings":"AAgBA,oGAAoG;AACpG,eAAO,MAAM,+BAA+B,gCAkC1C,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineRule } from "@oxlint/plugins";
|
|
2
|
+
const SERVICE_CONSTRUCTOR_NAME = /^make[A-Z]/u;
|
|
3
|
+
const TEST_FILE = /\.(?:test|spec)\.[cm]?[jt]sx?$/u;
|
|
4
|
+
function isProjectLocalImport(source) {
|
|
5
|
+
return source.startsWith("./") || source.startsWith("../");
|
|
6
|
+
}
|
|
7
|
+
function getImportedName(specifier) {
|
|
8
|
+
if (specifier.imported.type === "Identifier")
|
|
9
|
+
return specifier.imported.name;
|
|
10
|
+
return specifier.imported.value;
|
|
11
|
+
}
|
|
12
|
+
/** Keep dependency-bearing Effect service constructors local to their owning capability modules. */
|
|
13
|
+
export const noServiceConstructorImportsRule = defineRule({
|
|
14
|
+
meta: {
|
|
15
|
+
type: "problem",
|
|
16
|
+
docs: {
|
|
17
|
+
description: "Disallow project-local make<CapabilityName> imports outside test and spec files.",
|
|
18
|
+
},
|
|
19
|
+
messages: {
|
|
20
|
+
serviceConstructorImport: 'Do not import Effect service constructor "{{name}}" into runtime code. Import the owning Layer, yield the contextual service, and allow its requirements to propagate to the composition root.',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
create(context) {
|
|
24
|
+
const isTestFile = TEST_FILE.test(context.filename.replaceAll("\\", "/"));
|
|
25
|
+
return {
|
|
26
|
+
ImportDeclaration(node) {
|
|
27
|
+
if (isTestFile || !isProjectLocalImport(node.source.value))
|
|
28
|
+
return;
|
|
29
|
+
for (const specifier of node.specifiers) {
|
|
30
|
+
if (specifier.type !== "ImportSpecifier")
|
|
31
|
+
continue;
|
|
32
|
+
const importedName = getImportedName(specifier);
|
|
33
|
+
if (!SERVICE_CONSTRUCTOR_NAME.test(importedName))
|
|
34
|
+
continue;
|
|
35
|
+
context.report({
|
|
36
|
+
node: specifier,
|
|
37
|
+
messageId: "serviceConstructorImport",
|
|
38
|
+
data: { name: importedName },
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=no-service-constructor-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-service-constructor-imports.js","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/no-service-constructor-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,MAAM,wBAAwB,GAAG,aAAa,CAAC;AAC/C,MAAM,SAAS,GAAG,iCAAiC,CAAC;AAEpD,SAAS,oBAAoB,CAAC,MAAc;IAC3C,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,eAAe,CAAC,SAAiC;IACzD,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC7E,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;AACjC,CAAC;AAED,oGAAoG;AACpG,MAAM,CAAC,MAAM,+BAA+B,GAAG,UAAU,CAAC;IACzD,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EACV,kFAAkF;SACnF;QACD,QAAQ,EAAE;YACT,wBAAwB,EACvB,gMAAgM;SACjM;KACD;IACD,MAAM,CAAC,OAAO;QACb,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;QAE1E,OAAO;YACN,iBAAiB,CAAC,IAAI;gBACrB,IAAI,UAAU,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;oBAAE,OAAO;gBAEnE,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;oBACzC,IAAI,SAAS,CAAC,IAAI,KAAK,iBAAiB;wBAAE,SAAS;oBAEnD,MAAM,YAAY,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;oBAChD,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,YAAY,CAAC;wBAAE,SAAS;oBAE3D,OAAO,CAAC,MAAM,CAAC;wBACd,IAAI,EAAE,SAAS;wBACf,SAAS,EAAE,0BAA0B;wBACrC,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;qBAC5B,CAAC,CAAC;gBACJ,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefer-effect-match.d.ts","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/prefer-effect-match.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,gCAiDhC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineRule } from "@oxlint/plugins";
|
|
2
|
+
const equalityOperators = new Set(["==", "===", "!=", "!=="]);
|
|
3
|
+
export const preferEffectMatchRule = defineRule({
|
|
4
|
+
meta: {
|
|
5
|
+
type: "problem",
|
|
6
|
+
docs: {
|
|
7
|
+
description: "Use Match from Effect for chained literal ternaries over the same value.",
|
|
8
|
+
},
|
|
9
|
+
messages: {
|
|
10
|
+
preferMatch: "Use Match from Effect instead of a chained literal ternary.",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
createOnce(context) {
|
|
14
|
+
const isLiteral = (node) => node.type === "Literal" ||
|
|
15
|
+
(node.type === "TemplateLiteral" && node.expressions.length === 0);
|
|
16
|
+
const comparedValue = (node) => {
|
|
17
|
+
if (node.type !== "BinaryExpression" ||
|
|
18
|
+
!equalityOperators.has(node.operator)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
if (isLiteral(node.left))
|
|
22
|
+
return context.sourceCode.getText(node.right);
|
|
23
|
+
if (isLiteral(node.right))
|
|
24
|
+
return context.sourceCode.getText(node.left);
|
|
25
|
+
return undefined;
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
ConditionalExpression(node) {
|
|
29
|
+
if (node.parent?.type === "ConditionalExpression")
|
|
30
|
+
return;
|
|
31
|
+
const value = comparedValue(node.test);
|
|
32
|
+
if (value === undefined)
|
|
33
|
+
return;
|
|
34
|
+
let alternate = node.alternate;
|
|
35
|
+
let literalChecks = 1;
|
|
36
|
+
while (alternate.type === "ConditionalExpression") {
|
|
37
|
+
if (comparedValue(alternate.test) !== value)
|
|
38
|
+
return;
|
|
39
|
+
literalChecks += 1;
|
|
40
|
+
alternate = alternate.alternate;
|
|
41
|
+
}
|
|
42
|
+
if (literalChecks > 1) {
|
|
43
|
+
context.report({ node, messageId: "preferMatch" });
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=prefer-effect-match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefer-effect-match.js","sourceRoot":"","sources":["../../../../../src/vendor/anti-slop/effect/rules/prefer-effect-match.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAE1D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;IAC/C,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EACV,0EAA0E;SAC3E;QACD,QAAQ,EAAE;YACT,WAAW,EACV,6DAA6D;SAC9D;KACD;IACD,UAAU,CAAC,OAAO;QACjB,MAAM,SAAS,GAAG,CAAC,IAAiB,EAAW,EAAE,CAChD,IAAI,CAAC,IAAI,KAAK,SAAS;YACvB,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;QAEpE,MAAM,aAAa,GAAG,CAAC,IAAuB,EAAsB,EAAE;YACrE,IACC,IAAI,CAAC,IAAI,KAAK,kBAAkB;gBAChC,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,EACpC,CAAC;gBACF,OAAO,SAAS,CAAC;YAClB,CAAC;YACD,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,OAAO,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxE,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;gBAAE,OAAO,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxE,OAAO,SAAS,CAAC;QAClB,CAAC,CAAC;QAEF,OAAO;YACN,qBAAqB,CAAC,IAAI;gBACzB,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,KAAK,uBAAuB;oBAAE,OAAO;gBAC1D,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACvC,IAAI,KAAK,KAAK,SAAS;oBAAE,OAAO;gBAEhC,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;gBAC/B,IAAI,aAAa,GAAG,CAAC,CAAC;gBACtB,OAAO,SAAS,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;oBACnD,IAAI,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,KAAK;wBAAE,OAAO;oBACpD,aAAa,IAAI,CAAC,CAAC;oBACnB,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;gBACjC,CAAC;gBAED,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;oBACvB,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;gBACpD,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|