From 4cdc374bd5bc481833090ab7e3a92f3f1c89e56a Mon Sep 17 00:00:00 2001 From: SaydAliUsmanov Date: Thu, 8 Dec 2022 23:19:03 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=BE=20=D0=B2=20esLint?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=BD=D0=B0=20=D0=B0=D0=B1=D1=81=D0=BE=D0=BB?= =?UTF-8?q?=D1=8E=D1=82=D1=8B=D0=B9=20=D0=B8=D0=BC=D0=BF=D0=BE=D1=80=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index f7e20a8..e1a2bc4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,6 +8,14 @@ module.exports = { }, }, rules: { + // опция для проверки на абсолютный импорт + // выкидывает ошибку если испорт начинается с '../' + 'no-restricted-imports': [ + 'error', + { + patterns: ['../*'], + }, + ], // 'no-unused-vars': 'off', // делаем error, чтобы зачищать консоли, если где-то консоль важна, From b6cdefea93ffd34051e07e17c5408c06e762792a Mon Sep 17 00:00:00 2001 From: SaydAliUsmanov Date: Thu, 8 Dec 2022 23:58:10 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=BE=20=D0=B0=D0=B1?= =?UTF-8?q?=D1=81=D0=BE=D0=BB=D1=8E=D1=82=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B8?= =?UTF-8?q?=D0=BC=D0=BF=D0=BE=D1=80=D1=82=D0=B0=20=D1=81=20../=20=D0=BD?= =?UTF-8?q?=D0=B0=20../../?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index e1a2bc4..e402d92 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,7 +13,7 @@ module.exports = { 'no-restricted-imports': [ 'error', { - patterns: ['../*'], + patterns: ['../../*'], }, ], // 'no-unused-vars': 'off',