{"id":26534,"library":"tslint-jest","title":"tslint-jest","description":"tslint-jest is a TSLint plugin providing lint rules for Jest test files. Version 1.0.5 is the latest stable release; the package is no longer actively maintained as TSLint is deprecated in favor of ESLint. It offers rules such as no-alias-methods and expect-expect. Unlike alternatives (eslint-plugin-jest), this plugin is specific to TSLint and is only useful for projects still using TSLint.","status":"deprecated","version":"1.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/eranshabi/tslint-jest","tags":["javascript"],"install":[{"cmd":"npm install tslint-jest","lang":"bash","label":"npm"},{"cmd":"yarn add tslint-jest","lang":"bash","label":"yarn"},{"cmd":"pnpm add tslint-jest","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Rules are specified in tslint.json configuration, not imported in code.","wrong":"import { no-alias-methods } from 'tslint-jest'","symbol":"no-alias-methods","correct":"{\n  \"extends\": [\"tslint-jest\"],\n  \"rules\": {\n    \"no-alias-methods\": true\n  }\n}"},{"note":"Configure rules in tslint.json, not via require/import.","wrong":"const { expect-expect } = require('tslint-jest')","symbol":"expect-expect","correct":"{\n  \"extends\": [\"tslint-jest\"],\n  \"rules\": {\n    \"expect-expect\": true\n  }\n}"},{"note":"The package is a TSLint ruleset; it is used by adding to 'extends' array in tslint.json, not by requiring in code.","wrong":"require('tslint-jest')","symbol":"tslint-jest configuration","correct":"{\n  \"extends\": [\"tslint-jest\"]\n}"}],"quickstart":{"code":"// Step 1: Install\nyarn add --dev tslint-jest\n\n// Step 2: Configure tslint.json\n{\n  \"extends\": [\"tslint-jest\"],\n  \"rules\": {\n    \"no-alias-methods\": true,\n    \"expect-expect\": [true, { \"assertFunctionNames\": [\"expect\", \"assert\"] }]\n  }\n}\n\n// Step 3: Run tslint on a test file\nnpx tslint --project tsconfig.json 'src/**/*.test.ts'","lang":"typescript","description":"Install tslint-jest, configure rules in tslint.json, and lint Jest test files."},"warnings":[{"fix":"Use eslint-plugin-jest with ESLint instead.","message":"TSLint is deprecated in favor of ESLint; tslint-jest is no longer maintained.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always define rules in tslint.json configuration file.","message":"Rules are only available via tslint.json; you cannot import them programmatically in code.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use the `assertFunctionNames` option to whitelist custom assertion functions.","message":"expect-expect rule may flag tests with no explicit assertions inside `it` or `test` blocks even if they contain async calls that throw.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev tslint-jest`.","cause":"The package is not installed or not in node_modules.","error":"Cannot find module 'tslint-jest'"},{"fix":"Ensure `\"extends\": [\"tslint-jest\"]` is present in tslint.json.","cause":"tslint-jest extension not added to tslint.json.","error":"Invalid rules configuration: unknown rule 'no-alias-methods'"},{"fix":"Stick to TSLint 5.x and tslint-jest 1.0.x.","cause":"Incompatible TSLint version or plugin not loaded.","error":"TypeError: Cannot read property 'apply' of undefined (TSLint error)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}