From 5fc8af532f3f1e0e8f0a52f7219965d8622740e8 Mon Sep 17 00:00:00 2001
From: KillWolfVlad <KillWolfVlad@users.noreply.github.com>
Date: Sun, 10 Jul 2022 18:47:17 +0500
Subject: [PATCH] feat: adopt pnp

---
 .eslintrc.js        |  25 +++++++
 .eslintrc.json      |   4 --
 .prettierrc.js      |   5 ++
 .prettierrc.yaml    |   2 -
 .yarnrc.yml         |   1 -
 package.json        |   2 +
 tsconfig.build.json |   2 +-
 tsconfig.json       |   2 +-
 yarn.lock           | 157 +++++++++++++++++++++++++++++++++++++++++++-
 9 files changed, 190 insertions(+), 10 deletions(-)
 create mode 100644 .eslintrc.js
 delete mode 100644 .eslintrc.json
 create mode 100644 .prettierrc.js
 delete mode 100644 .prettierrc.yaml
 delete mode 100644 .yarnrc.yml

diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000..94712eb
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2022 Byndyusoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+require("@rushstack/eslint-patch/modern-module-resolution");
+
+module.exports = {
+  root: true,
+  extends: [
+    "@byndyusoft/eslint-config/header-apache-2.0",
+    "@byndyusoft/eslint-config/backend",
+  ],
+};
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 1e0aca0..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "root": true,
-  "extends": ["@byndyusoft/eslint-config/header-apache-2.0", "@byndyusoft/eslint-config/backend"]
-}
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 0000000..c03fc6b
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,5 @@
+module.exports = {
+  trailingComma: "all",
+  endOfLine: "auto",
+  plugins: [require.resolve("prettier-plugin-packagejson")],
+};
diff --git a/.prettierrc.yaml b/.prettierrc.yaml
deleted file mode 100644
index b007244..0000000
--- a/.prettierrc.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-trailingComma: all
-endOfLine: auto
diff --git a/.yarnrc.yml b/.yarnrc.yml
deleted file mode 100644
index 3186f3f..0000000
--- a/.yarnrc.yml
+++ /dev/null
@@ -1 +0,0 @@
-nodeLinker: node-modules
diff --git a/package.json b/package.json
index 9214334..3958bb7 100644
--- a/package.json
+++ b/package.json
@@ -77,9 +77,11 @@
     "@byndyusoft/tsconfig": "^1.1.0",
     "@commitlint/cli": "^17.0.2",
     "@commitlint/config-conventional": "^17.0.2",
+    "@rushstack/eslint-patch": "^1.1.4",
     "@types/jest": "^28.1.0",
     "@types/node": "^18.0.3",
     "eslint": "^8.16.0",
+    "eslint-import-resolver-typescript": "^3.2.5",
     "husky": "^8.0.1",
     "jest": "^28.1.0",
     "jest-extended": "^2.0.0",
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 97c8b23..b5acf2c 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -1,4 +1,4 @@
 {
   "extends": "./tsconfig.json",
-  "exclude": ["./dist", "./node_modules", "./test", "**/__tests__", "**/*spec.ts"]
+  "exclude": ["./dist", "./test", "**/__tests__", "**/*spec.ts"]
 }
diff --git a/tsconfig.json b/tsconfig.json
index 428a539..83e6c94 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,6 +4,6 @@
     // Emit
     "outDir": "./dist"
   },
-  "exclude": ["./dist", "./node_modules"],
+  "exclude": ["./dist"],
   "include": ["./**/*.ts"]
 }
diff --git a/yarn.lock b/yarn.lock
index 1b2e2d4..3a24379 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -474,9 +474,11 @@ __metadata:
     "@byndyusoft/tsconfig": "npm:^1.1.0"
     "@commitlint/cli": "npm:^17.0.2"
     "@commitlint/config-conventional": "npm:^17.0.2"
