{"_id":"eslint-plugin-pino","_rev":"4-8fdd21072698e52bbab1716b5820bce9","name":"eslint-plugin-pino","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"eslint-plugin-pino","version":"1.0.0","keywords":["eslint","eslintplugin","pino","logging","linter"],"author":"","license":"MIT","_id":"eslint-plugin-pino@1.0.0","maintainers":[{"name":"orzar","email":"or.zarchi@gmail.com"}],"dist":{"shasum":"9f31abdfa6a087e7f73d4e5626e9ef79cade08ef","tarball":"https://registry.npmjs.org/eslint-plugin-pino/-/eslint-plugin-pino-1.0.0.tgz","fileCount":6,"integrity":"sha512-TmGsDcREZojm8xFHPJJBXrBBOHhUa8ZgscCucl7tzo3PCsrxJOFxz/zCvT4ea2InAGZ9EJkNWqdOvmdzHIGOkA==","signatures":[{"sig":"MEUCIQDCli0NKgb1fd4F0mUS5uoDsA5NvkjRaSRK+3zPZDRVSQIgOcLM7DYPATGk2Zkw4qQFdPSdkY/a/eqN9iIDAWBq8fY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14253},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"177a8f07989e967da7b4540f19a33e1bc37e26a7","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"orzar","email":"or.zarchi@gmail.com"},"_npmVersion":"10.8.2","description":"ESLint plugin to enforce correct pino logger usage patterns","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","tsup":"^8.5.0","eslint":"^8.44.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/eslint":"^8.44.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"eslint":">=7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-pino_1.0.0_1758493684791_0.1368791130242475","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"eslint-plugin-pino","version":"1.0.1","keywords":["eslint","eslintplugin","pino","logging","linter"],"author":"","license":"MIT","_id":"eslint-plugin-pino@1.0.1","maintainers":[{"name":"orzar","email":"or.zarchi@gmail.com"}],"dist":{"shasum":"38b46c6c6b3b11314f8a0999962dce9a176d0a1a","tarball":"https://registry.npmjs.org/eslint-plugin-pino/-/eslint-plugin-pino-1.0.1.tgz","fileCount":6,"integrity":"sha512-gq2UDjsfn88OSSJolyX/q9IEFHkOXGYN2zP+juTT3cB7BvZQKpdbZ0qiEbYdoTf3zYT02+5kozQDGknRo9EwyQ==","signatures":[{"sig":"MEUCIQCYd9vpRkLrP1HQfaQxt+I0tG/G/LzsD0evhYbYi3VkcAIgS+7xiun56WHT1SZRpVIS9uxy91aNDEd/00D7nRUFNCc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14253},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"dc68679c82c88ff3082ae504b275523a00a5bc49","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"orzar","email":"or.zarchi@gmail.com"},"_npmVersion":"10.8.2","description":"ESLint plugin to enforce correct pino logger usage patterns","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","tsup":"^8.5.0","eslint":"^8.44.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/eslint":"^8.44.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"eslint":">=7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-pino_1.0.1_1758493973218_0.014966753074257433","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"eslint-plugin-pino","version":"1.0.2","keywords":["eslint","eslintplugin","pino","logging","linter"],"author":"","license":"MIT","_id":"eslint-plugin-pino@1.0.2","maintainers":[{"name":"orzar","email":"or.zarchi@gmail.com"}],"dist":{"shasum":"2dfb4ae65b68a9e6d393e0bca8372fb74e98e69d","tarball":"https://registry.npmjs.org/eslint-plugin-pino/-/eslint-plugin-pino-1.0.2.tgz","fileCount":6,"integrity":"sha512-UIDXI1UZ+Uzr/6bTXGkt/iPMmvrt4B9va4ItHg6nndYSkwjdfzh3x3yWH+tNlE0P+QKw23Fdiu4vH9owQ+S6gA==","signatures":[{"sig":"MEUCIQDbAGn7YzEbOjDMoqLaLAxRhGmwSBUfKbW3pk56ElPzyQIgaQKBZMy0JcNotDg/WZKsH1SR5BnUrSAvbsc3xBRL/MY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15051},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"20942c301953d8ecaf214c3c65ef1b63459dae27","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"orzar","email":"or.zarchi@gmail.com"},"_npmVersion":"10.8.2","description":"ESLint plugin to enforce correct pino logger usage patterns","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","tsup":"^8.5.0","eslint":"^8.44.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/eslint":"^8.44.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"eslint":">=7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-pino_1.0.2_1758495130034_0.5047727162771414","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"eslint-plugin-pino","version":"1.0.3","description":"ESLint plugin to enforce correct pino logger usage patterns","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"jest","build":"tsup src/index.ts --format cjs,esm --dts --clean","lint":"eslint src/**/*.ts","prepublishOnly":"npm run build"},"keywords":["eslint","eslintplugin","pino","logging","linter"],"author":"","license":"MIT","peerDependencies":{"eslint":">=7.0.0"},"devDependencies":{"@types/eslint":"^8.44.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.44.0","jest":"^29.5.0","ts-jest":"^29.1.0","tsup":"^8.5.0","typescript":"^5.0.0"},"engines":{"node":">=14.0.0"},"_id":"eslint-plugin-pino@1.0.3","gitHead":"9f8c9d88e8d4d5c2119673756e251c0d89fb82c2","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-LvwWY16RvYppg/c8UzcweGn1bX+oXc6stM4rLEA/e9+Hn0ZOJWBp6stPnD/CsBqKP7Scj1BbyypTPBrIlPXSXw==","shasum":"4f1ffab8c60e11386b659231a80d915fc9d38781","tarball":"https://registry.npmjs.org/eslint-plugin-pino/-/eslint-plugin-pino-1.0.3.tgz","fileCount":6,"unpackedSize":14365,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFr9vYvzqGt2TZDckowsUMblmla2QvCsFjKS5KUtcQ1lAiEA+iA7Pe9ACFHdeV0GNZcCJ/yFa1ENlmUuVvfwo2BEY+0="}]},"_npmUser":{"name":"orzar","email":"or.zarchi@gmail.com"},"directories":{},"maintainers":[{"name":"orzar","email":"or.zarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-pino_1.0.3_1758614227890_0.8624670333598281"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-21T22:28:04.790Z","modified":"2025-09-23T07:57:08.237Z","1.0.0":"2025-09-21T22:28:04.987Z","1.0.1":"2025-09-21T22:32:53.426Z","1.0.2":"2025-09-21T22:52:10.220Z","1.0.3":"2025-09-23T07:57:08.068Z"},"license":"MIT","keywords":["eslint","eslintplugin","pino","logging","linter"],"description":"ESLint plugin to enforce correct pino logger usage patterns","maintainers":[{"name":"orzar","email":"or.zarchi@gmail.com"}],"readme":"# eslint-plugin-pino\n\nESLint plugin to enforce correct pino logger usage patterns.\n\n## Installation\n\n```bash\nnpm install --save-dev eslint-plugin-pino\n```\n\n## Usage\n\nAdd `pino` to the plugins section of your `.eslintrc` configuration file:\n\n```json\n{\n  \"plugins\": [\"pino\"]\n}\n```\n\nThen configure the rules you want to use under the rules section:\n\n```json\n{\n  \"rules\": {\n    \"pino/correct-args-position\": \"error\"\n  }\n}\n```\n\n### Recommended Configuration\n\nYou can use the recommended configuration which includes the most important rules:\n\n```json\n{\n  \"extends\": [\"plugin:pino/recommended\"]\n}\n```\n\n## Rules\n\n### `correct-args-position`\n\nEnforces that pino logger methods have object arguments before the message string.\n\n#### ✅ Correct\n\n```javascript\nlogger.info({userId: 123}, 'User logged in');\nlogger.error({error: err, userId: 123}, 'Failed to process request');\nlogger.debug({data: result}, `Processing ${id} completed`);\n```\n\n#### ❌ Incorrect\n\n```javascript\nlogger.info('User logged in', {userId: 123});\nlogger.error('Failed to process request', {error: err, userId: 123});\nlogger.debug(`Processing ${id} completed`, {data: result});\n```\n\n#### Why?\n\nWhen using pino logger methods incorrectly (with the message before the object), the object arguments are treated as additional parameters and won't be included in the structured log output. This can result in lost context information that's crucial for debugging and monitoring.\n\nThe rule supports all pino logging methods:\n- `trace`\n- `debug` \n- `info`\n- `warn`\n- `error`\n- `fatal`\n- `child`\n- `log`\n\n#### Auto-fix\n\nThis rule provides automatic fixing. When you run ESLint with the `--fix` flag, it will automatically reorder the arguments to put objects first, then the message, then any other arguments.\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run tests\nnpm test\n\n# Build\nnpm run build\n\n# Lint\nnpm run lint\n```\n\n## License\n\nMIT","readmeFilename":"README.md"}