{"name":"eslint-import-resolver-alias","version":"1.1.2","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.2","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"johvin","email":"johvin10@gmail.com"},"dist":{"integrity":"sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==","shasum":"297062890e31e4d6651eb5eba9534e1f6e68fc97","tarball":"http://registry-npm.ywwl.com/eslint-import-resolver-alias/download/eslint-import-resolver-alias-1.1.2.tgz","fileCount":4,"unpackedSize":9938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcC724CRA9TVsSAnZWagAA+YMP/juev3M46hRdnkS83vO5\nFIUJ8uTs82WUlEHwGRLr0nEW7IkM+X0jFArmO4HnV2x2uklYX18Vw4kpXTka\nJMw2x8BzPn3SrvRHHUSGnUkpA+1vhPtu815nWn51WEuZyvVUHsAIMpRp03fh\nZgqqkxxc8vLkoIoRBL9dhzK0FooZtVxF8QYprhPAuMYceKQ9Zh7YxqEPEY3h\nmSA2LEYWVgXZsjgw0Qcrct4Q9wdExTNpbVlx2/EUvG9YNlDHMZ+TZTjbM1Va\ndilB/J6glE8K/jVLCAGGNczoKwbQEV01PD5kSfvRv8DqQd9GCEUGU91qi6PX\n/D2CcPE8hV1OJQHh9SG5aQtM8Jg2c3ipRcGyITHpSi5t+R+3FYaLjLrM8B+y\n6mniCEIZRdvzZVPO1H3vrwrqLFA/lsJqOVpOJ8i/W9EKtuvNZgXJ1zMh8Snd\nRT230afk0aU4jelX6TR2G+IPh8CfICKh+ofVBluW4ZRVqP1vgWXYcaPdbhuP\nft8q+EVe2hQYS0bAp8nM/QB+I5NeZTAPEwylOqkO1gBidOx7yMGIgyEksfAz\nqq5TLiB8QPKWyR/0t4nXJbgxybCZ+8zjijencASKMT8oLTp0CPb8vBzBykAt\nMcoQMtLiebek2fClZX/Cgb/Vf2gTtNSNVn2ENU0d2qibnV96qp04kMmsAplc\n/Uu6\r\n=O1ev\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCI+3hyR7lG/60lOA6HPLQxP0GDR7Z4CYRyOtp+OPTNjgIgJuqgTux0DkaEmFTdcDu63VlXrEbOtmw4KhvJbDukVaM="}],"size":3514,"noattachment":false,"key":"/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.2.tgz"},"maintainers":[{"name":"johvin","email":"johvin10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-import-resolver-alias_1.1.2_1544273335231_0.8344765979330955"},"_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":1544273335342,"_cnpm_publish_time":1544273335342,"dist-tags":{"latest":"1.1.2"}}