snort/.yarn/sdks/eslint/lib/unsupported-api.js

21 lines
607 B
JavaScript
Raw Normal View History

2023-09-25 10:59:02 +00:00
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
2023-11-20 19:16:47 +00:00
const relPnpApiPath = "../../../../.pnp.cjs";
2023-09-25 10:59:02 +00:00
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
2023-11-20 19:16:47 +00:00
// Setup the environment to be able to require eslint/use-at-your-own-risk
2023-09-25 10:59:02 +00:00
require(absPnpApiPath).setup();
}
}
2023-11-20 19:16:47 +00:00
// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);