diff options
Diffstat (limited to '.yarn/sdks/eslint')
-rw-r--r-- | .yarn/sdks/eslint/lib/api.js | 20 | ||||
-rw-r--r-- | .yarn/sdks/eslint/package.json | 6 |
2 files changed, 26 insertions, 0 deletions
diff --git a/.yarn/sdks/eslint/lib/api.js b/.yarn/sdks/eslint/lib/api.js new file mode 100644 index 00000000..fc728d95 --- /dev/null +++ b/.yarn/sdks/eslint/lib/api.js | |||
@@ -0,0 +1,20 @@ | |||
1 | #!/usr/bin/env node | ||
2 | |||
3 | const {existsSync} = require(`fs`); | ||
4 | const {createRequire, createRequireFromPath} = require(`module`); | ||
5 | const {resolve} = require(`path`); | ||
6 | |||
7 | const relPnpApiPath = "../../../../.pnp.cjs"; | ||
8 | |||
9 | const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
10 | const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
11 | |||
12 | if (existsSync(absPnpApiPath)) { | ||
13 | if (!process.versions.pnp) { | ||
14 | // Setup the environment to be able to require eslint | ||
15 | require(absPnpApiPath).setup(); | ||
16 | } | ||
17 | } | ||
18 | |||
19 | // Defer to the real eslint your application uses | ||
20 | module.exports = absRequire(`eslint`); | ||
diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json new file mode 100644 index 00000000..c2abd332 --- /dev/null +++ b/.yarn/sdks/eslint/package.json | |||
@@ -0,0 +1,6 @@ | |||
1 | { | ||
2 | "name": "eslint", | ||
3 | "version": "8.23.0-sdk", | ||
4 | "main": "./lib/api.js", | ||
5 | "type": "commonjs" | ||
6 | } | ||