From 2f5537cf7ece4a1808cc68c61eb47933bcdcf8fa Mon Sep 17 00:00:00 2001 From: ianshaloom Date: Sun, 8 Mar 2026 00:37:15 +0300 Subject: [PATCH] feat(lint): add ESLint configuration for admin and storefront applications - Introduced eslint.config.mjs files for both admin and storefront to extend Next.js linting rules. - Updated package.json files to replace the default Next.js lint command with a direct ESLint command for improved linting control. --- apps/admin/eslint.config.mjs | 12 ++++++++++++ apps/admin/package.json | 2 +- apps/storefront/eslint.config.mjs | 12 ++++++++++++ apps/storefront/package.json | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 apps/admin/eslint.config.mjs create mode 100644 apps/storefront/eslint.config.mjs diff --git a/apps/admin/eslint.config.mjs b/apps/admin/eslint.config.mjs new file mode 100644 index 0000000..32ea3f4 --- /dev/null +++ b/apps/admin/eslint.config.mjs @@ -0,0 +1,12 @@ +import { dirname } from "path"; +import { fileURLToPath } from "url"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const compat = new FlatCompat({ baseDirectory: __dirname }); + +const config = [ + ...compat.extends("next/core-web-vitals", "next/typescript"), + { ignores: [".next/**", "node_modules/**"] }, +]; +export default config; diff --git a/apps/admin/package.json b/apps/admin/package.json index 833af69..b5a790f 100644 --- a/apps/admin/package.json +++ b/apps/admin/package.json @@ -6,7 +6,7 @@ "dev": "next dev --port 3001", "build": "next build", "start": "next start", - "lint": "next lint", + "lint": "eslint .", "type-check": "tsc --noEmit" }, "dependencies": { diff --git a/apps/storefront/eslint.config.mjs b/apps/storefront/eslint.config.mjs new file mode 100644 index 0000000..32ea3f4 --- /dev/null +++ b/apps/storefront/eslint.config.mjs @@ -0,0 +1,12 @@ +import { dirname } from "path"; +import { fileURLToPath } from "url"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const compat = new FlatCompat({ baseDirectory: __dirname }); + +const config = [ + ...compat.extends("next/core-web-vitals", "next/typescript"), + { ignores: [".next/**", "node_modules/**"] }, +]; +export default config; diff --git a/apps/storefront/package.json b/apps/storefront/package.json index 3939f7c..25274ac 100644 --- a/apps/storefront/package.json +++ b/apps/storefront/package.json @@ -6,7 +6,7 @@ "dev": "next dev --port 3000", "build": "next build", "start": "next start", - "lint": "next lint", + "lint": "eslint .", "type-check": "tsc --noEmit" }, "dependencies": {