{"id":13671224,"url":"https://github.com/johvin/eslint-import-resolver-alias","last_synced_at":"2025-10-10T08:36:30.240Z","repository":{"id":52114169,"uuid":"77328513","full_name":"johvin/eslint-import-resolver-alias","owner":"johvin","description":"a simple Node behavior import resolution plugin for eslint-plugin-import, supporting module alias","archived":false,"fork":false,"pushed_at":"2022-08-03T08:06:04.000Z","size":37,"stargazers_count":183,"open_issues_count":12,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T20:03:16.606Z","etag":null,"topics":["eslint","eslint-plugin","eslint-plugin-import","import-resolver","module-alias","module-rename","resolver-alias"],"latest_commit_sha":null,"homepage":null,"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/johvin.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":"2016-12-25T14:04:22.000Z","updated_at":"2025-04-06T11:24:59.000Z","dependencies_parsed_at":"2022-09-05T02:41:52.050Z","dependency_job_id":null,"html_url":"https://github.com/johvin/eslint-import-resolver-alias","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/johvin/eslint-import-resolver-alias","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Feslint-import-resolver-alias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Feslint-import-resolver-alias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Feslint-import-resolver-alias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Feslint-import-resolver-alias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johvin","download_url":"https://codeload.github.com/johvin/eslint-import-resolver-alias/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Feslint-import-resolver-alias/sbom","scorecard":{"id":529325,"data":{"date":"2025-08-11","repo":{"name":"github.com/johvin/eslint-import-resolver-alias","commit":"a69b4823b0e5440c5583f4cf43801bdb7b655cff"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T05:19:43.316Z","repository_id":52114169,"created_at":"2025-08-20T05:19:43.316Z","updated_at":"2025-08-20T05:19:43.316Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003276,"owners_count":26083555,"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-10T02:00:06.843Z","response_time":62,"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","eslint-plugin-import","import-resolver","module-alias","module-rename","resolver-alias"],"created_at":"2024-08-02T09:01:03.464Z","updated_at":"2025-10-10T08:36:30.217Z","avatar_url":"https://github.com/johvin.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# eslint-import-resolver-alias\n\n[![Version npm][version]](http://browsenpm.org/package/eslint-import-resolver-alias)\n![Version node][node]\n[![Build Status][build]](https://travis-ci.org/johvin/eslint-import-resolver-alias)\n[![Download][download]](https://www.npmjs.com/package/eslint-import-resolver-alias)\n[![Dependencies][david]](https://david-dm.org/johvin/eslint-import-resolver-alias)\n![peerDependencies][peer]\n[![Coverage Status][cover]](https://coveralls.io/github/johvin/eslint-import-resolver-alias?branch=master)\n[![Known Vulnerabilities][vulnerabilities]](https://snyk.io/test/npm/eslint-import-resolver-alias)\n[![License][license]](https://opensource.org/licenses/MIT)\n\n[version]: http://img.shields.io/npm/v/eslint-import-resolver-alias.svg?style=flat-square\n[node]: https://img.shields.io/node/v/eslint-import-resolver-alias/latest.svg?style=flat-square\n[build]: http://img.shields.io/travis/johvin/eslint-import-resolver-alias/master.svg?style=flat-square\n[download]: https://img.shields.io/npm/dm/eslint-import-resolver-alias.svg?style=flat-square\n[david]: https://img.shields.io/david/johvin/eslint-import-resolver-alias.svg?style=flat-square\n[peer]: https://img.shields.io/david/peer/johvin/eslint-import-resolver-alias.svg?style=flat-square\n[cover]: http://img.shields.io/coveralls/johvin/eslint-import-resolver-alias/master.svg?style=flat-square\n[vulnerabilities]: https://snyk.io/test/npm/eslint-import-resolver-alias/badge.svg?style=flat-square\n[license]: https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat-square\n\n\nThis is a simple Node.js module import resolution plugin for [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import), which supports native Node.js module resolution, module alias/mapping and custom file extensions.\n\n\n## Installation\n\nPrerequisites: Node.js \u003e=4.x and corresponding version of npm.\n\n```shell\nnpm install eslint-plugin-import eslint-import-resolver-alias --save-dev\n```\n\n\n## Usage\n\nPass this resolver and its parameters to `eslint-plugin-import` using your `eslint` config file, `.eslintrc` or `.eslintrc.js`.\n\n```js\n// .eslintrc.js\nmodule.exports = {\n  settings: {\n    'import/resolver': {\n      alias: {\n        map: [\n          ['babel-polyfill', 'babel-polyfill/dist/polyfill.min.js'],\n          ['helper', './utils/helper'],\n          ['material-ui/DatePicker', '../custom/DatePicker'],\n          ['material-ui', 'material-ui-ie10']\n        ],\n        extensions: ['.ts', '.js', '.jsx', '.json']\n      }\n    }\n  }\n};\n```\n\nNote:\n\n- The alias config object contains two properties, `map` and `extensions`, both of which are array types\n- The item of `map` array is also array type which contains 2 string\n    + The first string represents the alias of module name or path\n    + The second string represents the actual module name or path\n- The `map` item `['helper', './utils/helper']` means that the modules which match `helper` or `helper/*` will be resolved to `./utils/helper` or `./utils/helper/*` which are located relative to the `process current working directory` (almost the project root directory). If you just want to resolve `helper` to `./utils/helper`, use `['^helper$', './utils/helper']` instead. See [issue #3](https://github.com/johvin/eslint-import-resolver-alias/issues/3)\n- The order of 'material-ui/DatePicker' and 'material-ui' cannot be reversed, otherwise the alias rule 'material-ui/DatePicker' does not work\n- The default value of `extensions` property is `['.js', '.json', '.node']` if it is assigned to an empty array or not specified\n\n*If the `extensions` property is not specified, the config object can be simplified to the `map` array.*\n\n```js\n// .eslintrc.js\nmodule.exports = {\n  settings: {\n    'import/resolver': {\n      alias: [\n        ['babel-polyfill', 'babel-polyfill/dist/polyfill.min.js'],\n        ['helper', './utils/helper'],\n        ['material-ui/DatePicker', '../custom/DatePicker'],\n        ['material-ui', 'material-ui-ie10']\n      ]\n    }\n  }\n};\n```\n\nWhen the config is not a valid object (such as `true`), the resolver falls back to native Node.js module resolution.\n\n```js\n// .eslintrc.js\nmodule.exports = {\n  settings: {\n    'import/resolver': {\n      alias: true\n    }\n  }\n};\n```\n\n## CHANGELOG\n\n[`CHANGELOG`](./CHANGELOG.md)\n\n## References\n\n- eslint-plugin-import/no-extraneous-dependencies\n- eslint-plugin-import/no-unresolved\n- eslint-module-utils/resolve\n- resolve\n- eslint-import-resolver-node\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohvin%2Feslint-import-resolver-alias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohvin%2Feslint-import-resolver-alias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohvin%2Feslint-import-resolver-alias/lists"}