+    "@rushstack/eslint-patch": "npm:^1.1.4"
     "@types/jest": "npm:^28.1.0"
     "@types/node": "npm:^18.0.3"
     eslint: "npm:^8.16.0"
+    eslint-import-resolver-typescript: "npm:^3.2.5"
     husky: "npm:^8.0.1"
     jest: "npm:^28.1.0"
     jest-extended: "npm:^2.0.0"
@@ -1430,6 +1432,27 @@ __metadata:
   languageName: node
   linkType: hard
 
+"@pkgr/utils@npm:^2.2.0":
+  version: 2.3.0
+  resolution: "@pkgr/utils@npm:2.3.0"
+  dependencies:
+    cross-spawn: "npm:^7.0.3"
+    is-glob: "npm:^4.0.3"
+    open: "npm:^8.4.0"
+    picocolors: "npm:^1.0.0"
+    tiny-glob: "npm:^0.2.9"
+    tslib: "npm:^2.4.0"
+  checksum: e9c078db485d0ed1aa9ed55b8075ac1d60bdfed05669b2073ef3f88d8acd9255c435abed8febaf89afe0667363ef61ff2014be0fdebcb2f7492d01b38e375fc6
+  languageName: node
+  linkType: hard
+
+"@rushstack/eslint-patch@npm:^1.1.4":
+  version: 1.1.4
+  resolution: "@rushstack/eslint-patch@npm:1.1.4"
+  checksum: aec1d4a5cb907c58be23160d59ffd7f6711ad6174f26f1aae964a732a4427aa5822bbc697b8610095c07b9caa3fbc86752d881520242b2eda457cc77668028f3
+  languageName: node
+  linkType: hard
+
 "@semantic-release/commit-analyzer@npm:^9.0.2":
   version: 9.0.2
   resolution: "@semantic-release/commit-analyzer@npm:9.0.2"
@@ -3094,6 +3117,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"define-lazy-prop@npm:^2.0.0":
+  version: 2.0.0
+  resolution: "define-lazy-prop@npm:2.0.0"
+  checksum: 53656037e7b33e52c0cb39d8348c92087b961711c89fa7df07e6c8cfe5039d17157ee8e22c00bbdd4d1038a114f2d38821fcef4668d4c87854635ec13e87b808
+  languageName: node
+  linkType: hard
+
 "define-properties@npm:^1.1.3, define-properties@npm:^1.1.4":
   version: 1.1.4
   resolution: "define-properties@npm:1.1.4"
@@ -3289,6 +3319,16 @@ __metadata:
   languageName: node
   linkType: hard
 
+"enhanced-resolve@npm:^5.10.0":
+  version: 5.10.0
+  resolution: "enhanced-resolve@npm:5.10.0"
+  dependencies:
+    graceful-fs: "npm:^4.2.4"
+    tapable: "npm:^2.2.0"
+  checksum: 97f2cb6318920931b84ea1209b220b7f0324581eef434f16c1df95d1997a4bbd80cceabd6be81465cf450060dee84b265d317ac23276369756b2d8a3ca68e9d6
+  languageName: node
+  linkType: hard
+
 "entities@npm:~2.1.0":
   version: 2.1.0
   resolution: "entities@npm:2.1.0"
@@ -3446,6 +3486,24 @@ __metadata:
   languageName: node
   linkType: hard
 
+"eslint-import-resolver-typescript@npm:^3.2.5":
+  version: 3.2.5
+  resolution: "eslint-import-resolver-typescript@npm:3.2.5"
+  dependencies:
+    debug: "npm:^4.3.4"
+    enhanced-resolve: "npm:^5.10.0"
+    get-tsconfig: "npm:@unts/get-tsconfig@^4.1.1"
+    globby: "npm:^13.1.2"
+    is-core-module: "npm:^2.9.0"
+    is-glob: "npm:^4.0.3"
+    synckit: "npm:^0.7.2"
+  peerDependencies:
+    eslint: "*"
+    eslint-plugin-import: "*"
+  checksum: 515dada8158d2bdc43a1b76e894941897eab3b1e684f40885908753e9ac29735fdf57c5bae8f44fcb673ab74e58e105e213072e1bfc652e0f2f53ace4f38a004
+  languageName: node
+  linkType: hard
+
 "eslint-module-utils@npm:^2.7.3":
   version: 2.7.3
   resolution: "eslint-module-utils@npm:2.7.3"
