feat: add ESLint rule to prevent SVG imports as components
This commit is contained in:
parent
676607d4f6
commit
a62702e273
@ -102,6 +102,19 @@ const eslintConfig = [
|
|||||||
"no-multiple-empty-lines": ["error", { max: 2 }],
|
"no-multiple-empty-lines": ["error", { max: 2 }],
|
||||||
"eol-last": "error",
|
"eol-last": "error",
|
||||||
"no-trailing-spaces": "error",
|
"no-trailing-spaces": "error",
|
||||||
|
|
||||||
|
/* Запрет SVG импортов как компонентов */
|
||||||
|
"no-restricted-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
group: ["*.svg"],
|
||||||
|
message: "❌ SVG импорты как компоненты ломаются в production. Используйте inline SVG или next/image.",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
ignores: [
|
ignores: [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user