@imranbarbhuiya/oxc-config 0.3.0 → 0.3.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.
package/README.md CHANGED
@@ -155,7 +155,15 @@ The `effect-node` CLI preset extends `common`, `node`, `typescript`, `module` an
155
155
  - `no-restricted-imports` rejects v3-era paths: `effect/Either`, `effect/unstable/*`, `@effect/platform`, `@effect/schema`, `@effect/rpc`, `@effect/cluster`, `@effect/sql` and their subpaths
156
156
  - `node-js/no-process-env` rejects `process.env`; use `Config`. It is off under `**/scripts/**`
157
157
 
158
- The fragment also relaxes rules that fire on idiomatic Effect code: `func-names` ignores generators, `require-yield` and `unicorn/throw-new-error` are off, and `no-use-before-define` allows classes referenced from inner scopes, so errors can be declared after the services that use them.
158
+ The fragment also turns off or relaxes rules that fire on idiomatic Effect code. Oxlint has no way to scope a rule to files that use Effect, so these apply to every file the fragment covers:
159
+
160
+ - `no-redeclare` is off, so a schema and its type can share a name (`const UserId = Schema.String.pipe(Schema.brand('UserId'))` with `type UserId = typeof UserId.Type`). Oxlint has no TypeScript-aware variant that allows value and type pairs. Redeclared `let`, `const` and `class` bindings are still errors from the parser and TypeScript
161
+ - `promise/prefer-await-to-callbacks`, `promise/prefer-await-to-then` and `unicorn/prefer-top-level-await` are off, because they flag `Effect.catch`, `Effect.catchTag`, `Effect.tapError` and `Stream.catch` as Promise chains or Node-style callbacks
162
+ - `require-yield` and `unicorn/throw-new-error` are off
163
+ - `func-names` ignores generators
164
+ - `no-use-before-define` allows classes referenced from inner scopes, so errors can be declared after the services that use them
165
+
166
+ Extend `effect` after `common` and `typescript` so these settings win.
159
167
 
160
168
  Change the allowed run files:
161
169
 
@@ -168,7 +176,16 @@ export default defineConfig({
168
176
  });
