build: make vscode work with PnP (#2444)

* Make vscode work with PnP

* Add vscode extension recommendations

* Add newlines to the end of generated manifests
This commit is contained in:
ylemkimon
2020-08-31 17:38:48 +09:00
committed by GitHub
parent 010b267dd6
commit ca00e01434
12 changed files with 135 additions and 2 deletions

20
.yarn/sdks/eslint/bin/eslint.js vendored Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.js";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}
// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);