{"id":13621212,"url":"https://github.com/willhoney7/eslint-plugin-import-helpers","last_synced_at":"2025-04-07T15:10:22.581Z","repository":{"id":34307900,"uuid":"177026230","full_name":"willhoney7/eslint-plugin-import-helpers","owner":"willhoney7","description":"ESLint plugin to help enforce a configurable order for import statements","archived":false,"fork":false,"pushed_at":"2023-01-09T02:24:22.000Z","size":675,"stargazers_count":286,"open_issues_count":10,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-09T16:21:18.840Z","etag":null,"topics":["eslint","eslint-rules","eslintrc","import","imports"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/willhoney7.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}},"created_at":"2019-03-21T21:26:59.000Z","updated_at":"2024-03-23T00:18:30.000Z","dependencies_parsed_at":"2023-01-15T06:13:37.421Z","dependency_job_id":null,"html_url":"https://github.com/willhoney7/eslint-plugin-import-helpers","commit_stats":null,"previous_names":["tibfib/eslint-plugin-import-helpers"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willhoney7%2Feslint-plugin-import-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willhoney7%2Feslint-plugin-import-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willhoney7%2Feslint-plugin-import-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willhoney7%2Feslint-plugin-import-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willhoney7","download_url":"https://codeload.github.com/willhoney7/eslint-plugin-import-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675607,"owners_count":20977378,"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-rules","eslintrc","import","imports"],"created_at":"2024-08-01T21:01:03.660Z","updated_at":"2025-04-07T15:10:22.400Z","avatar_url":"https://github.com/willhoney7.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# eslint-plugin-import-helpers\n\n\u003e Originally forked/inspired by [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) and [this fork](https://github.com/dannysindra/eslint-plugin-import)\n\n[![npm version](https://badge.fury.io/js/eslint-plugin-import-helpers.svg)](https://badge.fury.io/js/eslint-plugin-import-helpers)\n\nThis package was created to supplement the rules provided by [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import). There are a lot of great rules in there, but we found it missing a few key use cases.\n\n# Rules\n\n#### [`order-imports`]\n\nEnforce a _configurable_ convention in module import order. See the [`order-imports`] page for configuration details.\n\n```javascript\n// Given ESLint Config\nrules: {\n  'import-helpers/order-imports': [\n      'warn',\n      {\n          newlinesBetween: 'always', // new line between groups\n          groups: [\n              'module',\n              '/^@shared/',\n              ['parent', 'sibling', 'index'],\n          ],\n          alphabetize: { order: 'asc', ignoreCase: true },\n      },\n  ],\n}\n\n// will fix\nimport SiblingComponent from './SiblingComponent';\nimport lodash from 'lodash';\nimport SharedComponent from '@shared/components/SharedComponent';\nimport React from 'react';\n\n// into\nimport lodash from 'lodash';\nimport React from 'react';\n\nimport SharedComponent from '@shared/components/SharedComponent';\n\nimport SiblingComponent from './SiblingComponent';\n```\n\n[`order-imports`]: ./docs/rules/order-imports.md\n\n# Installation\n\n```sh\nnpm install eslint-plugin-import-helpers -g\n```\n\nor if you manage ESLint as a dev dependency:\n\n```sh\n# inside your project's working tree\nnpm install eslint-plugin-import-helpers --save-dev\n```\n\nTo add a rule, update your `.eslintrc.(yml|json|js)`:\n\n```js\n{\n    // .eslintrc.js\n    plugins: ['eslint-plugin-import-helpers'],\n    rules: {\n        'import-helpers/order-imports': [\n            'warn',\n            { // example configuration\n                newlinesBetween: 'always',\n                groups: [\n                    'module',\n                    '/^@shared/',\n                    ['parent', 'sibling', 'index'],\n                ],\n                alphabetize: { order: 'asc', ignoreCase: true },\n            },\n        ],\n    }\n}\n```\n\n# TypeScript\n\nTo use this plugin with TypeScript, you must use the TypeScript parser for ESLint. See [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) for more details.\n\n# Working with This Repo\n\n## Dependencies\n\n| Name                          | Version |\n| ----------------------------- | ------- |\n| [node.js](https://nodejs.org) | 16.x    |\n\n## Running Tests\n\nFirst, `npm install`\nThen, `npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillhoney7%2Feslint-plugin-import-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillhoney7%2Feslint-plugin-import-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillhoney7%2Feslint-plugin-import-helpers/lists"}