@@ -3932,7 +3990,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9":
+"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9":
   version: 3.2.11
   resolution: "fast-glob@npm:3.2.11"
   dependencies:
@@ -4243,6 +4301,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"get-tsconfig@npm:@unts/get-tsconfig@^4.1.1":
+  version: 4.1.1
+  resolution: "@unts/get-tsconfig@npm:4.1.1"
+  checksum: a2b750077da46d1fc3397c2d0b8a760fbed8054f7f4cbe0f0bd3654d3e82e61514c4808eacae1786ddd41a0a7ef8ca55a02827c245a99632020c4d9199fc0149
+  languageName: node
+  linkType: hard
+
 "git-hooks-list@npm:1.0.3":
   version: 1.0.3
   resolution: "git-hooks-list@npm:1.0.3"
@@ -4349,6 +4414,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"globalyzer@npm:0.1.0":
+  version: 0.1.0
+  resolution: "globalyzer@npm:0.1.0"
+  checksum: e52e064b89ef5a42ce76b92a4919e518c80615c80839f7d214f51c96ce5945308147a422a11c853760fc7a9a41cf8cc8fb7813c5816f2808d8fd4c066d0805a9
+  languageName: node
+  linkType: hard
+
 "globby@npm:10.0.0":
   version: 10.0.0
   resolution: "globby@npm:10.0.0"
@@ -4379,6 +4451,26 @@ __metadata:
   languageName: node
   linkType: hard
 
+"globby@npm:^13.1.2":
+  version: 13.1.2
+  resolution: "globby@npm:13.1.2"
+  dependencies:
+    dir-glob: "npm:^3.0.1"
+    fast-glob: "npm:^3.2.11"
+    ignore: "npm:^5.2.0"
+    merge2: "npm:^1.4.1"
+    slash: "npm:^4.0.0"
+  checksum: 9b418983d4b2dab9599cf9b2d1535c547d206e96796a699086e7a6b0e5d8ba63ee7653b1e3e3afa1747e1accf70fdc58fcb246dec282b3235a23a0b03fe14a7c
+  languageName: node
+  linkType: hard
+
+"globrex@npm:^0.1.2":
+  version: 0.1.2
+  resolution: "globrex@npm:0.1.2"
+  checksum: e1f161f0e15cdfc29df57c8d3d8380063e7f0f8ea0322ae5fbec9fe14ebc62fd337d65a2d80a479faade7c7ef079e062eb11586e43016d0b6b5989bd2e7b1d1b
+  languageName: node
+  linkType: hard
+
 "graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9":
   version: 4.2.10
   resolution: "graceful-fs@npm:4.2.10"
@@ -4822,6 +4914,15 @@ __metadata:
   languageName: node
   linkType: hard
 
+"is-docker@npm:^2.0.0, is-docker@npm:^2.1.1":
+  version: 2.2.1
+  resolution: "is-docker@npm:2.2.1"
+  bin:
+    is-docker: cli.js
+  checksum: 4a6decb5f39980f0be8169474b2f2db9f76f77dc83353cdf815e7790b51ed29775eb316e77a868b5c80c4587e8c98d533eef484c0b76f856c576282a8c52920f
+  languageName: node
+  linkType: hard
+
 "is-extglob@npm:^2.1.1":
   version: 2.1.1
   resolution: "is-extglob@npm:2.1.1"
@@ -5000,6 +5101,15 @@ __metadata:
   languageName: node
   linkType: hard
 
