{"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,"search_vec":"'/eslint-plugin':69 '2.0.3':18 '4.0':47 '8':50 'api':41 'area':30 'array':32 'catch':87 'code':37 'comment':35 'commented-out':34 'compar':64 'config':60 'const':38,80 'cover':29 'current':16 'deprec':40 'develop':62 'enum':39,81 'eslint':2,5,28,49,68,94 'eslint-plugin-etc':1 'etc':4,25 'exclud':56 'flexibl':63 'focus':10 'general':12 'general-purpos':11 'give':61 'implicit':85 'javascript':91 'like':31,74 'lint':14,92 'mutat':33 'no-const-enum':78 'no-implicit-any-catch':83 'no-t':75 'offer':71 'opinion':54 'packag':21 'plugin':3,6 'promis':89 'provid':7 'purpos':13 'recommend':59 'reimplement':22 'reject':90 'requir':45 'rule':15,26,52,73,93 'stabl':19 'tslint':24 'tslint-etc':23 'typescript':9,46,67 'typescript-eslint':66 'typescript-focus':8 'uniqu':72 'version':17","created_at":"2026-04-25T11:19:26.139788+00:00","updated_at":"2026-04-25T11:19:26.139788+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/cartant/eslint-plugin-etc","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-etc","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}