{"id":15043763,"url":"https://github.com/marcalexiei/eslint-plugin-react-import","last_synced_at":"2025-10-05T22:43:13.539Z","repository":{"id":256002909,"uuid":"853749853","full_name":"marcalexiei/eslint-plugin-react-import","owner":"marcalexiei","description":"ESLint plugin to ensure consistent react imports","archived":false,"fork":false,"pushed_at":"2025-09-06T12:35:25.000Z","size":291,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T08:35:26.921Z","etag":null,"topics":["eslint","eslint-plugin","react-import"],"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/marcalexiei.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-07T12:36:59.000Z","updated_at":"2025-09-06T12:34:05.000Z","dependencies_parsed_at":"2024-09-15T10:11:20.771Z","dependency_job_id":"3da00701-d557-4b27-ae28-498ae0fc37e9","html_url":"https://github.com/marcalexiei/eslint-plugin-react-import","commit_stats":null,"previous_names":["marcalexiei/eslint-plugin-react-import-style","marcalexiei/eslint-plugin-react-import"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/marcalexiei/eslint-plugin-react-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcalexiei%2Feslint-plugin-react-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcalexiei%2Feslint-plugin-react-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcalexiei%2Feslint-plugin-react-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcalexiei%2Feslint-plugin-react-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcalexiei","download_url":"https://codeload.github.com/marcalexiei/eslint-plugin-react-import/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcalexiei%2Feslint-plugin-react-import/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278532358,"owners_count":26002345,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","react-import"],"created_at":"2024-09-24T20:49:33.875Z","updated_at":"2025-10-05T22:43:13.489Z","avatar_url":"https://github.com/marcalexiei.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-react-import\n\n[![CI](https://github.com/marcalexiei/eslint-plugin-react-import/actions/workflows/CI.yml/badge.svg)](https://github.com/marcalexiei/eslint-plugin-react-import/actions/workflows/CI.yml)\n[![Code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)\n[![npm version](https://img.shields.io/npm/v/eslint-plugin-react-import.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-react-import)\n[![issues](https://img.shields.io/github/issues/marcalexiei/eslint-plugin-react-import.svg)](https://github.com/marcalexiei/eslint-plugin-react-import/issues)\n\nESLint plugin to ensure consistent react imports\n\n\u003e [!WARNING]\n\u003e This plugin supports `eslint 8` but do not expose legacy configs.\n\u003e See the [guide below](#configuration-legacy-eslintrc) use this plugin with legacy config\n\n## Rules\n\n\u003c!-- begin auto-generated rules list --\u003e\n\n💼 Configurations enabled in.\\\n✅ Set in the `recommended` configuration.\\\n🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\n\n| Name                                                 | Description                                                                                         | 💼  | 🔧  |\n| :--------------------------------------------------- | :-------------------------------------------------------------------------------------------------- | :-- | :-- |\n| [consistent-syntax](docs/rules/consistent-syntax.md) | Enforces React import style across your code. Can be customized to use default or namespace import. | ✅  | 🔧  |\n\n\u003c!-- end auto-generated rules list --\u003e\n\n## Installation\n\n```shell\nnpm i --save-dev eslint eslint-plugin-react-import\n```\n\n```shell\nyarn add --dev eslint eslint-plugin-react-import\n```\n\n```shell\npnpm add --save-dev eslint eslint-plugin-react-import\n```\n\n## Configuration\n\n\u003e [!TIP]\n\u003e For a working example check `tests/fixtures` folders\n\n### Javascript\n\n```js\n// eslint.config.js\nimport eslintPluginReactImport from 'eslint-plugin-react-import';\nexport default [\n  // other configs\n  // ...\n  eslintPluginReactImport.configs.recommended,\n];\n```\n\n### Typescript\n\n\u003e [!NOTE]\n\u003e In order to replace all type occurrences typescript parser should be used\n\n```js\n// eslint.config.js\nimport eslintPluginReactImport from 'eslint-plugin-react-import';\nimport typescriptEslintParser from '@typescript-eslint/parser';\n\nexport default [\n  // other configs\n  // ...\n  {\n    ...eslintPluginReactImport.configs.recommended,\n    languageOptions: {\n      ...eslintPluginReactImport.configs.recommended.languageOptions,\n      parser: typescriptEslintParser,\n    },\n  },\n];\n```\n\n## Configuration (legacy eslintrc)\n\nFor legacy config there is no exported config. Since this plugin include one rule\nyou just need to add the plugin name to plugins list and configure the rules:\n\n```js\nmodule.exports = {\n  root: true,\n  plugins: [\n    // Other plugins...\n    'react-import',\n  ],\n  // Remember to change parser if you are using ts\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    // ...\n  },\n  rules: {\n    // Configure the rule\n    'react-import/consistent-syntax': ['error', 'namespace'],\n  },\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcalexiei%2Feslint-plugin-react-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcalexiei%2Feslint-plugin-react-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcalexiei%2Feslint-plugin-react-import/lists"}