🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@dannote/sloplint

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dannote/sloplint

AST-based multilingual AI slop linter — catches obvious comments, narrator comments, step comments, section dividers, empty catch blocks, and more across 8 languages

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
4
-60%
Maintainers
1
Weekly downloads
 
Created
Source

sloplint

AST-based multilingual linter that catches AI-generated code slop.

Powered by ast-grep via @ast-grep/napi — rules run on real syntax trees, not regex over text.

What it catches

Comment patterns (all 8 languages):

RuleExample
obvious-comment// Initialize the counter above let counter = 0
narrator-comment// This function handles the request
step-comment// Step 1: Validate input
section-divider// ============ or // --- Helpers ---
placeholder-comment// ... rest of the code or // omitted for brevity
apologetic-comment// quick hack or // good enough for now
ai-generated-comment// Replace this with your actual implementation

Code patterns (language-specific):

RuleLanguageExample
empty-error-handlerTS/JS/Java/Python/Rubycatch (e) {}, bare except:, empty rescue
silent-exceptionPythonexcept Exception: pass
log-in-error-handlerTS/JSconsole.log inside catch

Supported languages

TypeScript, JavaScript, Python, Go, Rust, C, C++, Java, Ruby

Usage

# scan a directory
npx @dannote/sloplint src/

# scan specific files
npx @dannote/sloplint main.ts utils.py server.go

# scan everything
npx @dannote/sloplint .

Exits with code 1 if any problems are found.

What it ignores

Comments that provide actual value are never flagged:

  • // Wire format: 4-byte LE header followed by varint-encoded payload
  • // SAFETY: pointer is guaranteed valid by the borrow checker invariant above
  • // Mutex ordering: always acquire lockA before lockB to prevent deadlocks
  • // TODO: optimize later

Tool directives are also skipped: eslint-disable, noqa, nolint, NOLINT, clippy::allow, @ts-ignore, etc.

Install

npm install -D @dannote/sloplint

Philosophy

From the PR that inspired this:

Explicit anti-slop editing pass. Removed comments that restate what code does, dead code, unused includes, near-duplicate functions. Comments that remain document wire format specs, non-obvious constraints, or algorithm provenance.

Good comments explain why. Slop comments explain what — and the code already does that.

Keywords

linter

FAQs

Package last updated on 04 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts