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

View File

@@ -15,5 +15,6 @@ github:
vscode:
extensions:
- dbaeumer.vscode-eslint@2.1.5:9Wg0Glx/TwD8ElFBg+FKcQ==
- dbaeumer.vscode-eslint@2.1.8:02aHhbJ0Q4aGdjHXlTdVKg==
- flowtype.flow-for-vscode@1.5.0:AwOT6wgHTF43loZQCAUMLA==
- stylelint.vscode-stylelint@0.85.0:GjHxVXEBqt1ud+yaj0V9KQ==

7
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"flowtype.flow-for-vscode",
"stylelint.vscode-stylelint"
]
}

View File

@@ -1,3 +1,6 @@
{
"javascript.validate.enable": false
"javascript.validate.enable": false,
"eslint.nodePath": ".yarn/sdks",
"stylelint.stylelintPath": ".yarn/sdks/stylelint/lib/index.js",
"flow.pathToFlow": "${workspaceFolder}/.yarn/sdks/flow-bin/cli.js"
}

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`);

20
.yarn/sdks/eslint/lib/api.js vendored Normal 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/lib/api.js
require(absPnpApiPath).setup();
}
}
// Defer to the real eslint/lib/api.js your application uses
module.exports = absRequire(`eslint/lib/api.js`);

6
.yarn/sdks/eslint/package.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "eslint",
"version": "7.7.0-pnpify",
"main": "./lib/api.js",
"type": "commonjs"
}

20
.yarn/sdks/flow-bin/cli.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 flow-bin/cli.js
require(absPnpApiPath).setup();
}
}
// Defer to the real flow-bin/cli.js your application uses
module.exports = absRequire(`flow-bin/cli.js`);

5
.yarn/sdks/flow-bin/package.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"name": "flow-bin",
"version": "0.131.0-pnpify",
"type": "commonjs"
}

5
.yarn/sdks/integrations.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
# This file is automatically generated by PnPify.
# Manual changes will be lost!
integrations:
- vscode

20
.yarn/sdks/stylelint/bin/stylelint.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 stylelint/bin/stylelint.js
require(absPnpApiPath).setup();
}
}
// Defer to the real stylelint/bin/stylelint.js your application uses
module.exports = absRequire(`stylelint/bin/stylelint.js`);

20
.yarn/sdks/stylelint/lib/index.js vendored Normal 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 stylelint/lib/index.js
require(absPnpApiPath).setup();
}
}
// Defer to the real stylelint/lib/index.js your application uses
module.exports = absRequire(`stylelint/lib/index.js`);

6
.yarn/sdks/stylelint/package.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "stylelint",
"version": "13.6.1-pnpify",
"main": "lib/index.js",
"type": "commonjs"
}