{"id":22951825,"url":"https://github.com/keplersj/jest-runner-tslint","last_synced_at":"2025-08-13T00:32:54.258Z","repository":{"id":27007727,"uuid":"110639678","full_name":"keplersj/jest-runner-tslint","owner":"keplersj","description":"TSLint runner for Jest","archived":false,"fork":false,"pushed_at":"2024-06-18T02:39:32.000Z","size":3453,"stargazers_count":7,"open_issues_count":13,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-28T16:51:49.063Z","etag":null,"topics":["jest","linter","tslint","typescript"],"latest_commit_sha":null,"homepage":"https://keplersj.com/projects/jest-runner-tslint/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keplersj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-14T04:16:56.000Z","updated_at":"2024-11-04T06:07:30.000Z","dependencies_parsed_at":"2024-11-18T01:47:02.629Z","dependency_job_id":null,"html_url":"https://github.com/keplersj/jest-runner-tslint","commit_stats":{"total_commits":613,"total_committers":6,"mean_commits":"102.16666666666667","dds":"0.38825448613376834","last_synced_commit":"866e04ef2f9a393e23b35c6d50c3d84104bdab28"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplersj%2Fjest-runner-tslint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplersj%2Fjest-runner-tslint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplersj%2Fjest-runner-tslint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keplersj%2Fjest-runner-tslint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keplersj","download_url":"https://codeload.github.com/keplersj/jest-runner-tslint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228855404,"owners_count":17982106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jest","linter","tslint","typescript"],"created_at":"2024-12-14T15:18:54.941Z","updated_at":"2024-12-14T15:18:55.452Z","avatar_url":"https://github.com/keplersj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-runner-tslint\n\n## **Deprecated**\n\nDue to the [deprecation of TSLint](https://github.com/palantir/tslint/issues/4534) this package is as well in the process of being deprecation. Before this happens officially, this package is following a similar path of maintenance before final deprecation.\n\nIn the meantime, if you are currently using this package, please take the time to transition your project to [ESLint](https://eslint.org/), [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint), and [jest-runner-eslint](https://github.com/jest-community/jest-runner-eslint).\n\nFor more information on the industry-wide transition from TSLint to ESLint, please see the following:\n\n- [_TSLint in 2019_ on Medium](https://medium.com/palantir/tslint-in-2019-1a144c2317a9)\n- [palantir/tslint#4534: \"Roadmap: TSLint -\u003e ESLint\"](https://github.com/palantir/tslint/issues/4534)\n- [typescript-eslint: \"What about TSLint?\"](https://github.com/typescript-eslint/typescript-eslint#what-about-tslint)\n\n## Usage\n\n### Install\n\nInstall `tslint`, `jest`_(it needs Jest 21+)_, and `jest-runner-tslint`\n\n```bash\nyarn add --dev tslint jest jest-runner-tslint\n\n# or with NPM\n\nnpm install --save-dev tslint jest jest-runner-tslint\n\n```\n\n### Add it to your Jest config\n\n#### Using Built-in Preset\n\nThis package includes a [Jest preset](https://jestjs.io/docs/en/configuration#preset-string) which configures Jest to run TSLint on all files supported by TSLint. To use it set the following in your `package.json`:\n\n```json\n{\n  \"jest\": {\n    \"preset\": \"jest-runner-tslint\"\n  }\n}\n```\n\nor `jest.config.js`:\n\n```js\nmodule.exports = {\n  preset: \"jest-runner-tslint\",\n};\n```\n\n#### Manually\n\nIn your `package.json`\n\n```json\n{\n  \"jest\": {\n    \"moduleFileExtensions\": [\"ts\", \"tsx\", \"js\", \"jsx\"],\n    \"runner\": \"tslint\",\n    \"testMatch\": [\"**/*.ts\", \"**/*.tsx\", \"**/*.d.ts\", \"**/*.js\", \"**/*.jsx\"]\n  }\n}\n```\n\nOr in `jest.config.js`\n\n```js\nmodule.exports = {\n  moduleFileExtensions: [\"ts\", \"tsx\", \"js\", \"jsx\"],\n  runner: \"tslint\",\n  testMatch: [\"**/*.ts\", \"**/*.tsx\", \"**/*.d.ts\", \"**/*.js\", \"**/*.jsx\"],\n};\n```\n\n### Run Jest\n\n```bash\nyarn jest\n```\n\n## Options\n\nThis project uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig), so you can provide config via:\n\n- a `jest-runner-tslint` property in your `package.json`\n- a `jest-runner-tslint.config.js` JS file\n- a `.jest-runner-tslintrc` JSON file\n\nIn `package.json`\n\n```json\n{\n  \"jest-runner-tslint\": {\n    \"cliOptions\": {\n      // Options here\n    }\n  }\n}\n```\n\nor in `jest-runner-tslint.config.js`\n\n```js\nmodule.exports = {\n  cliOptions: {\n    // Options here\n  },\n};\n```\n\n### cliOptions\n\njest-runner-tslint maps a lot of ESLint CLI arguments to config options. For example `--fix` is `cliOptions.fix`\n\n| option              | default     | example                                                                                     |\n| ------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| fix                 | `false`     | `\"fix\": true`                                                                               |\n| formatter           | `\"stylish\"` | `\"formatter\": \"tap\"`                                                                        |\n| formattersDirectory | `null`      | `\"formattersDirectory\": \"node_modules/custom-tslint-formatters/formatters\"`                 |\n| rulesDirectory      | `null`      | `\"rulesDirectory\": \"path/to/rules\" or \"rulesDirectory\": [\"path/to/rules\", \"path/to/other\"]` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeplersj%2Fjest-runner-tslint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeplersj%2Fjest-runner-tslint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeplersj%2Fjest-runner-tslint/lists"}