Registry / testing / eslint-plugin-etc

eslint-plugin-etc

JSON →
library2.0.3jsnpmunverified

ESLint plugin providing TypeScript-focused, general-purpose lint rules. Current version 2.0.3 (stable). The package reimplements TSLint-etc rules for ESLint, covering areas like array mutation, commented-out code, const enums, deprecated APIs, and more. It requires TypeScript 4.0+ and ESLint 8. Some rules are opinionated and excluded from the recommended config, giving developers flexibility. Compared to @typescript-eslint/eslint-plugin, it offers unique rules like no-t, no-const-enum, and no-implicit-any-catch for Promise rejections.

npm install eslint-plugin-etc
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-ETC
E
eslint-plugin-etc
testingjavascriptv2.0.3
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

plugin
✓ plugins: ['etc']
✗ const plugin = require('eslint-plugin-etc'); // incorrect usage in config
Add 'etc' to the plugins array in your ESLint config.
etc/recommended
✓ extends: ['plugin:etc/recommended']
✗ extends: ['etc/recommended'] // missing 'plugin:' prefix
Use 'plugin:' prefix for extending configurations.
rules
✓ rules: { 'etc/no-t': 'error' }
✗ rules: { 'no-t': 'error' } // missing 'etc/' prefix
Prefix rule names with 'etc/' as they are namespaced.

Configure eslint-plugin-etc with TypeScript parser and recommended rules. Shows plugins, extends, and custom rule setup.

// In .eslintrc.js const { join } = require('path'); module.exports = { parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 2019, project: join(__dirname, './tsconfig.json'), sourceType: 'module' }, plugins: ['etc'], extends: ['plugin:etc/recommended'], rules: { 'etc/no-t': 'error' } };
Debug
Known issues
breakingVersion 2.0.0+ may have changed configuration schema or dropped rules; check migration docs.
fix
Review the changelog on GitHub for breaking changes.
affects: >=2.0.0
deprecatedSome rules have been deprecated or renamed from the original tslint-etc set.
fix
Check the documentation for each rule to ensure you are using the correct name.
affects: >=1.0.0
gotchaThe 'no-deprecated' rule requires a TypeScript project and may produce false positives if type information is incomplete.
fix
Ensure the parserOptions.project points to a valid tsconfig.json and type information is available.
affects: >=1.0.0
gotchaSome opinionated rules (e.g., no-enum, no-const-enum) are not in the 'recommended' config and need explicit enabling.
fix
Add the rule to your 'rules' object with the desired severity.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-etc'
The plugin is not installed globally or locally.
fix
Run 'npm install eslint-plugin-etc --save-dev'.
Configuration for rule 'etc/no-t' is invalid: Value "error" should be a boolean.
Old syntax using 'true' instead of 'error'/'warn'/'off'.
fix
Use 'error' or 'warn' instead of 'true'.
Parsing error: The 'project' option must be set to a path to a tsconfig.json file.
Missing or incorrect parserOptions.project in ESLint config.
fix
Set parserOptions.project to a valid path to your tsconfig.json.
Upgrade
Version history
2.0.3latest on npm
Audit
Dependencies
@typescript-eslint/parserrequiredRequired for parsing TypeScript files with ESLint.
eslintrequiredPeer dependency; needed to run the plugin.
typescriptrequiredPeer dependency; rules require TypeScript >=4.0.0.
Agent activity
6 hits · last 30 days
node
6
Resources
eslint-plugin-etc — npm install eslint-plugin-etc · libregistry