{"id":25193,"library":"effect-oxlint","title":"effect-oxlint","description":"Effect-first library for writing oxlint custom lint rules. Current stable version: 0.2.0. Release cadence: irregular, with initial releases in early 2025. Key differentiators: provides typed errors, composable visitors, Option-safe AST matching, and Ref-based state without mutable variables, wrapping @oxlint/plugins in Effect idioms. Requires effect@^4.0.0-beta.57 as a peer dependency. Ideal for Effect ecosystem developers who want to write lint rules with Effect's effectful computation model.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/mpsuesser/effect-oxlint","tags":["javascript","ast","effect","eslint","lint","linter","oxc","oxlint","plugin","typescript"],"install":[{"cmd":"npm install effect-oxlint","lang":"bash","label":"npm"},{"cmd":"yarn add effect-oxlint","lang":"bash","label":"yarn"},{"cmd":"pnpm add effect-oxlint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; provides Effect, Option, etc. for rule definitions","package":"effect","optional":false}],"imports":[{"note":"ESM-only; named export from main module.","wrong":"const { Rule } = require('effect-oxlint')","symbol":"Rule","correct":"import { Rule } from 'effect-oxlint'"},{"note":"Default import not available; must use named import.","wrong":"import AST from 'effect-oxlint'","symbol":"AST","correct":"import { AST } from 'effect-oxlint'"},{"note":"Named export for assembling plugins.","wrong":null,"symbol":"Plugin","correct":"import { Plugin } from 'effect-oxlint'"},{"note":"Named export for building diagnostics.","wrong":null,"symbol":"Diagnostic","correct":"import { Diagnostic } from 'effect-oxlint'"},{"note":"Testing module is in a subpath export 'effect-oxlint/testing'.","wrong":"import { Testing } from 'effect-oxlint'","symbol":"Testing","correct":"import { Testing } from 'effect-oxlint/testing'"}],"quickstart":{"code":"import * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport { AST, Diagnostic, Rule, RuleContext } from 'effect-oxlint';\n\nconst noJsonParse = Rule.define({\n  name: 'no-json-parse',\n  meta: Rule.meta({\n    type: 'suggestion',\n    description: 'Use Schema for JSON decoding instead of JSON.parse'\n  }),\n  create: function* () {\n    const ctx = yield* RuleContext;\n    return {\n      MemberExpression: (node) =>\n        Option.match(\n          AST.matchMember(node, 'JSON', ['parse', 'stringify']),\n          {\n            onNone: () => Effect.void,\n            onSome: (matched) =>\n              ctx.report(\n                Diagnostic.make({\n                  node: matched,\n                  message: 'Use Schema for JSON'\n                })\n              )\n          }\n        )\n    };\n  }\n});\n\nexport default Plugin.define({\n  name: 'my-effect-rules',\n  rules: {\n    'no-json-parse': noJsonParse\n  }\n});","lang":"typescript","description":"Defines a custom oxlint rule using Effect idioms, then assembles it into a plugin."},"warnings":[{"fix":"Use SourceCode.getText() for full file and SourceCode.getNodeText(node) for specific nodes.","message":"In v0.2.0, SourceCode.getText was split into getText() (whole file) and getNodeText(node) (node-specific). Old overload with Option<Node> removed.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Update effect to ^4.0.0-beta.57.","message":"Requires effect@^4.0.0-beta.57; incompatible with older effect versions.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Use getNodeText for node-specific text extraction.","message":"The previous Option<Node> overload of SourceCode.getText is removed; update to split functions.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"npm install effect@^4.0.0-beta.57","message":"Peer dependency effect must be at least 4.0.0-beta.57; earlier betas fail.","severity":"breaking","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install effect@^4.0.0-beta.57 alongside effect-oxlint.","cause":"Missing or incompatible peer dependency 'effect'.","error":"Cannot find module 'effect-oxlint' or its corresponding type declarations."},{"fix":"Ensure create is a generator function and wrap in Effect.runSync or similar.","cause":"Using yield* in a non-generator context or missing Effect.run*.","error":"TypeError: (intermediate value) is not iterable"},{"fix":"import { Testing } from 'effect-oxlint/testing'","cause":"Importing Testing from wrong path; Testing is a subpath export.","error":"Error: Cannot find module 'effect-oxlint/testing'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}