@doubleloop-io/oxlint-plugin-effect 0.0.0-stage → 0.1.0-rc.1

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 (86) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.anti-slop +21 -0
  3. package/README.md +216 -2
  4. package/RULES.md +931 -0
  5. package/dist/index.d.ts +6 -0
  6. package/dist/index.js +75 -0
  7. package/dist/presets/all.d.ts +7 -0
  8. package/dist/presets/all.js +9 -0
  9. package/dist/presets/all.json +38 -0
  10. package/dist/rules/adapter-import-boundary.d.ts +7 -0
  11. package/dist/rules/adapter-import-boundary.js +103 -0
  12. package/dist/rules/all-errors-handled-at-boundary.d.ts +1 -0
  13. package/dist/rules/all-errors-handled-at-boundary.js +111 -0
  14. package/dist/rules/anti-slop-no-manual-effect-error-tag.d.ts +1 -0
  15. package/dist/rules/anti-slop-no-manual-effect-error-tag.js +32 -0
  16. package/dist/rules/anti-slop-no-service-constructor-imports.d.ts +1 -0
  17. package/dist/rules/anti-slop-no-service-constructor-imports.js +49 -0
  18. package/dist/rules/anti-slop-prefer-effect-match.d.ts +1 -0
  19. package/dist/rules/anti-slop-prefer-effect-match.js +45 -0
  20. package/dist/rules/error-handling-in-effect-fn-handler.d.ts +1 -0
  21. package/dist/rules/error-handling-in-effect-fn-handler.js +144 -0
  22. package/dist/rules/exported-schema-identifier.d.ts +1 -0
  23. package/dist/rules/exported-schema-identifier.js +117 -0
  24. package/dist/rules/no-asymmetric-match-handlers.d.ts +1 -0
  25. package/dist/rules/no-asymmetric-match-handlers.js +74 -0
  26. package/dist/rules/no-bare-error-in-effect.d.ts +1 -0
  27. package/dist/rules/no-bare-error-in-effect.js +49 -0
  28. package/dist/rules/no-effect-promise.d.ts +1 -0
  29. package/dist/rules/no-effect-promise.js +57 -0
  30. package/dist/rules/no-effect-return-type.d.ts +1 -0
  31. package/dist/rules/no-effect-return-type.js +130 -0
  32. package/dist/rules/no-inline-schema-codec.d.ts +1 -0
  33. package/dist/rules/no-inline-schema-codec.js +46 -0
  34. package/dist/rules/no-inline-yield-star.d.ts +1 -0
  35. package/dist/rules/no-inline-yield-star.js +230 -0
  36. package/dist/rules/no-manual-discriminant-comparison.d.ts +2 -0
  37. package/dist/rules/no-manual-discriminant-comparison.js +81 -0
  38. package/dist/rules/no-manual-discriminant-construction.d.ts +2 -0
  39. package/dist/rules/no-manual-discriminant-construction.js +132 -0
  40. package/dist/rules/no-nested-match.d.ts +1 -0
  41. package/dist/rules/no-nested-match.js +24 -0
  42. package/dist/rules/no-parameterless-catch-all.d.ts +1 -0
  43. package/dist/rules/no-parameterless-catch-all.js +29 -0
  44. package/dist/rules/no-provide-on-definition.d.ts +1 -0
  45. package/dist/rules/no-provide-on-definition.js +123 -0
  46. package/dist/rules/no-transport-types-in-generator.d.ts +1 -0
  47. package/dist/rules/no-transport-types-in-generator.js +63 -0
  48. package/dist/rules/no-yielded-match.d.ts +1 -0
  49. package/dist/rules/no-yielded-match.js +91 -0
  50. package/dist/rules/prefer-effect-fn.d.ts +1 -0
  51. package/dist/rules/prefer-effect-fn.js +102 -0
  52. package/dist/rules/prefer-effect-vitest.d.ts +1 -0
  53. package/dist/rules/prefer-effect-vitest.js +52 -0
  54. package/dist/rules/provide-named-layer.d.ts +1 -0
  55. package/dist/rules/provide-named-layer.js +55 -0
  56. package/dist/rules/redacted-secret-names.d.ts +1 -0
  57. package/dist/rules/redacted-secret-names.js +125 -0
  58. package/dist/rules/run-only-in-runner.d.ts +1 -0
  59. package/dist/rules/run-only-in-runner.js +40 -0
  60. package/dist/rules/service-built-with-of.d.ts +1 -0
  61. package/dist/rules/service-built-with-of.js +74 -0
  62. package/dist/rules/service-key-matches-name.d.ts +1 -0
  63. package/dist/rules/service-key-matches-name.js +69 -0
  64. package/dist/rules/service-port-shape-only.d.ts +1 -0
  65. package/dist/rules/service-port-shape-only.js +65 -0
  66. package/dist/rules/single-style-per-function.d.ts +1 -0
  67. package/dist/rules/single-style-per-function.js +145 -0
  68. package/dist/rules/try-object-form.d.ts +1 -0
  69. package/dist/rules/try-object-form.js +26 -0
  70. package/dist/rules/untraced-recursion.d.ts +1 -0
  71. package/dist/rules/untraced-recursion.js +48 -0
  72. package/dist/shared/effect-ast.d.ts +10 -0
  73. package/dist/shared/effect-ast.js +63 -0
  74. package/dist/shared/effect-runners.d.ts +2 -0
  75. package/dist/shared/effect-runners.js +14 -0
  76. package/dist/shared/entry-files.d.ts +6 -0
  77. package/dist/shared/entry-files.js +5 -0
  78. package/dist/shared/file-globs.d.ts +14 -0
  79. package/dist/shared/file-globs.js +17 -0
  80. package/dist/shared/match-ast.d.ts +5 -0
  81. package/dist/shared/match-ast.js +52 -0
  82. package/dist/shared/tagged-values.d.ts +17 -0
  83. package/dist/shared/tagged-values.js +67 -0
  84. package/dist/shared/test-files.d.ts +6 -0
  85. package/dist/shared/test-files.js +10 -0
  86. package/package.json +60 -3
