Registry / testing / eslint-plugin-smells

eslint-plugin-smells

JSON →
library1.0.1jsnpmunverified

eslint-plugin-smells is an ESLint plugin that provides rules to detect code smells in JavaScript. Version 1.0.1 is the latest release. The plugin includes rules such as no-switch, no-complex-switch-case, no-setinterval, no-this-assign, no-complex-string-concat, and no-complex-chaining. It helps enforce cleaner coding practices by flagging common anti-patterns. The project is maintained but has not seen recent updates. It requires ESLint as a peer dependency and is used as an ESLint plugin via the plugins configuration.

testing
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

The plugin is typically configured in .eslintrc without explicit import; direct import is rarely needed. Use require for CommonJS or import for ESM if you must access rules programmatically.

import { rules } from 'eslint-plugin-smells'

Rule names use the 'smells/' prefix. Set severity as 0, 1, or 2, not boolean.

// In .eslintrc: "rules": { "smells/no-switch": 1 }

Rules are not exported as named symbols; they are accessed via plugin namespace.

// In .eslintrc: "rules": { "smells/no-this-assign": 2 }

Minimal ESLint configuration to enable all code smell rules from eslint-plugin-smells.

{ "plugins": ["smells"], "rules": { "smells/no-switch": 1, "smells/no-complex-switch-case": 1, "smells/no-setinterval": 1, "smells/no-this-assign": 1, "smells/no-complex-string-concat": 1, "smells/no-complex-chaining": 1 } }
Debug
Known footguns
gotchaRules must be prefixed with 'smells/' in the rules configuration.
gotchaPlugin does not export individual rules; import the whole package.
deprecatedRepository has not been updated since 2017, and no new rules have been added.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
13 hits · last 30 days
gptbot
4
ahrefsbot
4
amazonbot
4
script
1
Resources