From a62702e2730ac60850337f5991d2bc092827322e Mon Sep 17 00:00:00 2001 From: "dev.daminik00" Date: Thu, 30 Oct 2025 03:20:17 +0100 Subject: [PATCH] feat: add ESLint rule to prevent SVG imports as components --- eslint.config.mjs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 7cabd1e..0429869 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -102,6 +102,19 @@ const eslintConfig = [ "no-multiple-empty-lines": ["error", { max: 2 }], "eol-last": "error", "no-trailing-spaces": "error", + + /* Запрет SVG импортов как компонентов */ + "no-restricted-imports": [ + "error", + { + patterns: [ + { + group: ["*.svg"], + message: "❌ SVG импорты как компоненты ломаются в production. Используйте inline SVG или next/image.", + }, + ], + }, + ], }, }, { ignores: [