/** * Oxlint JS Plugin Shim — eslint-plugin-maintainability * * Loads the built plugin from `/dist/` (per-package layout used by the * Turborepo build), patching module resolution so workspace `@interlace/*` * deps resolve to compiled JS instead of TS source symlinks. * * Usage in .oxlintrc.json: * "jsPlugins": ["./tools/oxlint-plugins/interlace-maintainability.cjs"] * * Prerequisites: * npx turbo run build --filter=eslint-plugin-maintainability * * Generated by scripts/generate-oxlint-shims.mjs. Do not edit by hand. */ const path = require('path'); const Module = require('module'); const packagesDir = path.join(__dirname, '../../packages'); const devkitDist = path.join(packagesDir, 'eslint-devkit/dist/src'); const originalResolve = Module._resolveFilename; Module._resolveFilename = function (request, parent, isMain, options) { if (request === '@interlace/eslint-devkit') { return path.join(devkitDist, 'index.js'); } if (request === '@interlace/eslint-devkit/resolver') { return path.join(devkitDist, 'resolver.js'); } return originalResolve.apply(this, arguments); }; module.exports = require( path.join(packagesDir, 'eslint-plugin-maintainability/dist/src/index.js'), );