Browse Source

Fixes #4670 - Mobile - Limit tsconfig search by moving package.json

Vladimir Sheremet 1 year ago
parent
commit
3a15818ea9
4 changed files with 13 additions and 26 deletions
  1. 1 20
      .eslintrc.js
  2. 9 0
      app/frontend/package.json
  3. 3 0
      app/frontend/tsconfig.json
  4. 0 6
      package.json

+ 1 - 20
.eslintrc.js

@@ -53,26 +53,7 @@ module.exports = {
 
     'no-restricted-imports': 'off',
 
-    // Disable the following rule, because it's not relevant for the tool chain and test envoirment.
-    'import/no-extraneous-dependencies': [
-      'error',
-      {
-        devDependencies: [
-          'histoire.config.ts',
-          'tailwind.config.js',
-          'vite.config.*',
-          'app/frontend/build/**',
-          'app/frontend/**/*.spec.*',
-          'app/frontend/**/__tests__/**/*',
-          'app/frontend/tests/**/*',
-          'app/frontend/**/*.stories.ts',
-          'app/frontend/**/*.story.vue',
-          'app/frontend/**/*.story.vue',
-          'app/frontend/stories/**/*.ts',
-          'app/frontend/cypress/**/*',
-        ],
-      },
-    ],
+    'import/no-extraneous-dependencies': 'off',
 
     'import/extensions': ['error', 'ignorePackages'],
 

+ 9 - 0
app/frontend/package.json

@@ -0,0 +1,9 @@
+{
+  "private": true,
+  "imports": {
+    "#tests/*": "./tests/*",
+    "#shared/*": "./shared/*",
+    "#mobile/*": "./apps/mobile/*",
+    "#cy/*": "../../.cypress/*"
+  }
+}

+ 3 - 0
app/frontend/tsconfig.json

@@ -0,0 +1,3 @@
+{
+  "extends": "../../tsconfig.json"
+}

+ 0 - 6
package.json

@@ -21,12 +21,6 @@
   "engines": {
     "node": ">=16"
   },
-  "imports": {
-    "#tests/*": "./app/frontend/tests/*",
-    "#shared/*": "./app/frontend/shared/*",
-    "#mobile/*": "./app/frontend/apps/mobile/*",
-    "#cy/*": ".cypress/*"
-  },
   "packageManager": "yarn@1.22.19",
   "devDependencies": {
     "@graphql-codegen/cli": "^4.0.1",