169
177
  ```
170
178
 
171
- `effect-types-only` is for UI packages that share types with an Effect backend but should not ship the Effect runtime. It sets `no-restricted-imports` for `effect`, `effect/*` and `@effect/*` with `allowTypeImports: true`. Do not combine it with `effect`, because both configure `no-restricted-imports` and the last one wins.
179
+ `effect-types-only` is for UI packages that share types with an Effect backend but should not ship the Effect runtime. `mahir-effect/types-only-imports` flags value imports, value re-exports and dynamic imports of `effect`, `effect/*` and `@effect/*`. `import type`, `export type` and inline `type` specifiers are allowed. It does not use `no-restricted-imports`, so you can add your own entries:
180
+
181
+ ```ts
182
+ export default defineConfig({
183
+ extends: [common, typescript, module, native, effectTypesOnly],
184
+ rules: {
185
+ 'no-restricted-imports': [2, { paths: [{ name: 'react-native', importNames: ['Image'] }] }],
186
+ },
187
+ });
188
+ ```
172
189
 
173
190
  ## Unistyles
174
191
 
@@ -1,19 +1,9 @@
1
1
  //#region src/effect-types-only.d.ts
2
2
  declare const config: {
3
3
  plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
4
+ jsPlugins: import("oxlint").ExternalPluginEntry[];
4
5
  rules: {
5
- 'no-restricted-imports': [number, {
6
- paths: {
7
- name: string;
8
- message: string;
9
- allowTypeImports: true;
10
- }[];
11
- patterns: {
12
- group: string[];
13
- message: string;
14
- allowTypeImports: true;
15
- }[];
16
- }];
6
+ 'mahir-effect/types-only-imports': number;
17
7
  };
18
8
  };
19
9
  //#endregion
@@ -1,22 +1,11 @@
1
- import { nativePlugins } from "./config.js";
1
+ import { localPlugin, nativePlugins } from "./config.js";
2
2
  import { defineConfig } from "oxlint";
3
3
 
4
4
  //#region src/effect-types-only.ts
5
- const message = "UI uses generated OpenAPI types and openapi-fetch; import Effect types only.";
6
5
  const config = defineConfig({
7
6
  plugins: nativePlugins,
8
- rules: { "no-restricted-imports": [2, {
9
- paths: [{
10
- name: "effect",
11
- message,
12
- allowTypeImports: true
13
- }],
14
- patterns: [{
15
- group: ["effect/*", "@effect/*"],
16
- message,
17
- allowTypeImports: true
18
- }]
19
- }] }
7
+ jsPlugins: [localPlugin("mahir-effect", "./plugins/effect.js")],
8
+ rules: { "mahir-effect/types-only-imports": 2 }
20
9
  });
21
10
 
22
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"effect-types-only.js","names":[],"sources":["../src/effect-types-only.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { nativePlugins } from './config.js';\n\nconst message = 'UI uses generated OpenAPI types and openapi-fetch; import Effect types only.';\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\trules: {\n\t\t'no-restricted-imports': [\n\t\t\t2,\n\t\t\t{\n\t\t\t\tpaths: [{ name: 'effect', message, allowTypeImports: true }],\n\t\t\t\tpatterns: [{ group: ['effect/*', '@effect/*'], message, allowTypeImports: true }],\n\t\t\t},\n\t\t],\n\t},\n});\n\nexport default config;\n"],"mappings":";;;;AAIA,MAAM,UAAU;AAEhB,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT,OAAO,EACN,yBAAyB,CACxB,GACA;EACC,OAAO,CAAC;GAAE,MAAM;GAAU;GAAS,kBAAkB;EAAK,CAAC;EAC3D,UAAU,CAAC;GAAE,OAAO,CAAC,YAAY,WAAW;GAAG;GAAS,kBAAkB;EAAK,CAAC;CACjF,CACD,EACD;AACD,CAAC"}
1
+ {"version":3,"file":"effect-types-only.js","names":[],"sources":["../src/effect-types-only.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { localPlugin, nativePlugins } from './config.js';\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\tjsPlugins: [localPlugin('mahir-effect', './plugins/effect.js')],\n\trules: {\n\t\t'mahir-effect/types-only-imports': 2,\n\t},\n});\n\nexport default config;\n"],"mappings":";;;;AAIA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT,WAAW,CAAC,YAAY,gBAAgB,qBAAqB,CAAC;CAC9D,OAAO,EACN,mCAAmC,EACpC;AACD,CAAC"}
package/dist/effect.js CHANGED
@@ -62,7 +62,11 @@ const rules = {
62
62
  functions: false,
63
63
  variables: true
64
64
  }],
65
+ "no-redeclare": 0,
66
+ "promise/prefer-await-to-callbacks": 0,
67
+ "promise/prefer-await-to-then": 0,
65
68
  "require-yield": 0,
69
+ "unicorn/prefer-top-level-await": 0,
66
70
  "unicorn/throw-new-error": 0
67
71
  };
68
72
  const config = defineConfig({
@@ -1 +1 @@
1
- {"version":3,"file":"effect.js","names":[],"sources":["../src/effect.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { localPlugin, nativePlugins, packagePlugin } from './config.js';\n\nimport type { OxlintConfig } from 'oxlint';\n\nconst V3_MESSAGE = 'This is an Effect v3 import path that does not exist in Effect v4.';\n\nconst rules: NonNullable<OxlintConfig['rules']> = {\n\t'mahir-effect/fn-name-matches': 2,\n\t'mahir-effect/no-gen-wrapper': 2,\n\t'mahir-effect/no-pipe-on-fn': 2,\n\t'mahir-effect/no-run-outside-edge': 2,\n\t'mahir-effect/no-throw-in-gen': 2,\n\t'mahir-effect/return-yield-error': 2,\n\t'no-restricted-imports': [\n\t\t2,\n\t\t{\n\t\t\tpaths: [\n\t\t\t\t{ name: 'effect/Either', message: 'Effect v4 replaced `effect/Either` with `effect/Result`.' },\n\t\t\t\t{ name: '@effect/platform', message: `${V3_MESSAGE} Import from \\`effect\\` or \\`effect/<module>\\`.` },\n\t\t\t\t{ name: '@effect/schema', message: `${V3_MESSAGE} Import \\`Schema\\` from \\`effect\\`.` },\n\t\t\t\t{ name: '@effect/rpc', message: `${V3_MESSAGE} Import from \\`effect/rpc\\`.` },\n\t\t\t\t{ name: '@effect/cluster', message: `${V3_MESSAGE} Import from \\`effect/cluster\\`.` },\n\t\t\t\t{ name: '@effect/sql', message: `${V3_MESSAGE} Import from \\`effect/sql\\`.` },\n\t\t\t],\n\t\t\tpatterns: [\n\t\t\t\t{\n\t\t\t\t\tgroup: ['effect/unstable/*'],\n\t\t\t\t\tmessage: 'Effect v4 dropped the `unstable` segment. Import from `effect/<module>`.',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: ['@effect/platform/*', '@effect/schema/*', '@effect/rpc/*', '@effect/cluster/*', '@effect/sql/*'],\n\t\t\t\t\tmessage: `${V3_MESSAGE} Import from \\`effect\\` or \\`effect/<module>\\`.`,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n\t'node-js/no-process-env': 2,\n\t'func-names': [2, 'as-needed', { generators: 'never' }],\n\t'no-use-before-define': [\n\t\t2,\n\t\t{\n\t\t\tclasses: false,\n\t\t\tfunctions: false,\n\t\t\tvariables: true,\n\t\t},\n\t],\n\t'require-yield': 0,\n\t'unicorn/throw-new-error': 0,\n};\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\tjsPlugins: [localPlugin('mahir-effect', './plugins/effect.js'), packagePlugin('node-js', 'eslint-plugin-n')],\n\trules,\n\toverrides: [\n\t\t{\n\t\t\tfiles: ['**/scripts/**'],\n\t\t\trules: {\n\t\t\t\t'node-js/no-process-env': 0,\n\t\t\t},\n\t\t},\n\t],\n});\n\nexport default config;\n"],"mappings":";;;;AAMA,MAAM,aAAa;AAEnB,MAAM,QAA4C;CACjD,gCAAgC;CAChC,+BAA+B;CAC/B,8BAA8B;CAC9B,oCAAoC;CACpC,gCAAgC;CAChC,mCAAmC;CACnC,yBAAyB,CACxB,GACA;EACC,OAAO;GACN;IAAE,MAAM;IAAiB,SAAS;GAA2D;GAC7F;IAAE,MAAM;IAAoB,SAAS,GAAG,WAAW;GAAiD;GACpG;IAAE,MAAM;IAAkB,SAAS,GAAG,WAAW;GAAqC;GACtF;IAAE,MAAM;IAAe,SAAS,GAAG,WAAW;GAA8B;GAC5E;IAAE,MAAM;IAAmB,SAAS,GAAG,WAAW;GAAkC;GACpF;IAAE,MAAM;IAAe,SAAS,GAAG,WAAW;GAA8B;EAC7E;EACA,UAAU,CACT;GACC,OAAO,CAAC,mBAAmB;GAC3B,SAAS;EACV,GACA;GACC,OAAO;IAAC;IAAsB;IAAoB;IAAiB;IAAqB;GAAe;GACvG,SAAS,GAAG,WAAW;EACxB,CACD;CACD,CACD;CACA,0BAA0B;CAC1B,cAAc;EAAC;EAAG;EAAa,EAAE,YAAY,QAAQ;CAAC;CACtD,wBAAwB,CACvB,GACA;EACC,SAAS;EACT,WAAW;EACX,WAAW;CACZ,CACD;CACA,iBAAiB;CACjB,2BAA2B;AAC5B;AAEA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT,WAAW,CAAC,YAAY,gBAAgB,qBAAqB,GAAG,cAAc,WAAW,iBAAiB,CAAC;CAC3G;CACA,WAAW,CACV;EACC,OAAO,CAAC,eAAe;EACvB,OAAO,EACN,0BAA0B,EAC3B;CACD,CACD;AACD,CAAC"}
1
+ {"version":3,"file":"effect.js","names":[],"sources":["../src/effect.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { localPlugin, nativePlugins, packagePlugin } from './config.js';\n\nimport type { OxlintConfig } from 'oxlint';\n\nconst V3_MESSAGE = 'This is an Effect v3 import path that does not exist in Effect v4.';\n\nconst rules: NonNullable<OxlintConfig['rules']> = {\n\t'mahir-effect/fn-name-matches': 2,\n\t'mahir-effect/no-gen-wrapper': 2,\n\t'mahir-effect/no-pipe-on-fn': 2,\n\t'mahir-effect/no-run-outside-edge': 2,\n\t'mahir-effect/no-throw-in-gen': 2,\n\t'mahir-effect/return-yield-error': 2,\n\t'no-restricted-imports': [\n\t\t2,\n\t\t{\n\t\t\tpaths: [\n\t\t\t\t{ name: 'effect/Either', message: 'Effect v4 replaced `effect/Either` with `effect/Result`.' },\n\t\t\t\t{ name: '@effect/platform', message: `${V3_MESSAGE} Import from \\`effect\\` or \\`effect/<module>\\`.` },\n\t\t\t\t{ name: '@effect/schema', message: `${V3_MESSAGE} Import \\`Schema\\` from \\`effect\\`.` },\n\t\t\t\t{ name: '@effect/rpc', message: `${V3_MESSAGE} Import from \\`effect/rpc\\`.` },\n\t\t\t\t{ name: '@effect/cluster', message: `${V3_MESSAGE} Import from \\`effect/cluster\\`.` },\n\t\t\t\t{ name: '@effect/sql', message: `${V3_MESSAGE} Import from \\`effect/sql\\`.` },\n\t\t\t],\n\t\t\tpatterns: [\n\t\t\t\t{\n\t\t\t\t\tgroup: ['effect/unstable/*'],\n\t\t\t\t\tmessage: 'Effect v4 dropped the `unstable` segment. Import from `effect/<module>`.',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: ['@effect/platform/*', '@effect/schema/*', '@effect/rpc/*', '@effect/cluster/*', '@effect/sql/*'],\n\t\t\t\t\tmessage: `${V3_MESSAGE} Import from \\`effect\\` or \\`effect/<module>\\`.`,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n\t'node-js/no-process-env': 2,\n\t'func-names': [2, 'as-needed', { generators: 'never' }],\n\t'no-use-before-define': [\n\t\t2,\n\t\t{\n\t\t\tclasses: false,\n\t\t\tfunctions: false,\n\t\t\tvariables: true,\n\t\t},\n\t],\n\t'no-redeclare': 0,\n\t'promise/prefer-await-to-callbacks': 0,\n\t'promise/prefer-await-to-then': 0,\n\t'require-yield': 0,\n\t'unicorn/prefer-top-level-await': 0,\n\t'unicorn/throw-new-error': 0,\n};\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\tjsPlugins: [localPlugin('mahir-effect', './plugins/effect.js'), packagePlugin('node-js', 'eslint-plugin-n')],\n\trules,\n\toverrides: [\n\t\t{\n\t\t\tfiles: ['**/scripts/**'],\n\t\t\trules: {\n\t\t\t\t'node-js/no-process-env': 0,\n\t\t\t},\n\t\t},\n\t],\n});\n\nexport default config;\n"],"mappings":";;;;AAMA,MAAM,aAAa;AAEnB,MAAM,QAA4C;CACjD,gCAAgC;CAChC,+BAA+B;CAC/B,8BAA8B;CAC9B,oCAAoC;CACpC,gCAAgC;CAChC,mCAAmC;CACnC,yBAAyB,CACxB,GACA;EACC,OAAO;GACN;IAAE,MAAM;IAAiB,SAAS;GAA2D;GAC7F;IAAE,MAAM;IAAoB,SAAS,GAAG,WAAW;GAAiD;GACpG;IAAE,MAAM;IAAkB,SAAS,GAAG,WAAW;GAAqC;GACtF;IAAE,MAAM;IAAe,SAAS,GAAG,WAAW;GAA8B;GAC5E;IAAE,MAAM;IAAmB,SAAS,GAAG,WAAW;GAAkC;GACpF;IAAE,MAAM;IAAe,SAAS,GAAG,WAAW;GAA8B;EAC7E;EACA,UAAU,CACT;GACC,OAAO,CAAC,mBAAmB;GAC3B,SAAS;EACV,GACA;GACC,OAAO;IAAC;IAAsB;IAAoB;IAAiB;IAAqB;GAAe;GACvG,SAAS,GAAG,WAAW;EACxB,CACD;CACD,CACD;CACA,0BAA0B;CAC1B,cAAc;EAAC;EAAG;EAAa,EAAE,YAAY,QAAQ;CAAC;CACtD,wBAAwB,CACvB,GACA;EACC,SAAS;EACT,WAAW;EACX,WAAW;CACZ,CACD;CACA,gBAAgB;CAChB,qCAAqC;CACrC,gCAAgC;CAChC,iBAAiB;CACjB,kCAAkC;CAClC,2BAA2B;AAC5B;AAEA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT,WAAW,CAAC,YAAY,gBAAgB,qBAAqB,GAAG,cAAc,WAAW,iBAAiB,CAAC;CAC3G;CACA,WAAW,CACV;EACC,OAAO,CAAC,eAAe;EACvB,OAAO,EACN,0BAA0B,EAC3B;CACD,CACD;AACD,CAAC"}
@@ -230,6 +230,44 @@ const noRunOutsideEdge = defineRule({
230
230
  };
231
231
  }
232
232
  });
233
+ function isEffectModule(source) {
234
+ return source === "effect" || source.startsWith("effect/") || source.startsWith("@effect/");
235
+ }
236
+ function isTypeOnly(kind, specifiers) {
237
+ if (kind === "type") return true;
238
+ return specifiers.length > 0 && specifiers.every((specifier) => specifier.importKind === "type" || specifier.exportKind === "type");
239
+ }
240
+ const typesOnlyImports = defineRule({
241
+ meta: {
242
+ type: "problem",
243
+ docs: { description: "Allow only type imports from `effect`, `effect/*` and `@effect/*`" },
244
+ messages: { valueImport: "`{{source}}` is a runtime import. This package must not ship the Effect runtime; use `import type` or inline `type` specifiers." }
245
+ },
246
+ createOnce(context) {
247
+ function check(node, source) {
248
+ const name = staticString(source ?? void 0);
249
+ if (name !== void 0 && isEffectModule(name)) context.report({
250
+ node,
251
+ messageId: "valueImport",
252
+ data: { source: name }
253
+ });
254
+ }
255
+ return {
256
+ ImportDeclaration(node) {
257
+ if (!isTypeOnly(node.importKind, node.specifiers)) check(node, node.source);
258
+ },
259
+ ExportNamedDeclaration(node) {
260
+ if (node.source && !isTypeOnly(node.exportKind, node.specifiers)) check(node, node.source);
261
+ },
262
+ ExportAllDeclaration(node) {
263
+ if (node.exportKind !== "type") check(node, node.source);
264
+ },
265
+ ImportExpression(node) {
266
+ check(node, node.source);
267
+ }
268
+ };
269
+ }
270
+ });
233
271
  var effect_default = definePlugin({
234
272
  meta: { name: "eslint-plugin-mahir-effect" },
235
273
  rules: {
@@ -238,7 +276,8 @@ var effect_default = definePlugin({
238
276
  "no-pipe-on-fn": noPipeOnFn,
239
277
  "no-run-outside-edge": noRunOutsideEdge,
240
278
  "no-throw-in-gen": noThrowInGen,
241
- "return-yield-error": returnYieldError
279
+ "return-yield-error": returnYieldError,
280
+ "types-only-imports": typesOnlyImports
242
281
  }
243
282
  });
244
283
 
@@ -1 +1 @@
1
- {"version":3,"file":"effect.js","names":[],"sources":["../../src/plugins/effect.ts"],"sourcesContent":["import { definePlugin, defineRule } from '@oxlint/plugins';\n\nimport { matchesFileGlob } from '../config.js';\n\nimport type { ESTree } from '@oxlint/plugins';\n\nconst DEFAULT_EDGE_FILES = ['**/main.ts', '**/*.test.ts', '**/scripts/**'];\nconst RUN_METHODS = new Set(['runCallback', 'runFork', 'runPromise', 'runPromiseExit', 'runSync', 'runSyncExit']);\nconst FAIL_METHODS = new Set(['die', 'dieMessage', 'dieSync', 'fail', 'failCause', 'failCauseSync', 'failSync']);\nconst FN_METHODS = new Set(['fn', 'fnUntraced']);\nconst FN_NAMED = new Set(['fn']);\nconst GEN = new Set(['gen']);\nconst GEN_OR_FN = new Set(['gen', ...FN_METHODS]);\n\nfunction isEffectMember(node: ESTree.Node, methods: Set<string>): node is ESTree.MemberExpression {\n\treturn (\n\t\tnode.type === 'MemberExpression' &&\n\t\t!node.computed &&\n\t\tnode.object.type === 'Identifier' &&\n\t\tnode.object.name === 'Effect' &&\n\t\tnode.property.type === 'Identifier' &&\n\t\tmethods.has(node.property.name)\n\t);\n}\n\nfunction isEffectCall(node: ESTree.Node | null | undefined, methods: Set<string>): node is ESTree.CallExpression {\n\treturn node?.type === 'CallExpression' && isEffectMember(node.callee, methods);\n}\n\nfunction staticString(node: ESTree.Node | undefined) {\n\tif (node?.type === 'Literal' && typeof node.value === 'string') return node.value;\n\tif (node?.type !== 'TemplateLiteral' || node.expressions.length > 0) return undefined;\n\treturn node.quasis[0]?.value.cooked ?? undefined;\n}\n\nfunction isNamedFnFactory(node: ESTree.Node): node is ESTree.CallExpression {\n\treturn isEffectCall(node, FN_NAMED) && staticString(node.arguments[0]) !== undefined;\n}\n\nfunction isEffectGeneratorBody(fn: ESTree.Node) {\n\tif (fn.type !== 'FunctionExpression' || !fn.generator) return false;\n\tconst call = fn.parent;\n\tif (call.type !== 'CallExpression' || !call.arguments.includes(fn)) return false;\n\tif (isEffectMember(call.callee, GEN_OR_FN)) return true;\n\treturn isNamedFnFactory(call.callee);\n}\n\nfunction isEffectFnCall(node: ESTree.Node) {\n\tif (node.type !== 'CallExpression') return false;\n\tif (isNamedFnFactory(node.callee)) return true;\n\treturn isEffectCall(node, FN_METHODS) && node.arguments[0]?.type === 'FunctionExpression';\n}\n\nfunction isGenOrPipedGen(node: ESTree.Node | null | undefined) {\n\tif (node?.type !== 'CallExpression') return false;\n\tconst { callee } = node;\n\tif (\n\t\tcallee.type === 'MemberExpression' &&\n\t\t!callee.computed &&\n\t\tcallee.property.type === 'Identifier' &&\n\t\tcallee.property.name === 'pipe'\n\t) {\n\t\treturn isEffectCall(callee.object, GEN);\n\t}\n\treturn isEffectMember(callee, GEN);\n}\n\nfunction returnedExpression(fn: ESTree.Function | ESTree.ArrowFunctionExpression) {\n\tconst { body } = fn;\n\tif (!body) return undefined;\n\tif (body.type !== 'BlockStatement') return body;\n\tif (body.body.length !== 1) return undefined;\n\tconst [statement] = body.body;\n\treturn statement.type === 'ReturnStatement' ? statement.argument : undefined;\n}\n\nfunction isReusableFunction(fn: ESTree.Function | ESTree.ArrowFunctionExpression) {\n\tif (fn.type === 'FunctionDeclaration') return true;\n\tconst { parent } = fn;\n\tif (parent.type === 'VariableDeclarator') return parent.init === fn;\n\tif (parent.type === 'Property' || parent.type === 'PropertyDefinition') return parent.value === fn;\n\treturn parent.type === 'MethodDefinition' || parent.type === 'ExportDefaultDeclaration';\n}\n\nfunction bindingName(node: ESTree.Node) {\n\tconst { parent } = node;\n\tif (!parent) return undefined;\n\tif (parent.type === 'VariableDeclarator' && parent.init === node && parent.id.type === 'Identifier') {\n\t\treturn parent.id.name;\n\t}\n\tif (\n\t\t(parent.type === 'Property' || parent.type === 'PropertyDefinition') &&\n\t\tparent.value === node &&\n\t\t!parent.computed\n\t) {\n\t\tif (parent.key.type === 'Identifier') return parent.key.name;\n\t\treturn staticString(parent.key);\n\t}\n\treturn undefined;\n}\n\nconst noGenWrapper = defineRule({\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Disallow functions that only wrap and return `Effect.gen`',\n\t\t},\n\t\tmessages: {\n\t\t\tnoGenWrapper:\n\t\t\t\t'Avoid functions that only wrap and return `Effect.gen`. Use `Effect.fn(\"name\")(function* (...) {...})` or `Effect.fnUntraced` instead.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\tfunction check(fn: ESTree.Function | ESTree.ArrowFunctionExpression) {\n\t\t\tif (fn.generator || !isReusableFunction(fn)) return;\n\t\t\tif (isGenOrPipedGen(returnedExpression(fn))) context.report({ node: fn, messageId: 'noGenWrapper' });\n\t\t}\n\t\treturn {\n\t\t\tArrowFunctionExpression: check,\n\t\t\tFunctionDeclaration: check,\n\t\t\tFunctionExpression: check,\n\t\t};\n\t},\n});\n\nconst fnNameMatches = defineRule({\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Require the `Effect.fn` span name to match the binding it is assigned to',\n\t\t},\n\t\tfixable: 'code',\n\t\tmessages: {\n\t\t\tmismatch: '`Effect.fn(\"{{name}}\")` is assigned to `{{binding}}`. Use \"{{binding}}\" or \"<Service>.{{binding}}\".',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tif (!isNamedFnFactory(node.callee)) return;\n\t\t\t\tconst binding = bindingName(node);\n\t\t\t\tconst nameNode = node.callee.arguments[0];\n\t\t\t\tconst name = staticString(nameNode);\n\t\t\t\tif (!binding || name === undefined) return;\n\t\t\t\tif (name === binding || name.endsWith(`.${binding}`)) return;\n\t\t\t\tcontext.report({\n\t\t\t\t\tnode: nameNode,\n\t\t\t\t\tmessageId: 'mismatch',\n\t\t\t\t\tdata: { name, binding },\n\t\t\t\t\tfix(fixer) {\n\t\t\t\t\t\tconst quote = context.sourceCode.getText(nameNode).at(0) ?? \"'\";\n\t\t\t\t\t\tconst prefix = name.includes('.') ? name.slice(0, name.lastIndexOf('.') + 1) : '';\n\t\t\t\t\t\treturn fixer.replaceText(nameNode, `${quote}${prefix}${binding}${quote}`);\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst returnYieldError = defineRule({\n\tmeta: {\n\t\ttype: 'problem',\n\t\tdocs: {\n\t\t\tdescription: 'Require `return yield*` when yielding an error so TypeScript knows execution stops',\n\t\t},\n\t\tfixable: 'code',\n\t\tmessages: {\n\t\t\tmissingReturn: 'Use `return yield* ...` when raising an error so TypeScript knows the generator stops here.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tYieldExpression(node) {\n\t\t\t\tif (!node.delegate || !node.argument || node.parent.type !== 'ExpressionStatement') return;\n\t\t\t\tif (node.argument.type !== 'NewExpression' && !isEffectCall(node.argument, FAIL_METHODS)) return;\n\t\t\t\tcontext.report({\n\t\t\t\t\tnode,\n\t\t\t\t\tmessageId: 'missingReturn',\n\t\t\t\t\tfix: (fixer) => fixer.insertTextBefore(node, 'return '),\n\t\t\t\t});\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst noPipeOnFn = defineRule({\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Disallow `.pipe` on `Effect.fn` / `Effect.fnUntraced`; pass combinators as extra arguments',\n\t\t},\n\t\tmessages: {\n\t\t\tnoPipe:\n\t\t\t\t'Do not use `.pipe` with `Effect.fn`. Pass the combinators as extra arguments: `Effect.fn(\"name\")(function* () {...}, Effect.withSpan(...))`.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tMemberExpression(node) {\n\t\t\t\tif (node.computed || node.property.type !== 'Identifier' || node.property.name !== 'pipe') return;\n\t\t\t\tif (!isEffectFnCall(node.object)) return;\n\t\t\t\tcontext.report({ node: node.property, messageId: 'noPipe' });\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst noThrowInGen = defineRule({\n\tmeta: {\n\t\ttype: 'problem',\n\t\tdocs: {\n\t\t\tdescription: 'Disallow `throw` inside `Effect.gen` / `Effect.fn` generators',\n\t\t},\n\t\tmessages: {\n\t\t\tnoThrow:\n\t\t\t\t'Do not throw inside an Effect generator; a throw becomes a defect. Use `return yield* new SomeError(...)` instead.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tThrowStatement(node) {\n\t\t\t\tlet current: ESTree.Node = node.parent;\n\t\t\t\twhile (\n\t\t\t\t\tcurrent.type !== 'FunctionExpression' &&\n\t\t\t\t\tcurrent.type !== 'FunctionDeclaration' &&\n\t\t\t\t\tcurrent.type !== 'ArrowFunctionExpression' &&\n\t\t\t\t\tcurrent.type !== 'Program'\n\t\t\t\t) {\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t\tif (isEffectGeneratorBody(current)) context.report({ node, messageId: 'noThrow' });\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst noRunOutsideEdge = defineRule({\n\tmeta: {\n\t\ttype: 'problem',\n\t\tdocs: {\n\t\t\tdescription: 'Restrict `Effect.run*` to entrypoints, tests and scripts',\n\t\t},\n\t\tschema: [\n\t\t\t{\n\t\t\t\ttype: 'object',\n\t\t\t\tadditionalProperties: false,\n\t\t\t\tproperties: {\n\t\t\t\t\tallow: {\n\t\t\t\t\t\ttype: 'array',\n\t\t\t\t\t\titems: { type: 'string', minLength: 1 },\n\t\t\t\t\t\tuniqueItems: true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tmessages: {\n\t\t\tnoRun:\n\t\t\t\t'`Effect.{{method}}` belongs at the edge (`NodeRuntime.runMain`, `ManagedRuntime`). Allowed files: {{allow}}.',\n\t\t},\n\t\tdefaultOptions: [{ allow: [...DEFAULT_EDGE_FILES] }],\n\t},\n\tcreateOnce(context) {\n\t\tlet allow = DEFAULT_EDGE_FILES;\n\t\treturn {\n\t\t\tbefore() {\n\t\t\t\tconst options = context.options[0] as { allow?: string[] } | undefined;\n\t\t\t\tallow = options?.allow ?? DEFAULT_EDGE_FILES;\n\t\t\t\treturn !matchesFileGlob(context, allow);\n\t\t\t},\n\t\t\tCallExpression(node) {\n\t\t\t\tif (!isEffectMember(node.callee, RUN_METHODS)) return;\n\t\t\t\tconst method = node.callee.property.type === 'Identifier' ? node.callee.property.name : '';\n\t\t\t\tcontext.report({ node, messageId: 'noRun', data: { method, allow: allow.join(', ') } });\n\t\t\t},\n\t\t};\n\t},\n});\n\nexport default definePlugin({\n\tmeta: {\n\t\tname: 'eslint-plugin-mahir-effect',\n\t},\n\trules: {\n\t\t'fn-name-matches': fnNameMatches,\n\t\t'no-gen-wrapper': noGenWrapper,\n\t\t'no-pipe-on-fn': noPipeOnFn,\n\t\t'no-run-outside-edge': noRunOutsideEdge,\n\t\t'no-throw-in-gen': noThrowInGen,\n\t\t'return-y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;IAAM,WAAW;GAAU,CAAC;EAClF,EACD;CACD;AACD,CAAC;AAED,MAAM,mBAAmB,WAAW;CACnC,MAAM;EACL,MAAM;EACN,MAAM,EACL,aAAa,2DACd;EACA,QAAQ,CACP;GACC,MAAM;GACN,sBAAsB;GACtB,YAAY,EACX,OAAO;IACN,MAAM;IACN,OAAO;KAAE,MAAM;KAAU,WAAW;IAAE;IACtC,aAAa;GACd,EACD;EACD,CACD;EACA,UAAU,EACT,OACC,+GACF;EACA,gBAAgB,CAAC,EAAE,OAAO,CAAC,GAAG,kBAAkB,EAAE,CAAC;CACpD;CACA,WAAW,SAAS;EACnB,IAAI,QAAQ;EACZ,OAAO;GACN,SAAS;IAER,QADgB,QAAQ,QAAQ,EACjB,EAAE,SAAS;IAC1B,OAAO,CAAC,gBAAgB,SAAS,KAAK;GACvC;GACA,eAAe,MAAM;IACpB,IAAI,CAAC,eAAe,KAAK,QAAQ,WAAW,GAAG;IAC/C,MAAM,SAAS,KAAK,OAAO,SAAS,SAAS,eAAe,KAAK,OAAO,SAAS,OAAO;IACxF,QAAQ,OAAO;KAAE;KAAM,WAAW;KAAS,MAAM;MAAE;MAAQ,OAAO,MAAM,KAAK,IAAI;KAAE;IAAE,CAAC;GACvF;EACD;CACD;AACD,CAAC;AAED,qBAAe,aAAa;CAC3B,MAAM,EACL,MAAM,6BACP;CACA,OAAO;EACN,mBAAmB;EACnB,kBAAkB;EAClB,iBAAiB;EACjB,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;CACvB;AACD,CAAC"}
1
+ {"version":3,"file":"effect.js","names":[],"sources":["../../src/plugins/effect.ts"],"sourcesContent":["import { definePlugin, defineRule } from '@oxlint/plugins';\n\nimport { matchesFileGlob } from '../config.js';\n\nimport type { ESTree } from '@oxlint/plugins';\n\nconst DEFAULT_EDGE_FILES = ['**/main.ts', '**/*.test.ts', '**/scripts/**'];\nconst RUN_METHODS = new Set(['runCallback', 'runFork', 'runPromise', 'runPromiseExit', 'runSync', 'runSyncExit']);\nconst FAIL_METHODS = new Set(['die', 'dieMessage', 'dieSync', 'fail', 'failCause', 'failCauseSync', 'failSync']);\nconst FN_METHODS = new Set(['fn', 'fnUntraced']);\nconst FN_NAMED = new Set(['fn']);\nconst GEN = new Set(['gen']);\nconst GEN_OR_FN = new Set(['gen', ...FN_METHODS]);\n\nfunction isEffectMember(node: ESTree.Node, methods: Set<string>): node is ESTree.MemberExpression {\n\treturn (\n\t\tnode.type === 'MemberExpression' &&\n\t\t!node.computed &&\n\t\tnode.object.type === 'Identifier' &&\n\t\tnode.object.name === 'Effect' &&\n\t\tnode.property.type === 'Identifier' &&\n\t\tmethods.has(node.property.name)\n\t);\n}\n\nfunction isEffectCall(node: ESTree.Node | null | undefined, methods: Set<string>): node is ESTree.CallExpression {\n\treturn node?.type === 'CallExpression' && isEffectMember(node.callee, methods);\n}\n\nfunction staticString(node: ESTree.Node | undefined) {\n\tif (node?.type === 'Literal' && typeof node.value === 'string') return node.value;\n\tif (node?.type !== 'TemplateLiteral' || node.expressions.length > 0) return undefined;\n\treturn node.quasis[0]?.value.cooked ?? undefined;\n}\n\nfunction isNamedFnFactory(node: ESTree.Node): node is ESTree.CallExpression {\n\treturn isEffectCall(node, FN_NAMED) && staticString(node.arguments[0]) !== undefined;\n}\n\nfunction isEffectGeneratorBody(fn: ESTree.Node) {\n\tif (fn.type !== 'FunctionExpression' || !fn.generator) return false;\n\tconst call = fn.parent;\n\tif (call.type !== 'CallExpression' || !call.arguments.includes(fn)) return false;\n\tif (isEffectMember(call.callee, GEN_OR_FN)) return true;\n\treturn isNamedFnFactory(call.callee);\n}\n\nfunction isEffectFnCall(node: ESTree.Node) {\n\tif (node.type !== 'CallExpression') return false;\n\tif (isNamedFnFactory(node.callee)) return true;\n\treturn isEffectCall(node, FN_METHODS) && node.arguments[0]?.type === 'FunctionExpression';\n}\n\nfunction isGenOrPipedGen(node: ESTree.Node | null | undefined) {\n\tif (node?.type !== 'CallExpression') return false;\n\tconst { callee } = node;\n\tif (\n\t\tcallee.type === 'MemberExpression' &&\n\t\t!callee.computed &&\n\t\tcallee.property.type === 'Identifier' &&\n\t\tcallee.property.name === 'pipe'\n\t) {\n\t\treturn isEffectCall(callee.object, GEN);\n\t}\n\treturn isEffectMember(callee, GEN);\n}\n\nfunction returnedExpression(fn: ESTree.Function | ESTree.ArrowFunctionExpression) {\n\tconst { body } = fn;\n\tif (!body) return undefined;\n\tif (body.type !== 'BlockStatement') return body;\n\tif (body.body.length !== 1) return undefined;\n\tconst [statement] = body.body;\n\treturn statement.type === 'ReturnStatement' ? statement.argument : undefined;\n}\n\nfunction isReusableFunction(fn: ESTree.Function | ESTree.ArrowFunctionExpression) {\n\tif (fn.type === 'FunctionDeclaration') return true;\n\tconst { parent } = fn;\n\tif (parent.type === 'VariableDeclarator') return parent.init === fn;\n\tif (parent.type === 'Property' || parent.type === 'PropertyDefinition') return parent.value === fn;\n\treturn parent.type === 'MethodDefinition' || parent.type === 'ExportDefaultDeclaration';\n}\n\nfunction bindingName(node: ESTree.Node) {\n\tconst { parent } = node;\n\tif (!parent) return undefined;\n\tif (parent.type === 'VariableDeclarator' && parent.init === node && parent.id.type === 'Identifier') {\n\t\treturn parent.id.name;\n\t}\n\tif (\n\t\t(parent.type === 'Property' || parent.type === 'PropertyDefinition') &&\n\t\tparent.value === node &&\n\t\t!parent.computed\n\t) {\n\t\tif (parent.key.type === 'Identifier') return parent.key.name;\n\t\treturn staticString(parent.key);\n\t}\n\treturn undefined;\n}\n\nconst noGenWrapper = defineRule({\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Disallow functions that only wrap and return `Effect.gen`',\n\t\t},\n\t\tmessages: {\n\t\t\tnoGenWrapper:\n\t\t\t\t'Avoid functions that only wrap and return `Effect.gen`. Use `Effect.fn(\"name\")(function* (...) {...})` or `Effect.fnUntraced` instead.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\tfunction check(fn: ESTree.Function | ESTree.ArrowFunctionExpression) {\n\t\t\tif (fn.generator || !isReusableFunction(fn)) return;\n\t\t\tif (isGenOrPipedGen(returnedExpression(fn))) context.report({ node: fn, messageId: 'noGenWrapper' });\n\t\t}\n\t\treturn {\n\t\t\tArrowFunctionExpression: check,\n\t\t\tFunctionDeclaration: check,\n\t\t\tFunctionExpression: check,\n\t\t};\n\t},\n});\n\nconst fnNameMatches = defineRule({\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Require the `Effect.fn` span name to match the binding it is assigned to',\n\t\t},\n\t\tfixable: 'code',\n\t\tmessages: {\n\t\t\tmismatch: '`Effect.fn(\"{{name}}\")` is assigned to `{{binding}}`. Use \"{{binding}}\" or \"<Service>.{{binding}}\".',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tif (!isNamedFnFactory(node.callee)) return;\n\t\t\t\tconst binding = bindingName(node);\n\t\t\t\tconst nameNode = node.callee.arguments[0];\n\t\t\t\tconst name = staticString(nameNode);\n\t\t\t\tif (!binding || name === undefined) return;\n\t\t\t\tif (name === binding || name.endsWith(`.${binding}`)) return;\n\t\t\t\tcontext.report({\n\t\t\t\t\tnode: nameNode,\n\t\t\t\t\tmessageId: 'mismatch',\n\t\t\t\t\tdata: { name, binding },\n\t\t\t\t\tfix(fixer) {\n\t\t\t\t\t\tconst quote = context.sourceCode.getText(nameNode).at(0) ?? \"'\";\n\t\t\t\t\t\tconst prefix = name.includes('.') ? name.slice(0, name.lastIndexOf('.') + 1) : '';\n\t\t\t\t\t\treturn fixer.replaceText(nameNode, `${quote}${prefix}${binding}${quote}`);\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst returnYieldError = defineRule({\n\tmeta: {\n\t\ttype: 'problem',\n\t\tdocs: {\n\t\t\tdescription: 'Require `return yield*` when yielding an error so TypeScript knows execution stops',\n\t\t},\n\t\tfixable: 'code',\n\t\tmessages: {\n\t\t\tmissingReturn: 'Use `return yield* ...` when raising an error so TypeScript knows the generator stops here.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tYieldExpression(node) {\n\t\t\t\tif (!node.delegate || !node.argument || node.parent.type !== 'ExpressionStatement') return;\n\t\t\t\tif (node.argument.type !== 'NewExpression' && !isEffectCall(node.argument, FAIL_METHODS)) return;\n\t\t\t\tcontext.report({\n\t\t\t\t\tnode,\n\t\t\t\t\tmessageId: 'missingReturn',\n\t\t\t\t\tfix: (fixer) => fixer.insertTextBefore(node, 'return '),\n\t\t\t\t});\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst noPipeOnFn = defineRule({\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Disallow `.pipe` on `Effect.fn` / `Effect.fnUntraced`; pass combinators as extra arguments',\n\t\t},\n\t\tmessages: {\n\t\t\tnoPipe:\n\t\t\t\t'Do not use `.pipe` with `Effect.fn`. Pass the combinators as extra arguments: `Effect.fn(\"name\")(function* () {...}, Effect.withSpan(...))`.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tMemberExpression(node) {\n\t\t\t\tif (node.computed || node.property.type !== 'Identifier' || node.property.name !== 'pipe') return;\n\t\t\t\tif (!isEffectFnCall(node.object)) return;\n\t\t\t\tcontext.report({ node: node.property, messageId: 'noPipe' });\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst noThrowInGen = defineRule({\n\tmeta: {\n\t\ttype: 'problem',\n\t\tdocs: {\n\t\t\tdescription: 'Disallow `throw` inside `Effect.gen` / `Effect.fn` generators',\n\t\t},\n\t\tmessages: {\n\t\t\tnoThrow:\n\t\t\t\t'Do not throw inside an Effect generator; a throw becomes a defect. Use `return yield* new SomeError(...)` instead.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\treturn {\n\t\t\tThrowStatement(node) {\n\t\t\t\tlet current: ESTree.Node = node.parent;\n\t\t\t\twhile (\n\t\t\t\t\tcurrent.type !== 'FunctionExpression' &&\n\t\t\t\t\tcurrent.type !== 'FunctionDeclaration' &&\n\t\t\t\t\tcurrent.type !== 'ArrowFunctionExpression' &&\n\t\t\t\t\tcurrent.type !== 'Program'\n\t\t\t\t) {\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t\tif (isEffectGeneratorBody(current)) context.report({ node, messageId: 'noThrow' });\n\t\t\t},\n\t\t};\n\t},\n});\n\nconst noRunOutsideEdge = defineRule({\n\tmeta: {\n\t\ttype: 'problem',\n\t\tdocs: {\n\t\t\tdescription: 'Restrict `Effect.run*` to entrypoints, tests and scripts',\n\t\t},\n\t\tschema: [\n\t\t\t{\n\t\t\t\ttype: 'object',\n\t\t\t\tadditionalProperties: false,\n\t\t\t\tproperties: {\n\t\t\t\t\tallow: {\n\t\t\t\t\t\ttype: 'array',\n\t\t\t\t\t\titems: { type: 'string', minLength: 1 },\n\t\t\t\t\t\tuniqueItems: true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tmessages: {\n\t\t\tnoRun:\n\t\t\t\t'`Effect.{{method}}` belongs at the edge (`NodeRuntime.runMain`, `ManagedRuntime`). Allowed files: {{allow}}.',\n\t\t},\n\t\tdefaultOptions: [{ allow: [...DEFAULT_EDGE_FILES] }],\n\t},\n\tcreateOnce(context) {\n\t\tlet allow = DEFAULT_EDGE_FILES;\n\t\treturn {\n\t\t\tbefore() {\n\t\t\t\tconst options = context.options[0] as { allow?: string[] } | undefined;\n\t\t\t\tallow = options?.allow ?? DEFAULT_EDGE_FILES;\n\t\t\t\treturn !matchesFileGlob(context, allow);\n\t\t\t},\n\t\t\tCallExpression(node) {\n\t\t\t\tif (!isEffectMember(node.callee, RUN_METHODS)) return;\n\t\t\t\tconst method = node.callee.property.type === 'Identifier' ? node.callee.property.name : '';\n\t\t\t\tcontext.report({ node, messageId: 'noRun', data: { method, allow: allow.join(', ') } });\n\t\t\t},\n\t\t};\n\t},\n});\n\nfunction isEffectModule(source: string) {\n\treturn source === 'effect' || source.startsWith('effect/') || source.startsWith('@effect/');\n}\n\nfunction isTypeOnly(\n\tkind: string | undefined,\n\tspecifiers: readonly { type: string; importKind?: string; exportKind?: string }[],\n) {\n\tif (kind === 'type') return true;\n\treturn (\n\t\tspecifiers.length > 0 &&\n\t\tspecifiers.every((specifier) => specifier.importKind === 'type' || specifier.exportKind === 'type')\n\t);\n}\n\nconst typesOnlyImports = defineRule({\n\tmeta: {\n\t\ttype: 'problem',\n\t\tdocs: {\n\t\t\tdescription: 'Allow only type imports from `effect`, `effect/*` and `@effect/*`',\n\t\t},\n\t\tmessages: {\n\t\t\tvalueImport:\n\t\t\t\t'`{{source}}` is a runtime import. This package must not ship the Effect runtime; use `import type` or inline `type` specifiers.',\n\t\t},\n\t},\n\tcreateOnce(context) {\n\t\tfunction check(node: ESTree.Node, source: ESTree.Node | null) {\n\t\t\tconst name = staticString(source ?? undefined);\n\t\t\tif (name !== undefined && isEffectModule(name)) {\n\t\t\t\tcontext.report({ node, messageId: 'valueImport', data: { source: name } });\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tImportDeclaration(node) {\n\t\t\t\tif (!isTypeOnly(node.importKind, node.specifiers)) check(node, node.source);\n\t\t\t},\n\t\t\tExportNamedDeclaration(node) {\n\t\t\t\tif (node.source && !isTypeOnly(node.exportKind, node.specifiers)) check(node, node.source);\n\t\t\t},\n\t\t\tExportAllDeclaration(node) {\n\t\t\t\tif (node.exportKind !== 'type') check(node, node.source);\n\t\t\t},\n\t\t\tImportExpression(node) {\n\t\t\t\tcheck(node, node.source);\n\t\t\t},\n\t\t};\n\t},\n});\n\nexport default definePlugin({\n\tmeta: {\n\t\tname: 'eslint-plugin-mahir-effect',\n\t},\n\trules: {\n\t\t'fn-name-matches': fnNameMatches,\n\t\t'no-gen-wrapper': noGenWrapper,\n\t\t'no-pipe-on-fn': noPipeOnFn,\n\t\t'no-run-outside-edge': noRunOutsideE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;EACnB,SAAS,MAAM,MAAmB,QAA4B;GAC7D,MAAM,OAAO,aAAa,UAAU,MAAS;GAC7C,IAAI,SAAS,UAAa,eAAe,IAAI,GAC5C,QAAQ,OAAO;IAAE;IAAM,WAAW;IAAe,MAAM,EAAE,QAAQ,KAAK;GAAE,CAAC;EAE3E;EACA,OAAO;GACN,kBAAkB,MAAM;IACvB,IAAI,CAAC,WAAW,KAAK,YAAY,KAAK,UAAU,GAAG,MAAM,MAAM,KAAK,MAAM;GAC3E;GACA,uBAAuB,MAAM;IAC5B,IAAI,KAAK,UAAU,CAAC,WAAW,KAAK,YAAY,KAAK,UAAU,GAAG,MAAM,MAAM,KAAK,MAAM;GAC1F;GACA,qBAAqB,MAAM;IAC1B,IAAI,KAAK,eAAe,QAAQ,MAAM,MAAM,KAAK,MAAM;GACxD;GACA,iBAAiB,MAAM;IACtB,MAAM,MAAM,KAAK,MAAM;GACxB;EACD;CACD;AACD,CAAC;AAED,qBAAe,aAAa;CAC3B,MAAM,EACL,MAAM,6BACP;CACA,OAAO;EACN,mBAAmB;EACnB,kBAAkB;EAClB,iBAAiB;EACjB,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,sBAAsB;CACvB;AACD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imranbarbhuiya/oxc-config",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Shared Oxlint and Oxfmt configs for JavaScript and TypeScript projects",
5
5
  "keywords": [
6
6
  "config",