{"id":18800515,"url":"https://github.com/lingui/eslint-plugin","last_synced_at":"2025-04-05T12:02:07.655Z","repository":{"id":179431429,"uuid":"663471538","full_name":"lingui/eslint-plugin","owner":"lingui","description":"Set of ESLint rules for Lingui projects","archived":false,"fork":false,"pushed_at":"2025-02-04T10:30:50.000Z","size":226,"stargazers_count":26,"open_issues_count":6,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-12T04:01:45.579Z","etag":null,"topics":["eslint","eslint-plugin","hacktoberfest","lingui"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-plugin-lingui","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/lingui.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-07T11:18:02.000Z","updated_at":"2025-02-08T22:54:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"b804e18e-0595-457b-a709-44b093f21880","html_url":"https://github.com/lingui/eslint-plugin","commit_stats":{"total_commits":44,"total_committers":9,"mean_commits":4.888888888888889,"dds":0.75,"last_synced_commit":"cf86397e97b7023fae0a570fca671530dc96b2d2"},"previous_names":["igordolzh/eslint-plugin-lingui","lingui/eslint-plugin"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingui%2Feslint-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingui%2Feslint-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingui%2Feslint-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingui%2Feslint-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lingui","download_url":"https://codeload.github.com/lingui/eslint-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332556,"owners_count":20921853,"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":["eslint","eslint-plugin","hacktoberfest","lingui"],"created_at":"2024-11-07T22:18:55.050Z","updated_at":"2025-04-05T12:02:07.626Z","avatar_url":"https://github.com/lingui.png","language":"TypeScript","readme":"# \u003cdiv align=\"center\"\u003eAn ESLint Plugin For Lingui\u003csub\u003ejs\u003c/sub\u003e\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nSet of eslint rules for [Lingui](https://lingui.dev) projects \u003cimg src=\"https://img.shields.io/badge/beta-yellow\"/\u003e\n\n[![npm](https://img.shields.io/npm/v/eslint-plugin-lingui?logo=npm\u0026cacheSeconds=1800)](https://www.npmjs.com/package/eslint-plugin-lingui)\n[![npm](https://img.shields.io/npm/dt/eslint-plugin-lingui?cacheSeconds=500)](https://www.npmjs.com/package/eslint-plugin-lingui)\n[![main-suite](https://github.com/lingui/eslint-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/lingui/eslint-plugin/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/lingui/eslint-plugin/graph/badge.svg?token=ULkNOaWVaw)](https://codecov.io/gh/lingui/eslint-plugin)\n[![GitHub](https://img.shields.io/github/license/lingui/eslint-plugin)](https://github.com/lingui/eslint-plugin/blob/main/LICENSE)\n\n\u003c/div\u003e\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```bash\nnpm install --save-dev eslint\n# or\nyarn add eslint --dev\n```\n\nNext, install `eslint-plugin-lingui`:\n\n```bash\nnpm install --save-dev eslint-plugin-lingui\n# or\nyarn add eslint-plugin-lingui --dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-lingui` globally.\n\n## Flat Config (`eslint.config.js`)\n\n### Recommended Setup\n\nTo enable all the recommended rules for our plugin, add the following config:\n\n```js\nimport pluginLingui from 'eslint-plugin-lingui'\n\nexport default [\n  pluginLingui.configs['flat/recommended'],\n  // Any other config...\n]\n```\n\nWe also recommend enabling the [no-unlocalized-strings](docs/rules/no-unlocalized-strings.md) rule. It’s not enabled by default because it needs to be set up specifically for your project. Please check the rule's documentation for example configurations.\n\n### Custom setup\n\nAlternatively, you can load the plugin and configure only the rules you want to use:\n\n```js\nimport pluginLingui from 'eslint-plugin-lingui'\n\nexport default [\n  {\n    plugins: {\n      lingui: pluginLingui,\n    },\n    rules: {\n      'lingui/t-call-in-function': 'error',\n    },\n  },\n  // Any other config...\n]\n```\n\n## Legacy Config (`.eslintrc`)\n\n### Recommended setup\n\nTo enable all of the recommended rules for our plugin, add `plugin:lingui/recommended` in extends:\n\n```json\n{\n  \"extends\": [\"plugin:lingui/recommended\"]\n}\n```\n\n### Custom setup\n\nAlternatively, add `lingui` to the plugins section, and configure the rules you want to use:\n\n```json\n{\n  \"plugins\": [\"lingui\"],\n  \"rules\": {\n    \"lingui/t-call-in-function\": \"error\"\n  }\n}\n```\n\n## Rules\n\n✅ - Recommended\n\n- ✅ [no-expression-in-message](docs/rules/no-expression-in-message.md)\n- ✅ [no-single-tag-to-translate](docs/rules/no-single-tag-to-translate.md)\n- ✅ [no-single-variables-to-translate](docs/rules/no-single-variables-to-translate.md)\n- ✅ [no-trans-inside-trans](docs/rules/no-trans-inside-trans.md)\n- ✅ [t-call-in-function](docs/rules/t-call-in-function.md)\n- [no-unlocalized-strings](docs/rules/no-unlocalized-strings.md)\n- [text-restrictions](docs/rules/text-restrictions.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingui%2Feslint-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingui%2Feslint-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingui%2Feslint-plugin/lists"}