{"id":15413374,"url":"https://github.com/simonwep/eslint-plugin-align-import","last_synced_at":"2025-06-21T17:06:43.758Z","repository":{"id":42832747,"uuid":"265016716","full_name":"simonwep/eslint-plugin-align-import","owner":"simonwep","description":"⚙ ESLint plugin to align all your import statements.","archived":false,"fork":false,"pushed_at":"2022-12-30T20:25:14.000Z","size":187,"stargazers_count":9,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T16:19:55.553Z","etag":null,"topics":["eslint","eslint-plugin","eslint-rules","eslintplugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/simonwep.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-05-18T17:48:22.000Z","updated_at":"2025-04-02T18:33:44.000Z","dependencies_parsed_at":"2023-01-31T15:45:37.439Z","dependency_job_id":null,"html_url":"https://github.com/simonwep/eslint-plugin-align-import","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/simonwep/eslint-plugin-align-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwep%2Feslint-plugin-align-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwep%2Feslint-plugin-align-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwep%2Feslint-plugin-align-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwep%2Feslint-plugin-align-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonwep","download_url":"https://codeload.github.com/simonwep/eslint-plugin-align-import/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwep%2Feslint-plugin-align-import/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261162067,"owners_count":23118221,"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","eslint-rules","eslintplugin"],"created_at":"2024-10-01T16:56:49.526Z","updated_at":"2025-06-21T17:06:38.738Z","avatar_url":"https://github.com/simonwep.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Simonwep"],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e\n    eslint-plugin-align-import\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Simonwep/eslint-plugin-align-import/actions\"\u003e\u003cimg\n     alt=\"Build Status\"\n     src=\"https://img.shields.io/github/workflow/status/Simonwep/eslint-plugin-align-import/CI?style=flat-square\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/eslint-plugin-align-import\"\u003e\u003cimg\n     alt=\"Download count\"\n     src=\"https://img.shields.io/npm/dm/eslint-plugin-align-import.svg?style=popout-square\"\u003e\u003c/a\u003e\n  \u003cimg alt=\"Current version\"\n       src=\"https://img.shields.io/github/tag/Simonwep/eslint-plugin-align-import.svg?color=3498DB\u0026label=version\u0026style=flat-square\"\u003e\n  \u003ca href=\"https://github.com/sponsors/Simonwep\"\u003e\u003cimg\n     alt=\"Support me\"\n     src=\"https://img.shields.io/badge/github-support-3498DB.svg?style=popout-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### What is this?\n\nThis plugin / rule will align all your import statements:\n\u003e from\n\n```js\nimport defaultExport from \"module-name\";\nimport * as name  from \"module-name\";\nimport { export1 } from \"module-name\";\nimport { export2 as alias1 } from \"module-name\";\nimport { export3 , export4 } from \"module-name\";\nimport { foo , bar } from \"module-name/path/to/specific/un-exported/file\";\nimport { export5 , export6 as alias7 } from \"module-name\";\nimport defaultExport2, { export8 } from \"module-name\";\nimport defaultExport3, * as name2 from \"module-name\";\n```\n\n\u003e to\n\n```js\nimport defaultExport                   from \"module-name\";\nimport * as name                       from \"module-name\";\nimport { export1 }                     from \"module-name\";\nimport { export2 as alias1 }           from \"module-name\";\nimport { export3 , export4 }           from \"module-name\";\nimport { foo , bar }                   from \"module-name/path/to/specific/un-exported/file\";\nimport { export5 , export6 as alias7 } from \"module-name\";\nimport defaultExport2, { export8 }     from \"module-name\";\nimport defaultExport3, * as name2      from \"module-name\";\n```\n\n\n### Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm install eslint --save-dev\n```\n\nNext, install `eslint-plugin-align-import`:\n\n```\n$ npm install eslint-plugin-align-import --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-align-import` globally.\n\n### Usage\n\nAdd `eslint-plugin-align-import` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n    \"plugins\": [\n        \"align-import\"\n    ]\n}\n```\n\nYou might have to update the [`no-multi-spaces`](https://eslint.org/docs/rules/no-multi-spaces) rule to allow multiple spaces in front of `from`:\n\n```json\n{\n    \"rules\": {\n        \"no-multi-spaces\": [\"error\", {\"exceptions\": {\"ImportDeclaration\": true}}]\n    }\n}\n```\n\nThere are two rules available:\n\n| rule | description |\n| ---- | ----------- |\n| [align-import/align-import](docs/rules/align-import.md) | Aligns your import statements, this is probably the rule you're looking for. |\n| [align-import/trim-import](docs/rules/trim-import.md) | This rule will remove any extra space around your `import` keyword. |\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwep%2Feslint-plugin-align-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonwep%2Feslint-plugin-align-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwep%2Feslint-plugin-align-import/lists"}