642 questions
2 votes
1 answer
100 views
How can I make my Node.js backend code cleaner without using an ORM when working directly with SQL?
I'm building a Node.js backend using plain SQL (no ORM, just mysql2 wrapped in a small helper). However, as my project grows, my route handlers start looking messy — full of raw SQL strings embedded ...
0 votes
0 answers
35 views
Using `npx knip` to find all unused .svg imports in JS/TS project?
I have a React Native project where I import a lot of .svg files into my components. How can I use npx knip to find all unused svg files, just like it has found all unused .js/tsx files? This is my ...
0 votes
0 answers
41 views
Angular Global Same Logic Functions Refactoring
I am trying to atleast clean the component.ts using services or somthing in my angular i have many repetitive code that i trying to fix and refactor. I am trying to apply DRY as possible can i have a ...
0 votes
1 answer
31 views
Why is resharper cleanup code adding a "plus" sign in app.config
When I run ReSharper cleanup code on a project, it adds a plus (+) sign. Is this a feature, or how do I disable it? <?xml ver.......> + <!-- ... ... -->
0 votes
0 answers
41 views
How to structure a form with reusable components while maintaining proper validation management?
Description: I'm working on a Vue/Nuxt project where we typically create a single component that handles all inputs, their state, validation, and submission to the API. While this approach works, it ...
0 votes
0 answers
37 views
How to run async operation and wait before node process ends?
I am building a simple apm. I batch events and store them in db batched. I also want to store anything left in the batch once the process ends/killed/error This is my code export function startApm(): ...
1 vote
0 answers
33 views
Cleaning up code with function or extension
I have texts and text fields with the same modifiers. Instead of copying and pasting them every time, is there a way to clean them up so they're called like functions or extensions? Is there a way to ...
1 vote
0 answers
237 views
JetBrains Rider removing space between delegate keyword and parenthesis
On my team, some of us use Rider, others use Visual Studio 2022. When they run code cleanup, VS 2022 adds a space between delegate and () as seen here: var cat = this.ExecuteAFunction("Function ...
0 votes
1 answer
763 views
Visual Studio Code Cleanup: How to avoid removing unassgiend/unused variable when file is on save
I am using Code Cleanup in Visual Studio and noticed when file is on save. The unused variable will be removed like: I tried editing the .editorConfig file but it didn't seem to work with any of the ...
0 votes
0 answers
73 views
Getting "MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it." after I stop play mode
I'm still learning Unity. I have quite a few objects and scripts in the scene and they interact with each other. I'm getting "MissingReferenceException: The object of type 'GameObject' has been ...
-2 votes
1 answer
345 views
Run cleanup function in Python when Jenkins job is aborted
I wrote a script in Python that is running for some time and performing a clean up as soon as it terminates regularly like: import time def cleanUp(): #delete some temporary files and so on ...
2 votes
2 answers
4k views
React-query infiniteQuery - how to fix additional pageParam type checking
i have bumped into following issue, i'm trying to implement infiniteQuery by using react-query tanstack, but i can't do it without additional checking of pageParam on it's type of number. Could you ...
2 votes
2 answers
942 views
C# - VS2022: "global using" and code cleanup on save
In VS2022 I turned on the very useful feature "Run Code Cleanup profile on Save". With this option on, every unneeded using statement in code gets removed automatically on save. Now I would ...
0 votes
0 answers
1k views
How to use Playwright locators to replace evaluateAll and querySelector?
I'm trying to get data from a webpage using Playwright in TypeScript. I have a section of code where I want to extract information from multiple elements matching a certain locator. However, I'm ...
4 votes
0 answers
302 views
In c# code cleanup, How to stop visual studio 2022 adding comments /* Unmerged change from project 'xxxx (net6.0)'
Environment: Visual studio 2022, v17.8.3 with net8 support I did cleanup to c# solution with 6 projects using profile2 . I found that vs 2022 during code cleanup using profile2 add these like ...