oxlint-plugin-effect 0.15.0 → 0.16.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/README.md CHANGED
@@ -21,7 +21,19 @@ export default {
21
21
  };
22
22
  ```
23
23
 
24
- If the project uses JSON configuration, copy the exported rule map into `rules`; every recommended rule has `error` severity. The complexity rules carry their limit as an option, `["error", { "max": 21 }]`.
24
+ A JSON configuration extends the generated preset file. It loads the plugin and enables every recommended rule, so new rules arrive with each release:
25
+
26
+ ```jsonc
27
+ {
28
+ "extends": ["./node_modules/oxlint-plugin-effect/presets/recommended.json"],
29
+ "rules": {
30
+ // Local choices override the preset.
31
+ "effect/noTernary": "off",
32
+ },
33
+ }
34
+ ```
35
+
36
+ Every recommended rule has `error` severity. The complexity rules carry their limit as an option, `["error", { "max": 21 }]`.
25
37
 
26
38
  ## Recommended Rules
27
39
 
@@ -204,7 +216,7 @@ bun run codegen
204
216
  bun run add-rule -- no-example --dry-run
205
217
  ```
206
218
 
207
- `bun run codegen` owns both the rule export barrel and the recommended preset.
219
+ `bun run codegen` owns the rule export barrel and both forms of the recommended preset: `src/presets/recommended.ts` and `presets/recommended.json`.
208
220
  `bun run gate` fails when either generated file is stale.
209
221
 
210
222
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-plugin-effect",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "oxlint plugin with Effect-specific lint rules",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "files": [
11
11
  "dist",
12
+ "presets",
12
13
  "THIRD_PARTY_NOTICES.md"
13
14
  ],
14
15
  "type": "module",
@@ -31,6 +32,7 @@
31
32
  "default": "./dist/vendor/effect-oxlint/index.js"
32
33
  }
33
34
  },
35
+ "./presets/recommended.json": "./presets/recommended.json",
34
36
  "./presets/*": {
35
37
  "import": {
36
38
  "types": "./dist/presets/*.d.ts",
@@ -0,0 +1,58 @@
1
+ {
2
+ "jsPlugins": ["oxlint-plugin-effect/plugin"],
3
+ "rules": {
4
+ "complexity": ["error", { "max": 21 }],
5
+ "effect/maxCognitiveComplexity": ["error", { "max": 21 }],
6
+ "effect/maxHalsteadDifficulty": ["error", { "max": 79 }],
7
+ "effect/noArrayFilterMap": "error",
8
+ "effect/noAs": "error",
9
+ "effect/noAsyncFunction": "error",
10
+ "effect/noChainedTypeAssertions": "error",
11
+ "effect/noConditionalEmptyObjectSpread": "error",
12
+ "effect/noDynamicImports": "error",
13
+ "effect/noEagerAcquire": "error",
14
+ "effect/noEffectBind": "error",
15
+ "effect/noEffectDo": "error",
16
+ "effect/noEffectRunInTests": "error",
17
+ "effect/noGlobals": "error",
18
+ "effect/noInlineProvide": "error",
19
+ "effect/noKnownValueWidening": "error",
20
+ "effect/noManagedRuntimeInEffect": "error",
21
+ "effect/noModuleLevelMutableState": "error",
22
+ "effect/noModuleMocks": "error",
23
+ "effect/noNestedEffectGen": "error",
24
+ "effect/noNewError": "error",
25
+ "effect/noNewPromise": "error",
26
+ "effect/noNodeBuiltinImport": "error",
27
+ "effect/noNullish": "error",
28
+ "effect/noObjectParameters": "error",
29
+ "effect/noPerCallCacheConstruction": "error",
30
+ "effect/noReduceAccumulatorCopy": "error",
31
+ "effect/noReflectApply": "error",
32
+ "effect/noReflectGet": "error",
33
+ "effect/noRunCollectOnUnboundedStream": "error",
34
+ "effect/noRuntimeTypeof": "error",
35
+ "effect/noSequentialEffectAll": "error",
36
+ "effect/noShapeInSymbolNames": "error",
37
+ "effect/noSilentCatchAll": "error",
38
+ "effect/noTernary": "error",
39
+ "effect/noTestGlobals": "error",
40
+ "effect/noTestLifecycleHooks": "error",
41
+ "effect/noThrowStatement": "error",
42
+ "effect/noTryCatch": "error",
43
+ "effect/noUnboundedConcurrency": "error",
44
+ "effect/noUnboundedRetry": "error",
45
+ "effect/noUnknownParameters": "error",
46
+ "effect/noUnknownReturns": "error",
47
+ "effect/noUnknownTypeAliases": "error",
48
+ "effect/noUnsafeDictionaryType": "error",
49
+ "effect/noWidenThenAssert": "error",
50
+ "effect/preferCatchTag": "error",
51
+ "effect/preferEffectFn": "error",
52
+ "effect/preferMatchTagsExhaustive": "error",
53
+ "effect/preferPredicateIsTagged": "error",
54
+ "effect/preferServiceOf": "error",
55
+ "effect/requireNamedEffectFn": "error",
56
+ "effect/requireSuppressionReason": "error"
57
+ }
58
+ }