{"name":"eslint-import-resolver-alias","version":"1.1.1","description":"a simple Node behavior import resolution plugin for eslint-plugin-import, supporting module alias.","main":"index.js","scripts":{"release":"node build/release.js","test":"mocha test/test.js --require test/setup.js","cov":"istanbul cover node_modules/mocha/bin/_mocha -- test/test.js --require test/setup.js"},"keywords":["eslint","eslintplugin","eslint-plugin-import","eslint-import-resolver","import-resolver","resolver","resolve","resolution","alias","mapping","rewrite","rename","webpack","module","node-native","module-resolver","import","require"],"engines":{"node":">= 4"},"author":{"name":"johvin"},"license":"MIT","devDependencies":{"adjust-md-for-publish":"^1.0.0","builtin-modules":"^2.0.0","istanbul":"^1.0.0-alpha.2","mocha":"^3.2.0"},"peerDependencies":{"eslint-plugin-import":">=1.4.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/johvin/eslint-import-resolver-alias.git"},"bugs":{"url":"https://github.com/johvin/eslint-import-resolver-alias/issues"},"homepage":"https://github.com/johvin/eslint-import-resolver-alias#readme","_id":"eslint-import-resolver-alias@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"johvin","email":"johvin10@gmail.com"},"dist":{"integrity":"sha512-WJjkXU1aEQiBplyJNnnkKXVW0bWV8RA2tpub3+AGVdU+5EMpayg7du45l9fxIyIryLC3uPUOh85nDPIx+3A9UQ==","shasum":"c308bbcb1c0fd66a623837edec9ef7423f67a85a","tarball":"http://registry-npm.ywwl.com/eslint-import-resolver-alias/download/eslint-import-resolver-alias-1.1.1.tgz","fileCount":4,"unpackedSize":9621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbXrVmCRA9TVsSAnZWagAADr8P/AtYvNdS5yIvGWpxh2cq\n4LsVJjUGLCdJ9DfkWhyc0P/RHBOWD0ddbNngJskrTe00/GlU6vDsbQ7t9EIA\neRVgpe30VnwPqMgWQYoO5CvtKPi5qHrl9Avq0RPifRbQjAyRXp260hNNHDoP\nspvHSXOcfK/9oTlQ6mZO4bitgBnD05WJnWyD17xgDWi6NR4iiot5Pinnlmxv\nGX4WlbH3rjq88FYDpinT8cV0k5LTa3Hese8ixkLgDzwaYq9GLBNifgrgVerY\nPPtDi73WRtPuV9JjMHRmTiwTwxrh3VxTBAncNues55EKWpju2kQB+7uU6LHa\nB7vhy5/hroyULn5A4vq8eVobnT/BmUwVGNSdf5Rp5xusr6dqgCtqaOcpqDeZ\nh1rx7CAXvOoBYkf71OzMkMaZ6vNvUAS04L35Yew6WQX3xw68aIt6AvxfO1bc\nn+hyFiBrc0ih4/8+k/SiosdLS61x8XOPzuupDwVasioDG4DgMHQjiINMOdOQ\nuo2QJSezYufjZCe+9zDEC+5lSuRZq4Kfbns45iQoX5Iu6n1bI93QQNZa8i/Q\ngmFS3bAxfJoN+GqrM6z9EJq/wM1QrV0VROe0P1rxzG1pWDwGpyXztU9RRUaj\nVlIWab21HYfWBnYluGfw4uxUQfQYcOWEZA+qHI2HdB9siuBez0P3F1kpLbxw\nhK3c\r\n=VHoA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICAMFLjffP2YLVFwWxMIQr2jWSwh172RPgDPCu3ZIcUkAiAbuXLGr7WW+ZwUtvmA671DHJGkwuM6g2+dw8DbeEDRJg=="}],"size":3451,"noattachment":false,"key":"/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.1.tgz"},"maintainers":[{"name":"johvin","email":"johvin10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-import-resolver-alias_1.1.1_1532933478421_0.7225723683136331"},"_hasShrinkwrap":false,"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 >=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","publish_time":1532933478482,"_cnpm_publish_time":1532933478482,"dist-tags":{"latest":"1.1.2"}}