Installations
npm install eslint-plugin-etc
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
14.18.0
NPM Version
6.14.15
Score
88.8
Supply Chain
90.7
Quality
71.6
Maintenance
100
Vulnerability
83.8
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (99.96%)
Shell (0.04%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
cartant
Download Statistics
Total Downloads
9,591,995
Last Day
10,611
Last Week
66,202
Last Month
297,782
Last Year
3,175,396
GitHub Statistics
MIT License
147 Stars
586 Commits
20 Forks
3 Watchers
5 Branches
5 Contributors
Updated on Jan 16, 2025
Bundle Size
1.06 kB
Minified
590.00 B
Minified + Gzipped
Package Meta Information
Latest Version
2.0.3
Package Id
eslint-plugin-etc@2.0.3
Unpacked Size
90.00 kB
Size
18.65 kB
File Count
38
NPM Version
6.14.15
Node Version
14.18.0
Published on
May 10, 2023
Total Downloads
Cumulative downloads
Total Downloads
9,591,995
Last Day
2%
10,611
Compared to previous day
Last Week
3.2%
66,202
Compared to previous week
Last Month
29.7%
297,782
Compared to previous month
Last Year
20.4%
3,175,396
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
6
Peer Dependencies
2
eslint-plugin-etc
This package contains a bunch of general-purpose, TypeScript-related ESLint rules. Essentially, it's a re-implementation of the rules that are in the tslint-etc
package.
Some of the rules are rather opinionated and are not included in the recommended
configuration. Developers can decide for themselves whether they want to enable opinionated rules.
Install
Install the ESLint TypeScript parser using npm:
npm install @typescript-eslint/parser --save-dev
Install the package using npm:
npm install eslint-plugin-etc --save-dev
Configure the parser
and the parserOptions
for ESLint. Here, I use a .eslintrc.js
file for the configuration:
1const { join } = require("path"); 2module.exports = { 3 parser: "@typescript-eslint/parser", 4 parserOptions: { 5 ecmaVersion: 2019, 6 project: join(__dirname, "./tsconfig.json"), 7 sourceType: "module" 8 }, 9 plugins: ["etc"], 10 extends: [], 11 rules: { 12 "etc/no-t": "error" 13 } 14};
Or, using the recommended
configuration:
1const { join } = require("path"); 2module.exports = { 3 parser: "@typescript-eslint/parser", 4 parserOptions: { 5 ecmaVersion: 2019, 6 project: join(__dirname, "./tsconfig.json"), 7 sourceType: "module" 8 }, 9 extends: ["plugin:etc/recommended"], 10};
Rules
The package includes the following rules.
Rules marked with ✅ are recommended and rules marked with 🔧 have fixers.
Rule | Description | ||
---|---|---|---|
no-assign-mutated-array | Forbids the assignment of returned, mutated arrays. | ✅ | |
no-commented-out-code | Forbids commented-out code. | ||
no-const-enum | Forbids the use of const enum . Constant enums are not compatible with isolated modules. | ||
no-deprecated | Forbids the use of deprecated APIs. | ✅ | |
no-enum | Forbids the use of enum . | ||
no-implicit-any-catch | Like the no-implicit-any-catch rule in @typescript-eslint/eslint-plugin , but for Promise rejections instead of catch clauses. | ✅ | 🔧 |
no-internal | Forbids the use of internal APIs. | ✅ | |
no-misused-generics | Forbids type parameters without inference sites and type parameters that don't add type safety to declarations. This is an ESLint port of Wotan's no-misused-generics rule. See also "The Golden Rule of Generics". | ||
no-t | Forbids single-character type parameters. | ||
prefer-interface | Forbids type aliases where interfaces can be used. | 🔧 | |
prefer-less-than | Forbids greater-than comparisons. (Yes, this is the rule for Ben Lesh comparisons.) | 🔧 | |
throw-error | Forbids throwing - or rejecting with - non-Error values. | ||
underscore-internal | Forbids internal APIs that are not prefixed with underscores. |

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
8 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Score
2
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to eslint-plugin-etc
eslint-plugin-perfectionist
ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
@anolilab/eslint-config
ESLint shareable config for the Anolilab JavaScript style guide.
eslint-plugin-react-etc
More ESLint rules for React
eslint-plugin-for-import-eslint-plugin
fix import and etc