diff --git a/package-lock.json b/package-lock.json index 1a15e30..866e192 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,6 +55,7 @@ "dotenv": "^16.4.5", "eslint": "~8.57.0", "eslint-config-prettier": "^9.0.0", + "eslint-plugin-eslint-plugin": "^6.2.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-max-params-no-constructor": "^0.0.4", "eslint-plugin-simple-import-sort": "^12.0.0", @@ -3549,6 +3550,10 @@ "stream-wormhole": "^1.1.0" } }, + "node_modules/@getlarge/eslint-plugin-nestjs-tools": { + "resolved": "packages/eslint-plugin", + "link": true + }, "node_modules/@getlarge/nestjs-tools-amqp-transport": { "resolved": "packages/amqp-transport", "link": true @@ -3561,10 +3566,6 @@ "resolved": "packages/cluster", "link": true }, - "node_modules/@getlarge/nestjs-tools-eslint-rules": { - "resolved": "packages/eslint-rules", - "link": true - }, "node_modules/@getlarge/nestjs-tools-fastify-upload": { "resolved": "packages/fastify-upload", "link": true @@ -9370,6 +9371,23 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-plugin-eslint-plugin": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-6.2.0.tgz", + "integrity": "sha512-+SSHlThUMBb6MhXl/CqNhKvnUY3111s/1vEcu+paOwTJzniTanRZCfl0kQXNfK57XsWJ5aRsiwMlPg/FgnYsag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "estraverse": "^5.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.23.0" + } + }, "node_modules/eslint-plugin-import": { "version": "2.29.1", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", @@ -17279,9 +17297,19 @@ "tslib": "^2.3.0" } }, + "packages/eslint-plugin": { + "name": "@getlarge/eslint-plugin-nestjs-tools", + "version": "0.1.1", + "license": "Apache-2.0", + "dependencies": { + "@typescript-eslint/utils": "8.5.0", + "tslib": "^2.3.0" + } + }, "packages/eslint-rules": { "name": "@getlarge/nestjs-tools-eslint-rules", "version": "0.0.0", + "extraneous": true, "license": "Apache-2.0" }, "packages/fastify-upload": { @@ -17301,7 +17329,7 @@ }, "packages/file-storage": { "name": "@getlarge/nestjs-tools-file-storage", - "version": "1.4.0", + "version": "1.4.1", "license": "Apache-2.0", "dependencies": { "tslib": "^2.3.0" diff --git a/package.json b/package.json index db9c58e..29e977e 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "dotenv": "^16.4.5", "eslint": "~8.57.0", "eslint-config-prettier": "^9.0.0", + "eslint-plugin-eslint-plugin": "^6.2.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-max-params-no-constructor": "^0.0.4", "eslint-plugin-simple-import-sort": "^12.0.0", diff --git a/packages/eslint-plugin/.eslintrc.json b/packages/eslint-plugin/.eslintrc.json index 69704e6..6aad6a5 100644 --- a/packages/eslint-plugin/.eslintrc.json +++ b/packages/eslint-plugin/.eslintrc.json @@ -1,10 +1,12 @@ { - "extends": ["../../.eslintrc.json"], + "extends": ["../../.eslintrc.json", "plugin:eslint-plugin/recommended"], "ignorePatterns": ["!**/*"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} + "rules": { + "eslint-plugin/require-meta-docs-description": "error" + } }, { "files": ["*.ts", "*.tsx"], diff --git a/packages/eslint-plugin/src/lib/return-class-instance.ts b/packages/eslint-plugin/src/lib/return-class-instance.ts index ac03c78..08c3741 100644 --- a/packages/eslint-plugin/src/lib/return-class-instance.ts +++ b/packages/eslint-plugin/src/lib/return-class-instance.ts @@ -31,7 +31,7 @@ export const rule = ESLintUtils.RuleCreator(() => __filename)({ meta: { type: 'problem', docs: { - description: 'Ensure service methods return class instances', + description: 'enforce service methods return class instances', }, schema: [], messages: {