oxlint-plugin-effect 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +82 -0
  2. package/dist/index.d.ts +14 -2
  3. package/dist/index.js +13 -1
  4. package/dist/presets/core.d.ts +6 -0
  5. package/dist/presets/core.js +7 -1
  6. package/dist/presets/full.d.ts +7 -0
  7. package/dist/presets/full.js +8 -1
  8. package/dist/presets/functional.d.ts +1 -0
  9. package/dist/presets/functional.js +2 -1
  10. package/dist/presets/index.d.ts +3 -2
  11. package/dist/presets/index.js +4 -2
  12. package/dist/presets/strict.d.ts +7 -5
  13. package/dist/presets/strict.js +8 -6
  14. package/dist/presets/v3-strict.d.ts +16 -0
  15. package/dist/presets/v3-strict.js +16 -0
  16. package/dist/presets/v3.d.ts +10 -7
  17. package/dist/presets/v3.js +10 -7
  18. package/dist/rules/index.d.ts +9 -2
  19. package/dist/rules/index.js +15 -1
  20. package/dist/rules/no-dynamic-imports.d.ts +6 -0
  21. package/dist/rules/no-dynamic-imports.js +90 -0
  22. package/dist/rules/no-hand-rolled-tagged-union.d.ts +6 -0
  23. package/dist/rules/no-hand-rolled-tagged-union.js +70 -0
  24. package/dist/rules/no-make-unsafe.d.ts +6 -0
  25. package/dist/rules/no-make-unsafe.js +30 -0
  26. package/dist/rules/no-promise-control-flow-in-tests.d.ts +6 -0
  27. package/dist/rules/no-promise-control-flow-in-tests.js +94 -0
  28. package/dist/rules/no-schema-struct.d.ts +6 -0
  29. package/dist/rules/no-schema-struct.js +28 -0
  30. package/dist/rules/no-sleep-in-tests.d.ts +6 -0
  31. package/dist/rules/no-sleep-in-tests.js +55 -0
  32. package/dist/rules/no-spread.d.ts +6 -0
  33. package/dist/rules/no-spread.js +26 -0
  34. package/dist/vendor/effect-oxlint/Rule.d.ts +6 -6
  35. package/dist/vendor/effect-oxlint/RuleContext.d.ts +1 -1
  36. package/dist/vendor/effect-oxlint/RuleContext.js +1 -1
  37. package/dist/vendor/effect-oxlint/Testing.js +4 -1
  38. package/dist/vendor/effect-oxlint/Visitor.d.ts +1 -1
  39. package/dist/vendor/effect-oxlint/index.d.ts +7 -1
  40. package/dist/vendor/effect-oxlint/index.js +24 -1
  41. package/package.json +23 -10
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # oxlint-plugin-effect
2
+
3
+ Oxlint plugin for [Effect](https://effect.website) codebases.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ bun add -D oxlint oxlint-plugin-effect
9
+ ```
10
+
11
+ `.oxlintrc.json`:
12
+
13
+ ```json
14
+ {
15
+ "jsPlugins": ["oxlint-plugin-effect/plugin"],
16
+ "rules": {
17
+ "effect/noEffectDo": "error",
18
+ "effect/noNestedPipe": "error",
19
+ "effect/noThrowStatement": "error",
20
+ "effect/noGlobals": "warn"
21
+ },
22
+ "overrides": [
23
+ {
24
+ "files": ["**/*.test.ts", "**/*.test.tsx", "**/tests/**", "**/test/**"],
25
+ "rules": {
26
+ "effect/noInlineProvide": "off"
27
+ }
28
+ }
29
+ ]
30
+ }
31
+ ```
32
+
33
+ The `overrides` entry turns off `noInlineProvide` in test files. The rule's intent is "provide layers at the boundary, not scattered through production code" — in tests, `it.effect(() => Effect.gen(function*() { ... }).pipe(Effect.provide(TestLayer)))` is the boundary.
34
+
35
+ ```bash
36
+ oxlint
37
+ ```
38
+
39
+ ## Rule Authoring
40
+
41
+ The package also exports the Effect-first rule authoring bindings:
42
+
43
+ ```ts
44
+ import { Diagnostic, Rule, RuleContext } from "oxlint-plugin-effect/rule-bindings";
45
+
46
+ export const noThing = Rule.define({
47
+ name: "no-thing",
48
+ meta: Rule.meta({
49
+ type: "problem",
50
+ description: "Avoid thing.",
51
+ }),
52
+ create: function* () {
53
+ const ctx = yield* RuleContext;
54
+ return {
55
+ Identifier: (node) => ctx.report(Diagnostic.make({ node, message: "Avoid thing." })),
56
+ };
57
+ },
58
+ });
59
+ ```
60
+
61
+ The same bindings are available from the root export for convenience:
62
+
63
+ ```ts
64
+ import { Rule, Diagnostic, RuleContext } from "oxlint-plugin-effect";
65
+ ```
66
+
67
+ ## Rules
68
+
69
+ 66 AST-only rules across categories: API bans, global bans, import bans, statement bans, AST patterns, and Effect-context rules. Five presets are available: `core`, `full`, `effect-native`, `functional`, and `strict`.
70
+
71
+ ## Development
72
+
73
+ ```bash
74
+ bun install
75
+ bun run gate
76
+ bun run codegen
77
+ bun run add-rule <name> [--context]
78
+ ```
79
+
80
+ ## License
81
+
82
+ MIT
package/dist/index.d.ts CHANGED
@@ -1,4 +1,16 @@
1
+ import { AST_d_exports } from "./vendor/effect-oxlint/AST.js";
2
+ import { Comment_d_exports } from "./vendor/effect-oxlint/Comment.js";
3
+ import { Diagnostic_d_exports } from "./vendor/effect-oxlint/Diagnostic.js";
4
+ import { Plugin_d_exports } from "./vendor/effect-oxlint/Plugin.js";
5
+ import { RuleContext, ast, cwd, filename, id, report, sourceCode, text } from "./vendor/effect-oxlint/RuleContext.js";
6
+ import { Visitor_d_exports } from "./vendor/effect-oxlint/Visitor.js";
7
+ import { Rule_d_exports } from "./vendor/effect-oxlint/Rule.js";
8
+ import { Scope_d_exports } from "./vendor/effect-oxlint/Scope.js";
9
+ import { SourceCode_d_exports } from "./vendor/effect-oxlint/SourceCode.js";
10
+ import { Testing_d_exports } from "./vendor/effect-oxlint/Testing.js";
11
+ import { Token_d_exports } from "./vendor/effect-oxlint/Token.js";
12
+ import { Context, CreateOnceRule, CreateRule, Definition, DefinitionType, ESTree, Fix, FixFn, Fixer, LineColumn, Location, OxlintComment, OxlintPlugin, OxlintRule, OxlintScope, OxlintSourceCode, OxlintToken, OxlintVisitor, Range, Ranged, Reference, RuleDocs, RuleMeta, ScopeManager, ScopeType, Settings, Span, Suggestion, Variable, index_d_exports as index_d_exports$1 } from "./vendor/effect-oxlint/index.js";
1
13
  import _default from "./plugin.js";
2
- import { index_d_exports as index_d_exports$1 } from "./rules/index.js";
14
+ import { index_d_exports as index_d_exports$2 } from "./rules/index.js";
3
15
  import { index_d_exports } from "./presets/index.js";
4
- export { _default as plugin, index_d_exports as presets, index_d_exports$1 as rules };
16
+ export { AST_d_exports as AST, Comment_d_exports as Comment, Context, CreateOnceRule, CreateRule, Definition, DefinitionType, Diagnostic_d_exports as Diagnostic, ESTree, Fix, FixFn, Fixer, LineColumn, Location, OxlintComment, OxlintPlugin, OxlintRule, OxlintScope, OxlintSourceCode, OxlintToken, OxlintVisitor, Plugin_d_exports as Plugin, Range, Ranged, Reference, Rule_d_exports as Rule, RuleContext, RuleDocs, RuleMeta, Scope_d_exports as Scope, ScopeManager, ScopeType, Settings, SourceCode_d_exports as SourceCode, Span, Suggestion, Testing_d_exports as Testing, Token_d_exports as Token, Variable, Visitor_d_exports as Visitor, ast, cwd, filename, id, _default as plugin, index_d_exports as presets, report, index_d_exports$1 as ruleBindings, index_d_exports$2 as rules, sourceCode, text };
package/dist/index.js CHANGED
@@ -1,4 +1,16 @@
1
+ import { AST_exports } from "./vendor/effect-oxlint/AST.js";
2
+ import { Comment_exports } from "./vendor/effect-oxlint/Comment.js";
3
+ import { Diagnostic_exports } from "./vendor/effect-oxlint/Diagnostic.js";
4
+ import { Plugin_exports } from "./vendor/effect-oxlint/Plugin.js";
5
+ import { RuleContext, ast, cwd, filename, id, report, sourceCode, text } from "./vendor/effect-oxlint/RuleContext.js";
6
+ import { Visitor_exports } from "./vendor/effect-oxlint/Visitor.js";
7
+ import { Rule_exports } from "./vendor/effect-oxlint/Rule.js";
8
+ import { Scope_exports } from "./vendor/effect-oxlint/Scope.js";
9
+ import { SourceCode_exports } from "./vendor/effect-oxlint/SourceCode.js";
10
+ import { Testing_exports } from "./vendor/effect-oxlint/Testing.js";
11
+ import { Token_exports } from "./vendor/effect-oxlint/Token.js";
12
+ import { effect_oxlint_exports } from "./vendor/effect-oxlint/index.js";
1
13
  import { rules_exports } from "./rules/index.js";
2
14
  import plugin_default from "./plugin.js";
3
15
  import { presets_exports } from "./presets/index.js";
4
- export { plugin_default as plugin, presets_exports as presets, rules_exports as rules };
16
+ export { AST_exports as AST, Comment_exports as Comment, Diagnostic_exports as Diagnostic, Plugin_exports as Plugin, Rule_exports as Rule, RuleContext, Scope_exports as Scope, SourceCode_exports as SourceCode, Testing_exports as Testing, Token_exports as Token, Visitor_exports as Visitor, ast, cwd, filename, id, plugin_default as plugin, presets_exports as presets, report, effect_oxlint_exports as ruleBindings, rules_exports as rules, sourceCode, text };
@@ -27,10 +27,14 @@ declare const core: {
27
27
  readonly "effect/noUnnecessaryPipeChain": "error";
28
28
  readonly "effect/noMultipleEffectProvide": "error";
29
29
  readonly "effect/noSchemaUnionOfLiterals": "warn";
30
+ readonly "effect/noSchemaStruct": "error";
30
31
  readonly "effect/noSchemaStructWithTag": "warn";
31
32
  readonly "effect/noRedundantSchemaTagIdentifier": "warn";
32
33
  readonly "effect/noEffectMapFlatten": "warn";
33
34
  readonly "effect/noPositionalLogError": "error";
35
+ readonly "effect/noMakeUnsafe": "error";
36
+ readonly "effect/noHandRolledTaggedUnion": "error";
37
+ readonly "effect/noDynamicImports": "error";
34
38
  readonly "effect/noThrowStatement": "error";
35
39
  readonly "effect/noTryCatch": "error";
36
40
  readonly "effect/noNewPromise": "error";
@@ -38,6 +42,8 @@ declare const core: {
38
42
  readonly "effect/noReturnNullish": "warn";
39
43
  readonly "effect/noGlobals": "error";
40
44
  readonly "effect/noInlineProvide": "error";
45
+ readonly "effect/noPromiseControlFlowInTests": "error";
46
+ readonly "effect/noSleepInTests": "error";
41
47
  };
42
48
  //#endregion
43
49
  export { core };
@@ -27,17 +27,23 @@ const core = {
27
27
  "effect/noUnnecessaryPipeChain": "error",
28
28
  "effect/noMultipleEffectProvide": "error",
29
29
  "effect/noSchemaUnionOfLiterals": "warn",
30
+ "effect/noSchemaStruct": "error",
30
31
  "effect/noSchemaStructWithTag": "warn",
31
32
  "effect/noRedundantSchemaTagIdentifier": "warn",
32
33
  "effect/noEffectMapFlatten": "warn",
33
34
  "effect/noPositionalLogError": "error",
35
+ "effect/noMakeUnsafe": "error",
36
+ "effect/noHandRolledTaggedUnion": "error",
37
+ "effect/noDynamicImports": "error",
34
38
  "effect/noThrowStatement": "error",
35
39
  "effect/noTryCatch": "error",
36
40
  "effect/noNewPromise": "error",
37
41
  "effect/noNewError": "error",
38
42
  "effect/noReturnNullish": "warn",
39
43
  "effect/noGlobals": "error",
40
- "effect/noInlineProvide": "error"
44
+ "effect/noInlineProvide": "error",
45
+ "effect/noPromiseControlFlowInTests": "error",
46
+ "effect/noSleepInTests": "error"
41
47
  };
42
48
  //#endregion
43
49
  export { core };
@@ -14,6 +14,7 @@ declare const full: {
14
14
  readonly "effect/noOptionAs": "error";
15
15
  readonly "effect/noRunInEffectGen": "error";
16
16
  readonly "effect/noNodeBuiltinImport": "warn";
17
+ readonly "effect/noSpread": "error";
17
18
  readonly "effect/noNestedPipe": "error";
18
19
  readonly "effect/noNestedEffectGen": "error";
19
20
  readonly "effect/noUnnecessaryEffectGen": "error";
@@ -42,12 +43,16 @@ declare const full: {
42
43
  readonly "effect/noUnnecessaryPipeChain": "error";
43
44
  readonly "effect/noMultipleEffectProvide": "error";
44
45
  readonly "effect/noSchemaUnionOfLiterals": "warn";
46
+ readonly "effect/noSchemaStruct": "error";
45
47
  readonly "effect/noSchemaStructWithTag": "warn";
46
48
  readonly "effect/noRedundantSchemaTagIdentifier": "warn";
47
49
  readonly "effect/noEffectMapFlatten": "warn";
48
50
  readonly "effect/noGlobalErrorInFailure": "error";
49
51
  readonly "effect/noGlobalErrorInCatch": "error";
50
52
  readonly "effect/noPositionalLogError": "error";
53
+ readonly "effect/noMakeUnsafe": "error";
54
+ readonly "effect/noHandRolledTaggedUnion": "error";
55
+ readonly "effect/noDynamicImports": "error";
51
56
  readonly "effect/noThrowStatement": "error";
52
57
  readonly "effect/noTryCatch": "error";
53
58
  readonly "effect/noNewPromise": "error";
@@ -55,6 +60,8 @@ declare const full: {
55
60
  readonly "effect/noReturnNullish": "warn";
56
61
  readonly "effect/noGlobals": "error";
57
62
  readonly "effect/noInlineProvide": "error";
63
+ readonly "effect/noPromiseControlFlowInTests": "error";
64
+ readonly "effect/noSleepInTests": "error";
58
65
  };
59
66
  //#endregion
60
67
  export { full };
@@ -14,6 +14,7 @@ const full = {
14
14
  "effect/noOptionAs": "error",
15
15
  "effect/noRunInEffectGen": "error",
16
16
  "effect/noNodeBuiltinImport": "warn",
17
+ "effect/noSpread": "error",
17
18
  "effect/noNestedPipe": "error",
18
19
  "effect/noNestedEffectGen": "error",
19
20
  "effect/noUnnecessaryEffectGen": "error",
@@ -42,19 +43,25 @@ const full = {
42
43
  "effect/noUnnecessaryPipeChain": "error",
43
44
  "effect/noMultipleEffectProvide": "error",
44
45
  "effect/noSchemaUnionOfLiterals": "warn",
46
+ "effect/noSchemaStruct": "error",
45
47
  "effect/noSchemaStructWithTag": "warn",
46
48
  "effect/noRedundantSchemaTagIdentifier": "warn",
47
49
  "effect/noEffectMapFlatten": "warn",
48
50
  "effect/noGlobalErrorInFailure": "error",
49
51
  "effect/noGlobalErrorInCatch": "error",
50
52
  "effect/noPositionalLogError": "error",
53
+ "effect/noMakeUnsafe": "error",
54
+ "effect/noHandRolledTaggedUnion": "error",
55
+ "effect/noDynamicImports": "error",
51
56
  "effect/noThrowStatement": "error",
52
57
  "effect/noTryCatch": "error",
53
58
  "effect/noNewPromise": "error",
54
59
  "effect/noNewError": "error",
55
60
  "effect/noReturnNullish": "warn",
56
61
  "effect/noGlobals": "error",
57
- "effect/noInlineProvide": "error"
62
+ "effect/noInlineProvide": "error",
63
+ "effect/noPromiseControlFlowInTests": "error",
64
+ "effect/noSleepInTests": "error"
58
65
  };
59
66
  //#endregion
60
67
  export { full };
@@ -16,6 +16,7 @@ declare const functional: {
16
16
  readonly "effect/noMatchEffectBranch": "error";
17
17
  readonly "effect/noOptionBooleanNormalization": "error";
18
18
  readonly "effect/noArrowLadder": "error";
19
+ readonly "effect/noSpread": "error";
19
20
  };
20
21
  //#endregion
21
22
  export { functional };
@@ -15,7 +15,8 @@ const functional = {
15
15
  "effect/noMatchVoidBranch": "error",
16
16
  "effect/noMatchEffectBranch": "error",
17
17
  "effect/noOptionBooleanNormalization": "error",
18
- "effect/noArrowLadder": "error"
18
+ "effect/noArrowLadder": "error",
19
+ "effect/noSpread": "error"
19
20
  };
20
21
  //#endregion
21
22
  export { functional };
@@ -4,10 +4,11 @@ import { effectNative } from "./effect-native.js";
4
4
  import { functional } from "./functional.js";
5
5
  import { strict } from "./strict.js";
6
6
  import { v3 } from "./v3.js";
7
+ import { v3Strict } from "./v3-strict.js";
7
8
 
8
9
  //#region src/presets/index.d.ts
9
10
  declare namespace index_d_exports {
10
- export { core, effectNative, full, functional, strict, v3 };
11
+ export { core, effectNative, full, functional, strict, v3, v3Strict };
11
12
  }
12
13
  //#endregion
13
- export { core, effectNative, full, functional, index_d_exports, strict, v3 };
14
+ export { core, effectNative, full, functional, index_d_exports, strict, v3, v3Strict };
@@ -5,6 +5,7 @@ import { effectNative } from "./effect-native.js";
5
5
  import { functional } from "./functional.js";
6
6
  import { strict } from "./strict.js";
7
7
  import { v3 } from "./v3.js";
8
+ import { v3Strict } from "./v3-strict.js";
8
9
  //#region src/presets/index.ts
9
10
  var presets_exports = /* @__PURE__ */ __exportAll({
10
11
  core: () => core,
@@ -12,7 +13,8 @@ var presets_exports = /* @__PURE__ */ __exportAll({
12
13
  full: () => full,
13
14
  functional: () => functional,
14
15
  strict: () => strict,
15
- v3: () => v3
16
+ v3: () => v3,
17
+ v3Strict: () => v3Strict
16
18
  });
17
19
  //#endregion
18
- export { core, effectNative, full, functional, presets_exports, strict, v3 };
20
+ export { core, effectNative, full, functional, presets_exports, strict, v3, v3Strict };
@@ -10,16 +10,14 @@ declare const strict: {
10
10
  readonly "effect/noEffectAsync": "error";
11
11
  readonly "effect/noEffectBind": "error";
12
12
  readonly "effect/noOptionAs": "error";
13
- readonly "effect/noRuntimeRunFork": "error";
14
13
  readonly "effect/noRunInEffectGen": "error";
15
- readonly "effect/noReturnNull": "error";
16
14
  readonly "effect/noSwitchStatement": "error";
17
15
  readonly "effect/noIfStatement": "error";
18
16
  readonly "effect/noTernary": "error";
19
17
  readonly "effect/noReturnInArrow": "error";
20
18
  readonly "effect/noStringSentinelConst": "error";
21
19
  readonly "effect/noArrowLadder": "error";
22
- readonly "effect/noAsyncFunction": "error";
20
+ readonly "effect/noSpread": "error";
23
21
  readonly "effect/noNodeBuiltinImport": "error";
24
22
  readonly "effect/noNestedPipe": "error";
25
23
  readonly "effect/noNestedEffectGen": "error";
@@ -37,7 +35,6 @@ declare const strict: {
37
35
  readonly "effect/noEffectOrElseLadder": "error";
38
36
  readonly "effect/noFromNullableCoalesce": "error";
39
37
  readonly "effect/noUnnecessaryArrowBlock": "error";
40
- readonly "effect/noEffectGenAdapter": "error";
41
38
  readonly "effect/noEffectSyncConsole": "error";
42
39
  readonly "effect/noEffectTypeAlias": "error";
43
40
  readonly "effect/noEffectWrapperAlias": "error";
@@ -47,16 +44,19 @@ declare const strict: {
47
44
  readonly "effect/noOptionBooleanNormalization": "error";
48
45
  readonly "effect/noEffectSyncWrapper": "error";
49
46
  readonly "effect/noMatchEffectBranch": "error";
50
- readonly "effect/noCatchAllToMapError": "error";
51
47
  readonly "effect/noUnnecessaryPipeChain": "error";
52
48
  readonly "effect/noMultipleEffectProvide": "error";
53
49
  readonly "effect/noSchemaUnionOfLiterals": "error";
50
+ readonly "effect/noSchemaStruct": "error";
54
51
  readonly "effect/noSchemaStructWithTag": "error";
55
52
  readonly "effect/noRedundantSchemaTagIdentifier": "error";
56
53
  readonly "effect/noEffectMapFlatten": "error";
57
54
  readonly "effect/noGlobalErrorInFailure": "error";
58
55
  readonly "effect/noGlobalErrorInCatch": "error";
59
56
  readonly "effect/noPositionalLogError": "error";
57
+ readonly "effect/noMakeUnsafe": "error";
58
+ readonly "effect/noHandRolledTaggedUnion": "error";
59
+ readonly "effect/noDynamicImports": "error";
60
60
  readonly "effect/noThrowStatement": "error";
61
61
  readonly "effect/noTryCatch": "error";
62
62
  readonly "effect/noNewPromise": "error";
@@ -64,6 +64,8 @@ declare const strict: {
64
64
  readonly "effect/noReturnNullish": "error";
65
65
  readonly "effect/noGlobals": "error";
66
66
  readonly "effect/noInlineProvide": "error";
67
+ readonly "effect/noPromiseControlFlowInTests": "error";
68
+ readonly "effect/noSleepInTests": "error";
67
69
  };
68
70
  //#endregion
69
71
  export { strict };
@@ -10,16 +10,14 @@ const strict = {
10
10
  "effect/noEffectAsync": "error",
11
11
  "effect/noEffectBind": "error",
12
12
  "effect/noOptionAs": "error",
13
- "effect/noRuntimeRunFork": "error",
14
13
  "effect/noRunInEffectGen": "error",
15
- "effect/noReturnNull": "error",
16
14
  "effect/noSwitchStatement": "error",
17
15
  "effect/noIfStatement": "error",
18
16
  "effect/noTernary": "error",
19
17
  "effect/noReturnInArrow": "error",
20
18
  "effect/noStringSentinelConst": "error",
21
19
  "effect/noArrowLadder": "error",
22
- "effect/noAsyncFunction": "error",
20
+ "effect/noSpread": "error",
23
21
  "effect/noNodeBuiltinImport": "error",
24
22
  "effect/noNestedPipe": "error",
25
23
  "effect/noNestedEffectGen": "error",
@@ -37,7 +35,6 @@ const strict = {
37
35
  "effect/noEffectOrElseLadder": "error",
38
36
  "effect/noFromNullableCoalesce": "error",
39
37
  "effect/noUnnecessaryArrowBlock": "error",
40
- "effect/noEffectGenAdapter": "error",
41
38
  "effect/noEffectSyncConsole": "error",
42
39
  "effect/noEffectTypeAlias": "error",
43
40
  "effect/noEffectWrapperAlias": "error",
@@ -47,23 +44,28 @@ const strict = {
47
44
  "effect/noOptionBooleanNormalization": "error",
48
45
  "effect/noEffectSyncWrapper": "error",
49
46
  "effect/noMatchEffectBranch": "error",
50
- "effect/noCatchAllToMapError": "error",
51
47
  "effect/noUnnecessaryPipeChain": "error",
52
48
  "effect/noMultipleEffectProvide": "error",
53
49
  "effect/noSchemaUnionOfLiterals": "error",
50
+ "effect/noSchemaStruct": "error",
54
51
  "effect/noSchemaStructWithTag": "error",
55
52
  "effect/noRedundantSchemaTagIdentifier": "error",
56
53
  "effect/noEffectMapFlatten": "error",
57
54
  "effect/noGlobalErrorInFailure": "error",
58
55
  "effect/noGlobalErrorInCatch": "error",
59
56
  "effect/noPositionalLogError": "error",
57
+ "effect/noMakeUnsafe": "error",
58
+ "effect/noHandRolledTaggedUnion": "error",
59
+ "effect/noDynamicImports": "error",
60
60
  "effect/noThrowStatement": "error",
61
61
  "effect/noTryCatch": "error",
62
62
  "effect/noNewPromise": "error",
63
63
  "effect/noNewError": "error",
64
64
  "effect/noReturnNullish": "error",
65
65
  "effect/noGlobals": "error",
66
- "effect/noInlineProvide": "error"
66
+ "effect/noInlineProvide": "error",
67
+ "effect/noPromiseControlFlowInTests": "error",
68
+ "effect/noSleepInTests": "error"
67
69
  };
68
70
  //#endregion
69
71
  export { strict };
@@ -0,0 +1,16 @@
1
+ //#region src/presets/v3-strict.d.ts
2
+ /**
3
+ * v3Strict preset — v3-only rules at error severity.
4
+ *
5
+ * Layer on top of `strict` when linting a v3 project with zero tolerance:
6
+ * ```ts
7
+ * rules: { ...strict, ...v3Strict }
8
+ * ```
9
+ */
10
+ declare const v3Strict: {
11
+ readonly "effect/noCatchAllToMapError": "error";
12
+ readonly "effect/noEffectGenAdapter": "error";
13
+ readonly "effect/noRuntimeRunFork": "error";
14
+ };
15
+ //#endregion
16
+ export { v3Strict };
@@ -0,0 +1,16 @@
1
+ //#region src/presets/v3-strict.ts
2
+ /**
3
+ * v3Strict preset — v3-only rules at error severity.
4
+ *
5
+ * Layer on top of `strict` when linting a v3 project with zero tolerance:
6
+ * ```ts
7
+ * rules: { ...strict, ...v3Strict }
8
+ * ```
9
+ */
10
+ const v3Strict = {
11
+ "effect/noCatchAllToMapError": "error",
12
+ "effect/noEffectGenAdapter": "error",
13
+ "effect/noRuntimeRunFork": "error"
14
+ };
15
+ //#endregion
16
+ export { v3Strict };
@@ -1,15 +1,18 @@
1
1
  //#region src/presets/v3.d.ts
2
2
  /**
3
- * v3 preset — rules that only apply to Effect v3 codebases.
3
+ * v3 preset — rules that only apply to Effect v3 codebases, as warnings.
4
4
  *
5
- * Layer on top of `core`, `full`, or `strict` when linting a v3 project.
6
- * These rules target v3-only APIs (Effect.gen adapter, Runtime.runFork,
7
- * catchAll → mapError patterns) that are absent or changed in v4.
5
+ * Layer on top of `core` or `full` when linting a v3 project:
6
+ * ```ts
7
+ * rules: { ...core, ...v3 }
8
+ * ```
9
+ *
10
+ * Pair with `v3Strict` for zero-tolerance v3 linting.
8
11
  */
9
12
  declare const v3: {
10
- readonly "effect/noCatchAllToMapError": "error";
11
- readonly "effect/noEffectGenAdapter": "error";
12
- readonly "effect/noRuntimeRunFork": "error";
13
+ readonly "effect/noCatchAllToMapError": "warn";
14
+ readonly "effect/noEffectGenAdapter": "warn";
15
+ readonly "effect/noRuntimeRunFork": "warn";
13
16
  };
14
17
  //#endregion
15
18
  export { v3 };
@@ -1,15 +1,18 @@
1
1
  //#region src/presets/v3.ts
2
2
  /**
3
- * v3 preset — rules that only apply to Effect v3 codebases.
3
+ * v3 preset — rules that only apply to Effect v3 codebases, as warnings.
4
4
  *
5
- * Layer on top of `core`, `full`, or `strict` when linting a v3 project.
6
- * These rules target v3-only APIs (Effect.gen adapter, Runtime.runFork,
7
- * catchAll → mapError patterns) that are absent or changed in v4.
5
+ * Layer on top of `core` or `full` when linting a v3 project:
6
+ * ```ts
7
+ * rules: { ...core, ...v3 }
8
+ * ```
9
+ *
10
+ * Pair with `v3Strict` for zero-tolerance v3 linting.
8
11
  */
9
12
  const v3 = {
10
- "effect/noCatchAllToMapError": "error",
11
- "effect/noEffectGenAdapter": "error",
12
- "effect/noRuntimeRunFork": "error"
13
+ "effect/noCatchAllToMapError": "warn",
14
+ "effect/noEffectGenAdapter": "warn",
15
+ "effect/noRuntimeRunFork": "warn"
13
16
  };
14
17
  //#endregion
15
18
  export { v3 };
@@ -10,6 +10,7 @@ import { noSwitchStatement } from "./no-switch-statement.js";
10
10
  import { noArrowLadder } from "./no-arrow-ladder.js";
11
11
  import { noAsyncFunction } from "./no-async-function.js";
12
12
  import { noCatchAllToMapError } from "./no-catch-all-to-map-error.js";
13
+ import { noDynamicImports } from "./no-dynamic-imports.js";
13
14
  import { noEffectFnGenerator } from "./no-effect-fn-generator.js";
14
15
  import { noEffectGenAdapter } from "./no-effect-gen-adapter.js";
15
16
  import { noEffectMapFlatten } from "./no-effect-map-flatten.js";
@@ -27,8 +28,10 @@ import { noFlatmapLadder } from "./no-flatmap-ladder.js";
27
28
  import { noFromNullableCoalesce } from "./no-fromnullable-coalesce.js";
28
29
  import { noGlobalErrorInCatch } from "./no-global-error-in-catch.js";
29
30
  import { noGlobalErrorInFailure } from "./no-global-error-in-failure.js";
31
+ import { noHandRolledTaggedUnion } from "./no-hand-rolled-tagged-union.js";
30
32
  import { noIifeWrapper } from "./no-iife-wrapper.js";
31
33
  import { noInstanceofSchema } from "./no-instanceof-schema.js";
34
+ import { noMakeUnsafe } from "./no-make-unsafe.js";
32
35
  import { noManualEffectChannels } from "./no-manual-effect-channels.js";
33
36
  import { noMatchEffectBranch } from "./no-match-effect-branch.js";
34
37
  import { noMatchVoidBranch } from "./no-match-void-branch.js";
@@ -39,10 +42,14 @@ import { noNestedPipe } from "./no-nested-pipe.js";
39
42
  import { noNodeBuiltinImport } from "./no-node-builtin-import.js";
40
43
  import { noOptionBooleanNormalization } from "./no-option-boolean-normalization.js";
41
44
  import { noPositionalLogError } from "./no-positional-log-error.js";
45
+ import { noPromiseControlFlowInTests } from "./no-promise-control-flow-in-tests.js";
42
46
  import { noRedundantSchemaTagIdentifier } from "./no-redundant-schema-tag-identifier.js";
43
47
  import { noReturnInArrow } from "./no-return-in-arrow.js";
44
48
  import { noSchemaStructWithTag } from "./no-schema-struct-with-tag.js";
49
+ import { noSchemaStruct } from "./no-schema-struct.js";
45
50
  import { noSchemaUnionOfLiterals } from "./no-schema-union-of-literals.js";
51
+ import { noSleepInTests } from "./no-sleep-in-tests.js";
52
+ import { noSpread } from "./no-spread.js";
46
53
  import { noStringSentinelConst } from "./no-string-sentinel-const.js";
47
54
  import { noTernary } from "./no-ternary.js";
48
55
  import { noUnnecessaryArrowBlock } from "./no-unnecessary-arrow-block.js";
@@ -60,7 +67,7 @@ import { noTryCatch } from "./no-try-catch.js";
60
67
 
61
68
  //#region src/rules/index.d.ts
62
69
  declare namespace index_d_exports {
63
- export { noArrowLadder, noAsyncFunction, noCatchAllToMapError, noEffectAs, noEffectAsync, noEffectBind, noEffectDo, noEffectFnGenerator, noEffectGenAdapter, noEffectMapFlatten, noEffectMapVoid, noEffectNever, noEffectOrElseLadder, noEffectSucceedString, noEffectSucceedVariable, noEffectSucceedVoid, noEffectSyncConsole, noEffectSyncWrapper, noEffectTypeAlias, noEffectWrapperAlias, noExtendsNativeError, noFlatmapLadder, noFromNullableCoalesce, noGlobalErrorInCatch, noGlobalErrorInFailure, noGlobals, noIfStatement, noIifeWrapper, noInlineProvide, noInstanceofSchema, noManualEffectChannels, noMatchEffectBranch, noMatchVoidBranch, noMultipleEffectProvide, noNestedEffectCall, noNestedEffectGen, noNestedPipe, noNewError, noNewPromise, noNodeBuiltinImport, noOptionAs, noOptionBooleanNormalization, noPositionalLogError, noRedundantSchemaTagIdentifier, noReturnInArrow, noReturnNullish, noRunInEffectGen, noRuntimeRunFork, noSchemaStructWithTag, noSchemaUnionOfLiterals, noStringSentinelConst, noSwitchStatement, noTernary, noThrowStatement, noTryCatch, noUnnecessaryArrowBlock, noUnnecessaryEffectGen, noUnnecessaryPipe, noUnnecessaryPipeChain };
70
+ export { noArrowLadder, noAsyncFunction, noCatchAllToMapError, noDynamicImports, noEffectAs, noEffectAsync, noEffectBind, noEffectDo, noEffectFnGenerator, noEffectGenAdapter, noEffectMapFlatten, noEffectMapVoid, noEffectNever, noEffectOrElseLadder, noEffectSucceedString, noEffectSucceedVariable, noEffectSucceedVoid, noEffectSyncConsole, noEffectSyncWrapper, noEffectTypeAlias, noEffectWrapperAlias, noExtendsNativeError, noFlatmapLadder, noFromNullableCoalesce, noGlobalErrorInCatch, noGlobalErrorInFailure, noGlobals, noHandRolledTaggedUnion, noIfStatement, noIifeWrapper, noInlineProvide, noInstanceofSchema, noMakeUnsafe, noManualEffectChannels, noMatchEffectBranch, noMatchVoidBranch, noMultipleEffectProvide, noNestedEffectCall, noNestedEffectGen, noNestedPipe, noNewError, noNewPromise, noNodeBuiltinImport, noOptionAs, noOptionBooleanNormalization, noPositionalLogError, noPromiseControlFlowInTests, noRedundantSchemaTagIdentifier, noReturnInArrow, noReturnNullish, noRunInEffectGen, noRuntimeRunFork, noSchemaStruct, noSchemaStructWithTag, noSchemaUnionOfLiterals, noSleepInTests, noSpread, noStringSentinelConst, noSwitchStatement, noTernary, noThrowStatement, noTryCatch, noUnnecessaryArrowBlock, noUnnecessaryEffectGen, noUnnecessaryPipe, noUnnecessaryPipeChain };
64
71
  }
65
72
  //#endregion
66
- export { index_d_exports, noArrowLadder, noAsyncFunction, noCatchAllToMapError, noEffectAs, noEffectAsync, noEffectBind, noEffectDo, noEffectFnGenerator, noEffectGenAdapter, noEffectMapFlatten, noEffectMapVoid, noEffectNever, noEffectOrElseLadder, noEffectSucceedString, noEffectSucceedVariable, noEffectSucceedVoid, noEffectSyncConsole, noEffectSyncWrapper, noEffectTypeAlias, noEffectWrapperAlias, noExtendsNativeError, noFlatmapLadder, noFromNullableCoalesce, noGlobalErrorInCatch, noGlobalErrorInFailure, noGlobals, noIfStatement, noIifeWrapper, noInlineProvide, noInstanceofSchema, noManualEffectChannels, noMatchEffectBranch, noMatchVoidBranch, noMultipleEffectProvide, noNestedEffectCall, noNestedEffectGen, noNestedPipe, noNewError, noNewPromise, noNodeBuiltinImport, noOptionAs, noOptionBooleanNormalization, noPositionalLogError, noRedundantSchemaTagIdentifier, noReturnInArrow, noReturnNullish, noRunInEffectGen, noRuntimeRunFork, noSchemaStructWithTag, noSchemaUnionOfLiterals, noStringSentinelConst, noSwitchStatement, noTernary, noThrowStatement, noTryCatch, noUnnecessaryArrowBlock, noUnnecessaryEffectGen, noUnnecessaryPipe, noUnnecessaryPipeChain };
73
+ export { index_d_exports, noArrowLadder, noAsyncFunction, noCatchAllToMapError, noDynamicImports, noEffectAs, noEffectAsync, noEffectBind, noEffectDo, noEffectFnGenerator, noEffectGenAdapter, noEffectMapFlatten, noEffectMapVoid, noEffectNever, noEffectOrElseLadder, noEffectSucceedString, noEffectSucceedVariable, noEffectSucceedVoid, noEffectSyncConsole, noEffectSyncWrapper, noEffectTypeAlias, noEffectWrapperAlias, noExtendsNativeError, noFlatmapLadder, noFromNullableCoalesce, noGlobalErrorInCatch, noGlobalErrorInFailure, noGlobals, noHandRolledTaggedUnion, noIfStatement, noIifeWrapper, noInlineProvide, noInstanceofSchema, noMakeUnsafe, noManualEffectChannels, noMatchEffectBranch, noMatchVoidBranch, noMultipleEffectProvide, noNestedEffectCall, noNestedEffectGen, noNestedPipe, noNewError, noNewPromise, noNodeBuiltinImport, noOptionAs, noOptionBooleanNormalization, noPositionalLogError, noPromiseControlFlowInTests, noRedundantSchemaTagIdentifier, noReturnInArrow, noReturnNullish, noRunInEffectGen, noRuntimeRunFork, noSchemaStruct, noSchemaStructWithTag, noSchemaUnionOfLiterals, noSleepInTests, noSpread, noStringSentinelConst, noSwitchStatement, noTernary, noThrowStatement, noTryCatch, noUnnecessaryArrowBlock, noUnnecessaryEffectGen, noUnnecessaryPipe, noUnnecessaryPipeChain };
@@ -11,6 +11,7 @@ import { noSwitchStatement } from "./no-switch-statement.js";
11
11
  import { noArrowLadder } from "./no-arrow-ladder.js";
12
12
  import { noAsyncFunction } from "./no-async-function.js";
13
13
  import { noCatchAllToMapError } from "./no-catch-all-to-map-error.js";
14
+ import { noDynamicImports } from "./no-dynamic-imports.js";
14
15
  import { noEffectFnGenerator } from "./no-effect-fn-generator.js";
15
16
  import { noEffectGenAdapter } from "./no-effect-gen-adapter.js";
16
17
  import { noEffectMapFlatten } from "./no-effect-map-flatten.js";
@@ -28,8 +29,10 @@ import { noFlatmapLadder } from "./no-flatmap-ladder.js";
28
29
  import { noFromNullableCoalesce } from "./no-fromnullable-coalesce.js";
29
30
  import { noGlobalErrorInCatch } from "./no-global-error-in-catch.js";
30
31
  import { noGlobalErrorInFailure } from "./no-global-error-in-failure.js";
32
+ import { noHandRolledTaggedUnion } from "./no-hand-rolled-tagged-union.js";
31
33
  import { noIifeWrapper } from "./no-iife-wrapper.js";
32
34
  import { noInstanceofSchema } from "./no-instanceof-schema.js";
35
+ import { noMakeUnsafe } from "./no-make-unsafe.js";
33
36
  import { noManualEffectChannels } from "./no-manual-effect-channels.js";
34
37
  import { noMatchEffectBranch } from "./no-match-effect-branch.js";
35
38
  import { noMatchVoidBranch } from "./no-match-void-branch.js";
@@ -40,10 +43,14 @@ import { noNestedPipe } from "./no-nested-pipe.js";
40
43
  import { noNodeBuiltinImport } from "./no-node-builtin-import.js";
41
44
  import { noOptionBooleanNormalization } from "./no-option-boolean-normalization.js";
42
45
  import { noPositionalLogError } from "./no-positional-log-error.js";
46
+ import { noPromiseControlFlowInTests } from "./no-promise-control-flow-in-tests.js";
43
47
  import { noRedundantSchemaTagIdentifier } from "./no-redundant-schema-tag-identifier.js";
44
48
  import { noReturnInArrow } from "./no-return-in-arrow.js";
45
49
  import { noSchemaStructWithTag } from "./no-schema-struct-with-tag.js";
50
+ import { noSchemaStruct } from "./no-schema-struct.js";
46
51
  import { noSchemaUnionOfLiterals } from "./no-schema-union-of-literals.js";
52
+ import { noSleepInTests } from "./no-sleep-in-tests.js";
53
+ import { noSpread } from "./no-spread.js";
47
54
  import { noStringSentinelConst } from "./no-string-sentinel-const.js";
48
55
  import { noTernary } from "./no-ternary.js";
49
56
  import { noUnnecessaryArrowBlock } from "./no-unnecessary-arrow-block.js";
@@ -63,6 +70,7 @@ var rules_exports = /* @__PURE__ */ __exportAll({
63
70
  noArrowLadder: () => noArrowLadder,
64
71
  noAsyncFunction: () => noAsyncFunction,
65
72
  noCatchAllToMapError: () => noCatchAllToMapError,
73
+ noDynamicImports: () => noDynamicImports,
66
74
  noEffectAs: () => noEffectAs,
67
75
  noEffectAsync: () => noEffectAsync,
68
76
  noEffectBind: () => noEffectBind,
@@ -86,10 +94,12 @@ var rules_exports = /* @__PURE__ */ __exportAll({
86
94
  noGlobalErrorInCatch: () => noGlobalErrorInCatch,
87
95
  noGlobalErrorInFailure: () => noGlobalErrorInFailure,
88
96
  noGlobals: () => noGlobals,
97
+ noHandRolledTaggedUnion: () => noHandRolledTaggedUnion,
89
98
  noIfStatement: () => noIfStatement,
90
99
  noIifeWrapper: () => noIifeWrapper,
91
100
  noInlineProvide: () => noInlineProvide,
92
101
  noInstanceofSchema: () => noInstanceofSchema,
102
+ noMakeUnsafe: () => noMakeUnsafe,
93
103
  noManualEffectChannels: () => noManualEffectChannels,
94
104
  noMatchEffectBranch: () => noMatchEffectBranch,
95
105
  noMatchVoidBranch: () => noMatchVoidBranch,
@@ -103,13 +113,17 @@ var rules_exports = /* @__PURE__ */ __exportAll({
103
113
  noOptionAs: () => noOptionAs,
104
114
  noOptionBooleanNormalization: () => noOptionBooleanNormalization,
105
115
  noPositionalLogError: () => noPositionalLogError,
116
+ noPromiseControlFlowInTests: () => noPromiseControlFlowInTests,
106
117
  noRedundantSchemaTagIdentifier: () => noRedundantSchemaTagIdentifier,
107
118
  noReturnInArrow: () => noReturnInArrow,
108
119
  noReturnNullish: () => noReturnNullish,
109
120
  noRunInEffectGen: () => noRunInEffectGen,
110
121
  noRuntimeRunFork: () => noRuntimeRunFork,
122
+ noSchemaStruct: () => noSchemaStruct,
111
123
  noSchemaStructWithTag: () => noSchemaStructWithTag,
112
124
  noSchemaUnionOfLiterals: () => noSchemaUnionOfLiterals,
125
+ noSleepInTests: () => noSleepInTests,
126
+ noSpread: () => noSpread,
113
127
  noStringSentinelConst: () => noStringSentinelConst,
114
128
  noSwitchStatement: () => noSwitchStatement,
115
129
  noTernary: () => noTernary,
@@ -121,4 +135,4 @@ var rules_exports = /* @__PURE__ */ __exportAll({
121
135
  noUnnecessaryPipeChain: () => noUnnecessaryPipeChain
122
136
  });
123
137
  //#endregion
124
- export { noArrowLadder, noAsyncFunction, noCatchAllToMapError, noEffectAs, noEffectAsync, noEffectBind, noEffectDo, noEffectFnGenerator, noEffectGenAdapter, noEffectMapFlatten, noEffectMapVoid, noEffectNever, noEffectOrElseLadder, noEffectSucceedString, noEffectSucceedVariable, noEffectSucceedVoid, noEffectSyncConsole, noEffectSyncWrapper, noEffectTypeAlias, noEffectWrapperAlias, noExtendsNativeError, noFlatmapLadder, noFromNullableCoalesce, noGlobalErrorInCatch, noGlobalErrorInFailure, noGlobals, noIfStatement, noIifeWrapper, noInlineProvide, noInstanceofSchema, noManualEffectChannels, noMatchEffectBranch, noMatchVoidBranch, noMultipleEffectProvide, noNestedEffectCall, noNestedEffectGen, noNestedPipe, noNewError, noNewPromise, noNodeBuiltinImport, noOptionAs, noOptionBooleanNormalization, noPositionalLogError, noRedundantSchemaTagIdentifier, noReturnInArrow, noReturnNullish, noRunInEffectGen, noRuntimeRunFork, noSchemaStructWithTag, noSchemaUnionOfLiterals, noStringSentinelConst, noSwitchStatement, noTernary, noThrowStatement, noTryCatch, noUnnecessaryArrowBlock, noUnnecessaryEffectGen, noUnnecessaryPipe, noUnnecessaryPipeChain, rules_exports };
138
+ export { noArrowLadder, noAsyncFunction, noCatchAllToMapError, noDynamicImports, noEffectAs, noEffectAsync, noEffectBind, noEffectDo, noEffectFnGenerator, noEffectGenAdapter, noEffectMapFlatten, noEffectMapVoid, noEffectNever, noEffectOrElseLadder, noEffectSucceedString, noEffectSucceedVariable, noEffectSucceedVoid, noEffectSyncConsole, noEffectSyncWrapper, noEffectTypeAlias, noEffectWrapperAlias, noExtendsNativeError, noFlatmapLadder, noFromNullableCoalesce, noGlobalErrorInCatch, noGlobalErrorInFailure, noGlobals, noHandRolledTaggedUnion, noIfStatement, noIifeWrapper, noInlineProvide, noInstanceofSchema, noMakeUnsafe, noManualEffectChannels, noMatchEffectBranch, noMatchVoidBranch, noMultipleEffectProvide, noNestedEffectCall, noNestedEffectGen, noNestedPipe, noNewError, noNewPromise, noNodeBuiltinImport, noOptionAs, noOptionBooleanNormalization, noPositionalLogError, noPromiseControlFlowInTests, noRedundantSchemaTagIdentifier, noReturnInArrow, noReturnNullish, noRunInEffectGen, noRuntimeRunFork, noSchemaStruct, noSchemaStructWithTag, noSchemaUnionOfLiterals, noSleepInTests, noSpread, noStringSentinelConst, noSwitchStatement, noTernary, noThrowStatement, noTryCatch, noUnnecessaryArrowBlock, noUnnecessaryEffectGen, noUnnecessaryPipe, noUnnecessaryPipeChain, rules_exports };
@@ -0,0 +1,6 @@
1
+ import * as _$_oxlint_plugins0 from "@oxlint/plugins";
2
+
3
+ //#region src/rules/no-dynamic-imports.d.ts
4
+ declare const noDynamicImports: _$_oxlint_plugins0.CreateRule;
5
+ //#endregion
6
+ export { noDynamicImports };