From d1e12cb67aa80fef04cbc7fdef0aa6219ff724e2 Mon Sep 17 00:00:00 2001 From: Dima Vyshniakov Date: Mon, 18 Dec 2023 11:12:52 +0100 Subject: [PATCH] improve eslint --- .eslintrc.cjs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 57d2693..fab5b3c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -143,5 +143,22 @@ module.exports = { ], }, }, + /* Disable `template` directory imports for all files */ + { + files: ['./src/**/*.*'], + rules: { + 'no-restricted-imports': [ + 'error', + { + patterns: [ + { + group: ['**/templates/**'], + message: 'Imports from templates directory are forbidden.', + }, + ], + }, + ], + }, + }, ], };