diff --git a/.eslintrc.json b/.eslintrc.json index 7d011e95b..aa7e1bad6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,5 +1,4 @@ { - "root": true, "env": { "es2022": true, "node": true @@ -48,7 +47,7 @@ "files": ["**/*.ts", "**/*.tsx"], "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint", "boundaries", "import"], - "extends": [], + "extends": ["plugin:import/recommended", "plugin:import/typescript"], "rules": { "@typescript-eslint/no-explicit-any": "error", "@typescript-eslint/no-unused-vars": [ @@ -85,27 +84,6 @@ ] } ], - "import/no-restricted-imports": [ - 2, - { - "paths": [ - { - "name": "apps/website/lib/apiClient", - "message": "Direct imports from apiClient are forbidden. Use services instead." - }, - { - "name": "apps/website/lib/dtos", - "message": "Direct imports from dtos in UI components are forbidden. Use ViewModels instead.", - "from": ["apps/website/app/**/*", "apps/website/components/**/*"] - }, - { - "name": "apps/website/lib/api", - "message": "Direct imports from api/* in UI components are forbidden. Use services instead.", - "from": ["apps/website/app/**/*", "apps/website/components/**/*"] - } - ] - } - ], "import/no-default-export": "error", "import/no-useless-path-segments": "error", "no-restricted-syntax": [ diff --git a/apps/website/package.json b/apps/website/package.json index 0b5be3cc6..b6df17c02 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -11,12 +11,12 @@ "clean": "rm -rf .next" }, "dependencies": { - "@faker-js/faker": "^9.2.0", "@core/identity": "file:../../core/identity", "@core/notifications": "file:../../core/notifications", "@core/racing": "file:../../core/racing", "@core/social": "file:../../core/social", "@core/testing-support": "file:../../core/testing-support", + "@faker-js/faker": "^9.2.0", "@vercel/kv": "^3.0.0", "electron": "39.2.7", "framer-motion": "^12.23.25", @@ -34,6 +34,7 @@ "autoprefixer": "^10.4.22", "eslint": "^8.57.0", "eslint-config-next": "15.5.7", + "eslint-plugin-import": "^2.32.0", "postcss": "^8.5.6", "tailwindcss": "^3.4.18", "typescript": "^5.6.0" diff --git a/package-lock.json b/package-lock.json index 798bea47f..c162ba4b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,6 +42,7 @@ "electron": "^39.2.7", "eslint": "^8.0.0", "eslint-plugin-boundaries": "^5.3.1", + "eslint-plugin-import": "^2.32.0", "glob": "^13.0.0", "husky": "^9.1.7", "jsdom": "^22.1.0", @@ -257,6 +258,7 @@ "autoprefixer": "^10.4.22", "eslint": "^8.57.0", "eslint-config-next": "15.5.7", + "eslint-plugin-import": "^2.32.0", "postcss": "^8.5.6", "tailwindcss": "^3.4.18", "typescript": "^5.6.0" diff --git a/package.json b/package.json index 081a9f1cc..508225e1a 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "electron": "^39.2.7", "eslint": "^8.0.0", "eslint-plugin-boundaries": "^5.3.1", + "eslint-plugin-import": "^2.32.0", "glob": "^13.0.0", "husky": "^9.1.7", "jsdom": "^22.1.0",