@@ -0,0 +1,6 @@
1
+ export declare const defaultTestFiles: readonly ["**/*.test.*", "**/*.spec.*", "**/__tests__/**", "**/test/**", "**/tests/**"];
2
+ export declare const isTestFile: (context: {
3
+ readonly filename: string;
4
+ readonly cwd: string;
5
+ readonly options: ReadonlyArray<unknown>;
6
+ }) => boolean;
@@ -0,0 +1,10 @@
1
+ import { makeFileMatcher } from "./file-globs.js";
2
+ // `src/testing/` helpers are not matched on purpose: they are support code, not tests.
3
+ export const defaultTestFiles = [
4
+ "**/*.test.*",
5
+ "**/*.spec.*",
6
+ "**/__tests__/**",
7
+ "**/test/**",
8
+ "**/tests/**",
9
+ ];
10
+ export const isTestFile = makeFileMatcher("testFiles", defaultTestFiles);
package/package.json CHANGED
@@ -1,6 +1,63 @@
1
1
  {
2
2
  "name": "@doubleloop-io/oxlint-plugin-effect",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0-rc.1",
4
+ "description": "Oxlint rules for Effect 4 code",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/doubleloop-io/oxlint-plugin-effect.git"
9
+ },
10
+ "files": [
11
+ "dist/",
12
+ "RULES.md",
13
+ "README.md",
14
+ "LICENSE",
15
+ "LICENSE.anti-slop"
16
+ ],
17
+ "type": "module",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/index.js"
22
+ },
23
+ "./presets/all": {
24
+ "types": "./dist/presets/all.d.ts",
25
+ "default": "./dist/presets/all.js"
26
+ },
27
+ "./presets/all.json": "./dist/presets/all.json"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "dependencies": {
33
+ "@oxlint/plugins": "^1.82.0"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^24.13.6",
37
+ "oxfmt": "0.67.0",
38
+ "oxlint": "1.82.0",
39
+ "publint": "^0.3.25",
40
+ "typescript": "^7.0.2"
41
+ },
42
+ "peerDependencies": {
43
+ "oxlint": "^1.82.0"
44
+ },
45
+ "engines": {
46
+ "node": "^22.20.0 || >=24.8.0"
47
+ },
48
+ "scripts": {
49
+ "format": "oxfmt",
50
+ "format:check": "oxfmt --check",
51
+ "typecheck": "tsc --noEmit",
52
+ "lint": "oxlint --deny-warnings",
53
+ "test": "node --test install-skill.test.ts link-consumer.test.ts rules-md.test.ts rules/*.test.ts",
54
+ "check": "pnpm format:check && pnpm typecheck && pnpm lint && pnpm test",
55
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && node presets/all-json.ts",
56
+ "build:w": "node --watch-path=index.ts --watch-path=rules --watch-path=presets --watch-path=shared --watch-path=tsconfig.build.json scripts/build.ts",
57
+ "pack:check": "node --test presets/all-dist.test.ts && node scripts/pack-check.ts",
58
+ "build-and-pack": "pnpm check && pnpm build && pnpm pack:check && pnpm smoke-test",
59
+ "smoke-test": "node scripts/smoke-test.ts",
60
+ "consumer:link": "./link-consumer.sh link",
61
+ "consumer:unlink": "./link-consumer.sh unlink"
62
+ }
6
63
  }