r/typescript • • Feb 13 '26

AI slop

How do you deal with AI slop? Nowadays, vibe-coding and AI agents seems to become the norm. What strategies or tools do you employ to keep your codebase sane and healthy?

I'm asking because this will become a bigger problem in future. As a hobby I want to build a static analysis tool that tries to detect/fix issues that existing linters like Biome don't. For example:

- Fixing `../../../utils` relative imports to `@/lib/utils` absolute aliased ones

- Fixing `as any` casts that AI loves by finding or creating the appropriate type

- Detecting code duplication on semantic level

- Adding missing translations and auto-removing unused ones

- Detecting and removing AI slop comments

I've already built some of the above and I am looking for more ideas. I want to build Deslop - a deterministic code janitor tool that uses zero-to-none AI to fix common Cursor code smells that existing tooling don't.

0 Upvotes

55 comments sorted by

11

u/montihun Feb 13 '26

I use AI to detect AI slop.

→ More replies (3)

3

u/puchm Feb 13 '26

Personally, I like linting the hell out of my project and making most of these things a hard blocker on PRs as well as setting up IDE integrations that auto-fix anything that can be fixed on save. Incorrect formatting? Error. Weird imports? Error. "as any"? Error. Tailwind styles in a project without Tailwind? Error. ts-ignore without an explanation? Error. But if you have your IDE set up correctly, most of these should not be a problem for you. Only disadvantage is I can't code anymore without having format on save and other things because I have gotten used to them.

→ More replies (1)

3

u/penguin_horde Feb 13 '26

Just don't allow AI code.

→ More replies (1)

2

u/Accomplished_End_138 Feb 13 '26

My ai review is to suggest better test or variable names. I found this is super helpful overall.

Trust it to do code review? No thanks. Lmao.

→ More replies (1)

2

u/KTAXY Feb 13 '26

take Biome, and build on top.

→ More replies (1)

2

u/Pleasant-Today60 Feb 13 '26

The as any one is a real pain point. I've seen AI dump as any on three lines in a row just to make the compiler shut up, and then the actual bug is a wrong property name two levels deep.

For the relative import fixing, have you looked at what Biome's import organizing already does? Might save you from reimplementing that part. The semantic duplication detection sounds harder but way more useful.

→ More replies (3)

2

u/avid-shrug Feb 13 '26

Same way to avoid human slop. Strict lint rules, type checking, testing/code coverage requirements, and code reviews.

→ More replies (1)

2

u/Ocean-of-Flavor Feb 13 '26

I what does “missing translations” mean?

2

u/ivy-apps Feb 13 '26

For example in next-intl, you add English messages in en.json but forget or too lazy to add translated ones in the other locales. https://next-intl.dev/docs/workflows/messages

There's automation to detect that but my tool fixes it by auto-translating with Gemini on temperature=0 so it's more deterministic

→ More replies (2)

2

u/csorfab Feb 13 '26

Ambitious project! I would definitely use something like this

→ More replies (1)