New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-payfit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-payfit - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

9

lib/rules/no-mongo-objectid.js

@@ -61,7 +61,6 @@ /**

fix: (fixer) => {
const sourceCode = context.getSourceCode()
const fixedText = sourceCode
.getText(node)
.split(':')
.join(': new')
const text = context.getSourceCode().getText(node)
const fixedText = text
.split(': ObjectId')
.join(': new ObjectId')
return fixer.replaceText(node, fixedText)

@@ -68,0 +67,0 @@ },

{
"name": "eslint-plugin-payfit",
"version": "1.0.1",
"version": "1.0.2",
"description": "eslint-payfit-plugin",

@@ -5,0 +5,0 @@ "keywords": [

@@ -34,3 +34,3 @@ /**

{
code: 'var invalid = { id: ObjectId() }',
code: 'var invalid = { id: ObjectId(), createdAt: Date(), companyId: ObjectId() }',
errors: [

@@ -41,6 +41,10 @@ {

},
{
message: 'Mongo ObjectId must be used with "new" keyword.',
type: 'VariableDeclarator',
},
],
output: 'var invalid = { id: new ObjectId() }',
output: 'var invalid = { id: new ObjectId(), createdAt: Date(), companyId: new ObjectId() }',
},
],
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc