fix: use context.filename instead of deprecated getFilename() for ESLint 10 compat#451
fix: use context.filename instead of deprecated getFilename() for ESLint 10 compat#451jacknus wants to merge 1 commit intots-safeql:mainfrom
Conversation
|
|
@jacknus is attempting to deploy a commit to the newbie012's projects Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR fixes an ESLint 10 compatibility crash by replacing the removed
Confidence Score: 5/5
Important Files Changed
|
📝 WalkthroughWalkthroughSingle-line change in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@jacknus why did you close this? Edit: oh sorry, just saw the new PR by @Newbie012 which achieves the same thing: |
Didn't have time to test it all the way through so I thought i might as well close it to avoid you guys spending time on something half finished ✌️ Edit - yeah then i saw @Newbie012 did something to fix this - so just waiting for an updated release to test it out :-) |
Summary
shouldLintFile()incheck-sql.utils.tscalledparams.getFilename(), which was deprecated in ESLint 8.40 and removed in ESLint 10params.filename(the property equivalent, available since ESLint 8.40)context.filenamecorrectly (e.g.check-sql.rule.ts:515-516)Test plan
TypeError: params.getFilename is not a functionFixes crash:
TypeError: Error while loading rule '@ts-safeql/check-sql': params.getFilename is not a function🤖 Generated with Claude Code
Summary by CodeRabbit