{"id":14984111,"url":"https://github.com/prettier/tslint-plugin-prettier","last_synced_at":"2025-05-16T09:05:56.163Z","repository":{"id":23358626,"uuid":"98783106","full_name":"prettier/tslint-plugin-prettier","owner":"prettier","description":"Runs Prettier as a TSLint rule and reports differences as individual TSLint issues","archived":false,"fork":false,"pushed_at":"2022-12-03T07:01:20.000Z","size":596,"stargazers_count":235,"open_issues_count":18,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-07T04:33:39.491Z","etag":null,"topics":["prettier","tslint","tslint-plugin","tslint-rules"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prettier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-30T07:49:03.000Z","updated_at":"2025-05-03T21:51:50.000Z","dependencies_parsed_at":"2023-01-14T00:30:13.394Z","dependency_job_id":null,"html_url":"https://github.com/prettier/tslint-plugin-prettier","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Ftslint-plugin-prettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Ftslint-plugin-prettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Ftslint-plugin-prettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Ftslint-plugin-prettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prettier","download_url":"https://codeload.github.com/prettier/tslint-plugin-prettier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254445459,"owners_count":22072427,"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":["prettier","tslint","tslint-plugin","tslint-rules"],"created_at":"2024-09-24T14:08:28.035Z","updated_at":"2025-05-16T09:05:51.153Z","avatar_url":"https://github.com/prettier.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tslint-plugin-prettier\n\n[![npm](https://img.shields.io/npm/v/tslint-plugin-prettier.svg)](https://www.npmjs.com/package/tslint-plugin-prettier)\n[![build](https://img.shields.io/travis/prettier/tslint-plugin-prettier/master.svg)](https://travis-ci.org/prettier/tslint-plugin-prettier/builds)\n[![coverage](https://img.shields.io/codecov/c/github/prettier/tslint-plugin-prettier/master.svg)](https://codecov.io/gh/prettier/tslint-plugin-prettier)\n\nRuns Prettier as a TSLint rule and reports differences as individual TSLint issues.\n\n[Changelog](https://github.com/prettier/tslint-plugin-prettier/blob/master/CHANGELOG.md)\n\n## Sample\n\n```ts\na();;;\n    ~~\n;;;\n~~~ [Delete `;;⏎;;;`]\n```\n\n```ts\nvar foo = ''\n          ~~ [Replace `''` with `\"\";⏎`]\n```\n\n```ts\nvar foo= \"\";\n       ~ [Insert `·`]\n```\n\n## Install\n\n```sh\n# using npm\nnpm install --save-dev tslint-plugin-prettier prettier\n\n# using yarn\nyarn add --dev tslint-plugin-prettier prettier\n```\n\n(require `prettier@^1.9.0`)\n\n## Usage\n\n(tslint.json)\n\nfor `tslint@^5.2.0`\n\n```json\n{\n  \"rulesDirectory\": [\"tslint-plugin-prettier\"],\n  \"rules\": {\n    \"prettier\": true\n  }\n}\n```\n\nfor `tslint@^5.0.0`\n\n```json\n{\n  \"extends\": [\"tslint-plugin-prettier\"],\n  \"rules\": {\n    \"prettier\": true\n  }\n}\n```\n\n**NOTE**: To use this plugin, it'd better to also use [tslint-config-prettier](https://github.com/prettier/tslint-config-prettier) to disable all prettier-related rules, so as to avoid conflicts between existed rules.\n\n## Options\n\n- If there is no option provided, it'll try to load [config file](https://prettier.io/docs/en/configuration.html) and/or `.editorconfig` if possible, uses Prettier's default option if not found.\n\n  ```json\n  {\n    \"extends\": [\"tslint-plugin-prettier\"],\n    \"rules\": {\n      \"prettier\": true\n    }\n  }\n  ```\n\n  If you don't want to load `.editorconfig`, disable it in the third argument.\n\n  ```json\n  {\n    \"extends\": [\"tslint-plugin-prettier\"],\n    \"rules\": {\n      \"prettier\": [true, null, { \"editorconfig\": false }]\n    }\n  }\n  ```\n\n- If you'd like to specify which config file to use, just put its path (relative to `process.cwd()`) in the second argument, the following example shows how to load the config file from `\u003ccwd\u003e/configs/.prettierrc`:\n\n  ```json\n  {\n    \"extends\": [\"tslint-plugin-prettier\"],\n    \"rules\": {\n      \"prettier\": [true, \"configs/.prettierrc\"]\n    }\n  }\n  ```\n\n- If you'd like to specify options manually, just put [Prettier Options](https://prettier.io/docs/en/options.html) in the second argument, for example:\n\n  ```json\n  {\n    \"extends\": [\"tslint-plugin-prettier\"],\n    \"rules\": {\n      \"prettier\": [true, { \"singleQuote\": true }]\n    }\n  }\n  ```\n\n## Ignoring files\n\n- It will respect your .prettierignore file in your project root ( process.cwd() ) but if you would like to use a different file you can provide it in the third argument, for example:\n\n  ```json\n  {\n    \"extends\": [\"tslint-plugin-prettier\"],\n    \"rules\": {\n      \"prettier\": [true, null, { \"ignorePath\": \"otherDirectory/.prettierignore\" }]\n    }\n  }\n\n  ```\n\n## Development\n\n```sh\n# lint\nyarn run lint\n\n# build\nyarn run build\n\n# test\nyarn run test\n```\n\n## Related\n\n- [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)\n- [tslint-config-prettier](https://github.com/prettier/tslint-config-prettier)\n- [prettier-tslint](https://github.com/azz/prettier-tslint)\n\n## License\n\nMIT © [Ika](https://github.com/ikatyang)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprettier%2Ftslint-plugin-prettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprettier%2Ftslint-plugin-prettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprettier%2Ftslint-plugin-prettier/lists"}