From 4bfc998006bbede07741689b428c5f0551c6138c Mon Sep 17 00:00:00 2001 From: Harsh Patel Date: Mon, 1 Jan 2024 11:06:49 +0530 Subject: [PATCH 1/3] chore(lint): overwrite default eslint rules --- .eslintrc.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 1d8a8b24..9f9ac4be 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -26,7 +26,9 @@ "extends": ["plugin:@nx/typescript"], "rules": { "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-module-boundary-types": "off" + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-unused-vars": "warn", + "@typescript-eslint/no-unused-expressions": "warn" } }, { From 97017834959fc908efc94c1b52310d090513c077 Mon Sep 17 00:00:00 2001 From: Harsh Patel Date: Tue, 9 Jan 2024 21:36:49 +0530 Subject: [PATCH 2/3] build(lint): update config to check dependencies * working locally --- .eslintrc.json | 14 ++++++++++++++ apps/api-e2e/project.json | 11 +++++++++-- apps/api/project.json | 11 +++++++++-- apps/cli/project.json | 11 +++++++++-- apps/web/project.json | 11 +++++++++-- packages/sdk-node/project.json | 11 +++++++++-- 6 files changed, 59 insertions(+), 10 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9f9ac4be..f3f431e9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -42,6 +42,20 @@ "jest": true }, "rules": {} + }, + { + "files": ["{package,project}.json"], + "parser": "jsonc-eslint-parser", + "rules": { + "@nx/dependency-checks": [ + "warn", + { + "checkMissingDependencies": true, + "checkObsoleteDependencies": true, + "checkVersionMismatches": true + } + ] + } } ] } diff --git a/apps/api-e2e/project.json b/apps/api-e2e/project.json index b3ac0470..062eec11 100644 --- a/apps/api-e2e/project.json +++ b/apps/api-e2e/project.json @@ -13,8 +13,15 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": [ + "apps/api-e2e/**/*.ts", + "apps/api-e2e/package.json", + "apps/api-e2e/project.json" + ] + } } } } diff --git a/apps/api/project.json b/apps/api/project.json index 3a3b524d..ac19b83e 100644 --- a/apps/api/project.json +++ b/apps/api/project.json @@ -38,8 +38,15 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": [ + "apps/api/**/*.ts", + "apps/api/package.json", + "apps/api/project.json" + ] + } }, "prettier:fix": { "command": "pnpx prettier -w .", diff --git a/apps/cli/project.json b/apps/cli/project.json index 403573cf..6b4369f0 100644 --- a/apps/cli/project.json +++ b/apps/cli/project.json @@ -15,8 +15,15 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": [ + "apps/cli/**/*.ts", + "apps/cli/package.json", + "apps/cli/project.json" + ] + } }, "test": { "executor": "@nx/jest:jest", diff --git a/apps/web/project.json b/apps/web/project.json index 1319f712..87cef463 100644 --- a/apps/web/project.json +++ b/apps/web/project.json @@ -45,8 +45,15 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": [ + "apps/web/**/*.ts", + "apps/web/package.json", + "apps/web/project.json" + ] + } } }, "tags": [] diff --git a/packages/sdk-node/project.json b/packages/sdk-node/project.json index 2097c01b..1a787f4c 100644 --- a/packages/sdk-node/project.json +++ b/packages/sdk-node/project.json @@ -15,8 +15,15 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": [ + "packages/sdk-node/**/*.ts", + "packages/sdk-node/package.json", + "packages/sdk-node/project.json" + ] + } }, "test": { "executor": "@nx/jest:jest", From 14cd7ad6d3145d8f04a1c5dd75f97422ca515bb3 Mon Sep 17 00:00:00 2001 From: Harsh Patel Date: Sun, 14 Jan 2024 11:44:31 +0530 Subject: [PATCH 3/3] chore: remove unwanted package.json --- apps/cli/package.json | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 apps/cli/package.json diff --git a/apps/cli/package.json b/apps/cli/package.json deleted file mode 100644 index 6ce85a0f..00000000 --- a/apps/cli/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "cli", - "version": "0.0.1", - "dependencies": { - "tslib": "^2.3.0" - }, - "type": "commonjs", - "main": "./src/index.js", - "typings": "./src/index.d.ts" -}