@taiga-ui/eslint-plugin-experience-next 0.419.0 → 0.421.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.esm.js +4 -1
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1597,6 +1597,7 @@ const rule$6 = createRule$9({
1597
1597
 
1598
1598
  const MESSAGE_ID$3 = 'no-deep-imports';
1599
1599
  const ERROR_MESSAGE$2 = 'Deep imports of Taiga UI packages are prohibited';
1600
+ const ASSET_EXTENSIONS = /\.(?:svg|png|jpe?g|webp|gif)(?:\?.*)?$/i;
1600
1601
  const DEFAULT_OPTIONS = {
1601
1602
  currentProject: '',
1602
1603
  deepImport: String.raw `(?<=^@taiga-ui/[\w-]+)(/.+)$`,
@@ -1608,6 +1609,7 @@ const createRule$8 = ESLintUtils.RuleCreator((name) => name);
1608
1609
  const rule$5 = createRule$8({
1609
1610
  create(context) {
1610
1611
  const { currentProject, deepImport, ignoreImports, importDeclaration, projectName, } = { ...DEFAULT_OPTIONS, ...context.options[0] };
1612
+ const isAssetImport = (source) => !!source && ASSET_EXTENSIONS.test(source);
1611
1613
  const isDeepImport = (source) => !!source && new RegExp(deepImport, 'g').test(source);
1612
1614
  const isSideEffectImport = (node) => node.specifiers.length === 0;
1613
1615
  const isInsideTheSameEntryPoint = (source) => {
@@ -1630,7 +1632,8 @@ const rule$5 = createRule$8({
1630
1632
  if (!importSource ||
1631
1633
  !isDeepImport(importSource) ||
1632
1634
  isInsideTheSameEntryPoint(importSource) ||
1633
- shouldIgnore(importSource)) {
1635
+ shouldIgnore(importSource) ||
1636
+ isAssetImport(importSource)) {
1634
1637
  return;
1635
1638
  }
1636
1639
  context.report({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/eslint-plugin-experience-next",
3
- "version": "0.419.0",
3
+ "version": "0.421.0",
4
4
  "description": "An ESLint plugin to enforce a consistent code styles across taiga-ui projects",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",