Last 12 weeks · 14 commits
5 of 6 standards met
Describe the bug can u add the url to the rules so the editor shows a clickable link? see repro below, the url is not part of the is included in your other plugins, e.g. but not in Reproduction see podman command System Info Used Package Manager npm Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. [x] The provided reproduction is a minimal reproducible of the bug. Contributions [ ] I am willing to submit a PR to fix this issue [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Describe the bug Description inspection is significantly slower in a large repository(about 200k LOC and 1500 files), likely because it synchronously executes Git commands for each inspected file. I know this is an ESLint plugin, but oxlint is compactible with it, so I used it anyway. All measurements below were made through Oxlint's JS plugin support. I have not benchmarked ESLint itself. Environment eslint-plugin-slop: 0.1.2 Oxlint: 1.80.0 The same Git inspection implementation is currently present on : Results Average of three warm runs on the same codebase: Suspected cause performs the following work for each source file: synchronously runs this for every file: then starts another synchronous Git process: avoids loading the same file twice, but its key contains , so a full lint still starts approximately one process per file. The baseline revision itself is not cached. Tested optimizations I tested two local modifications to the installed plugin: Diagnostics remained identical, and an untracked test file was still reported correctly. Suggested fix Cache the baseline revision and changed-file set, then avoid loading baseline content for unchanged files. Cache invalidation should account for HEAD and working-tree changes in long-running ESLint or editor processes. Reproduction https://github.com/rrbe/eslint-plugin-slop-oxlint-perf-repro System Info Used Package Manager pnpm Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. [x] The provided reproduction is a minimal reproducible of the bug. Contributions [x] I am willing to submit a PR to fix this issue [x] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Adds a rule that flags classes used purely as namespaces — a pattern AI assistants produce often when grouping utility functions. Reports a class declaration or class expression whose members are all . Such a class carries no instance state and no polymorphism; standalone functions (plus module-level state when needed) express the same thing with less ceremony. An empty parameterless constructor is ignored as boilerplate, but a constructor with parameters — including TypeScript parameter properties — keeps the class allowed. Classes also stay allowed when they play a real type or framework role: a superclass () or interface () decorators on the class or any member an or modifier a static block, which runs at class definition time any instance member No autofix: extracting members to module scope rewrites every call site and needs author judgment. The rule honours the existing git-diff inspection modes and is enabled by . Rule docs added under , with a row in the README rules table. This PR was created with the help of an agent.
Repository: antfu/eslint-plugin-slop. Description: ESLint rules for guarding AI slops in code. Stars: 107, Forks: 5. Primary language: TypeScript. Languages: TypeScript (99.5%), JavaScript (0.5%). License: MIT. Topics: anti-slop, eslint-plugin. Latest release: v0.1.3 (2w ago). Open PRs: 1, open issues: 2. Last activity: 2w ago. Community health: 85%. Top contributors: antfu, antfubot, zcf0508.