+"is-wsl@npm:^2.2.0":
+  version: 2.2.0
+  resolution: "is-wsl@npm:2.2.0"
+  dependencies:
+    is-docker: "npm:^2.0.0"
+  checksum: 44a5dd51a565631dc02905673e6fc1eded217f5039a20ded7ab17ced7352746937f08dac3f4eecafe5ac854528d6fef2378d8d2ffaab0e6d10109f6a36ed4986
+  languageName: node
+  linkType: hard
+
 "isarray@npm:~1.0.0":
   version: 1.0.0
   resolution: "isarray@npm:1.0.0"
@@ -7059,6 +7169,17 @@ __metadata:
   languageName: node
   linkType: hard
 
+"open@npm:^8.4.0":
+  version: 8.4.0
+  resolution: "open@npm:8.4.0"
+  dependencies:
+    define-lazy-prop: "npm:^2.0.0"
+    is-docker: "npm:^2.1.1"
+    is-wsl: "npm:^2.2.0"
+  checksum: 287db1bc10b3927b247d7c125d3ef998c410f57f434619a9d93f3e1384ff025ef12c18c1cfde1cb8f23f1326fb2bfe2634c789737bb65c18183015b5de81f594
+  languageName: node
+  linkType: hard
+
 "opener@npm:^1.5.2":
   version: 1.5.2
   resolution: "opener@npm:1.5.2"
@@ -8176,6 +8297,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"slash@npm:^4.0.0":
+  version: 4.0.0
+  resolution: "slash@npm:4.0.0"
+  checksum: 0327fcda20ceb59983f59b6016ecc1d8a0c750a66af0205cdb0d0b92b857586c847515d3098a7538816c61a145d3822aec5509b0fe5c9ccff14789e0603c8ea1
+  languageName: node
+  linkType: hard
+
 "slice-ansi@npm:^3.0.0":
   version: 3.0.0
   resolution: "slice-ansi@npm:3.0.0"
@@ -8603,6 +8731,23 @@ __metadata:
   languageName: node
   linkType: hard
 
+"synckit@npm:^0.7.2":
+  version: 0.7.2
+  resolution: "synckit@npm:0.7.2"
+  dependencies:
+    "@pkgr/utils": "npm:^2.2.0"
+    tslib: "npm:^2.4.0"
+  checksum: b8d223afd4abe61e9e7663652b049a34bf5b059208fd64d5f1a44dca9840e58239eae71b8675be3acb837cb8f1dd95b723814bf14c49e7f1dd4d0e9b64b1150c
+  languageName: node
+  linkType: hard
+
+"tapable@npm:^2.2.0":
+  version: 2.2.1
+  resolution: "tapable@npm:2.2.1"
+  checksum: d54320ef41e04b13e27e20bfc355bd27bccb4b1ac28123a35d36d903b393944a957a7629b56e808e1a2ef03dcaf1c114e97de7a1b7cbf16e522cd0630219702e
+  languageName: node
+  linkType: hard
+
 "tar@npm:^6.0.2, tar@npm:^6.1.0, tar@npm:^6.1.11, tar@npm:^6.1.2":
   version: 6.1.11
   resolution: "tar@npm:6.1.11"
@@ -8705,6 +8850,16 @@ __metadata:
   languageName: node
   linkType: hard
 
+"tiny-glob@npm:^0.2.9":
+  version: 0.2.9
+  resolution: "tiny-glob@npm:0.2.9"
+  dependencies:
+    globalyzer: "npm:0.1.0"
+    globrex: "npm:^0.1.2"
+  checksum: 41f9a38124164bda6a2149f951e046c555a508ce22cbad2d08b7d4066622faa6933feae503c647815342b9e461ffc93cf7e41b28e835030480b081e000b1caf7
+  languageName: node
+  linkType: hard
+
 "tiny-relative-date@npm:^1.3.0":
   version: 1.3.0
   resolution: "tiny-relative-date@npm:1.3.0"