Browse Source

Maintenance: Mobile - Don't allow importing files in "shared" from other apps

Vladimir Sheremet 1 year ago
parent
commit
b2b4d5b70d
1 changed files with 11 additions and 0 deletions
  1. 11 0
      .eslintrc.js

+ 11 - 0
.eslintrc.js

@@ -75,6 +75,17 @@ module.exports = {
     'import/extensions': ['error', 'ignorePackages'],
 
     'import/prefer-default-export': 'off',
+    'import/no-restricted-paths': [
+      'error',
+      {
+        zones: [
+          {
+            target: './app/frontend/shared',
+            from: './app/frontend/apps',
+          },
+        ],
+      },
+    ],
 
     // TODO: Add import rule to not allow that "app/**/modules/**" can import from each other and also add a rule that apps/** can not import from other apps.