{"id":19746,"library":"eslint-plugin-etc","title":"eslint-plugin-etc","description":"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.","status":"active","version":"2.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/cartant/eslint-plugin-etc","tags":["javascript","lint","rules","eslint"],"install":[{"cmd":"npm install eslint-plugin-etc","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-etc","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-etc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for parsing TypeScript files with ESLint.","package":"@typescript-eslint/parser","optional":false},{"reason":"Peer dependency; needed to run the plugin.","package":"eslint","optional":false},{"reason":"Peer dependency; rules require TypeScript >=4.0.0.","package":"typescript","optional":false}],"imports":[{"note":"Add 'etc' to the plugins array in your ESLint config.","wrong":"const plugin = require('eslint-plugin-etc'); // incorrect usage in config","symbol":"plugin","correct":"plugins: ['etc']"},{"note":"Use 'plugin:' prefix for extending configurations.","wrong":"extends: ['etc/recommended'] // missing 'plugin:' prefix","symbol":"etc/recommended","correct":"extends: ['plugin:etc/recommended']"},{"note":"Prefix rule names with 'etc/' as they are namespaced.","wrong":"rules: { 'no-t': 'error' } // missing 'etc/' prefix","symbol":"rules","correct":"rules: { 'etc/no-t': 'error' }"}],"quickstart":{"code":"// In .eslintrc.js\nconst { join } = require('path');\nmodule.exports = {\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    ecmaVersion: 2019,\n    project: join(__dirname, './tsconfig.json'),\n    sourceType: 'module'\n  },\n  plugins: ['etc'],\n  extends: ['plugin:etc/recommended'],\n  rules: {\n    'etc/no-t': 'error'\n  }\n};","lang":"javascript","description":"Configure eslint-plugin-etc with TypeScript parser and recommended rules. Shows plugins, extends, and custom rule setup."},"warnings":[{"fix":"Review the changelog on GitHub for breaking changes.","message":"Version 2.0.0+ may have changed configuration schema or dropped rules; check migration docs.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Check the documentation for each rule to ensure you are using the correct name.","message":"Some rules have been deprecated or renamed from the original tslint-etc set.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure the parserOptions.project points to a valid tsconfig.json and type information is available.","message":"The 'no-deprecated' rule requires a TypeScript project and may produce false positives if type information is incomplete.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add the rule to your 'rules' object with the desired severity.","message":"Some opinionated rules (e.g., no-enum, no-const-enum) are not in the 'recommended' config and need explicit enabling.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-plugin-etc --save-dev'.","cause":"The plugin is not installed globally or locally.","error":"Error: Cannot find module 'eslint-plugin-etc'"},{"fix":"Use 'error' or 'warn' instead of 'true'.","cause":"Old syntax using 'true' instead of 'error'/'warn'/'off'.","error":"Configuration for rule 'etc/no-t' is invalid: Value \"error\" should be a boolean."},{"fix":"Set parserOptions.project to a valid path to your tsconfig.json.","cause":"Missing or incorrect parserOptions.project in ESLint config.","error":"Parsing error: The 'project' option must be set to a path to a tsconfig.json file."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}