VSCode pnpify (#66)

This commit is contained in:
Jaco Greeff
2020-03-14 15:29:40 +01:00
committed by GitHub
parent 76a436f22c
commit 61ffef08e3
5 changed files with 51 additions and 0 deletions

View File

@@ -1,3 +1,6 @@
.github/**
.vscode/**
.yarn/**
**/binaryen/*
**/build/*
**/coverage/*

15
.vscode/pnpify/eslint/bin/eslint.js vendored Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env node
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.js";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
// 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`);

15
.vscode/pnpify/eslint/lib/api.js vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env node
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.js";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
// 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
.vscode/pnpify/eslint/package.json vendored Normal file
View File

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

12
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"editor.tabSize": 2,
"files.eol": "\n",
"npm.packageManager": "yarn",
"eslint.enable": true,
"eslint.validate": [
"javascript",
"typescript",
"typescriptreact"
],
"eslint.nodePath": ".vscode/pnpify"
}