{"name":"@fimbul/bifrost","version":"0.24.0-dev.20210214","description":"Compatibility layer for TSLint rules","main":"src/index","types":"src/index","author":{"name":"Klaus Meinhardt"},"license":"Apache-2.0","bugs":{"url":"https://github.com/fimbullinter/wotan/issues"},"homepage":"https://github.com/fimbullinter/wotan#readme","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/fimbullinter/wotan.git","directory":"packages/bifrost"},"keywords":["wotan","rules","formatters","tslint","compatibility"],"peerDependencies":{"tslint":"^5.0.0","typescript":">= 4.0.0 || >= 4.2.0-dev"},"dependencies":{"@fimbul/ymir":"0.24.0-dev.20210214","get-caller-file":"^2.0.0","tslib":"^2.0.0","tsutils":"^3.5.0"},"devDependencies":{"@types/get-caller-file":"^1.0.0"},"readme":"# Bifröst\n\nCompatiblity layer for TSLint rules and formatters.\n\n[![npm version](https://img.shields.io/npm/v/@fimbul/bifrost.svg)](https://www.npmjs.com/package/@fimbul/bifrost)\n[![npm downloads](https://img.shields.io/npm/dm/@fimbul/bifrost.svg)](https://www.npmjs.com/package/@fimbul/bifrost)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovateapp.com/)\n[![CircleCI](https://circleci.com/gh/fimbullinter/wotan/tree/master.svg?style=shield)](https://circleci.com/gh/fimbullinter/wotan/tree/master)\n[![Build status](https://ci.appveyor.com/api/projects/status/a28dpupxvjljibq3/branch/master?svg=true)](https://ci.appveyor.com/project/ajafff/wotan/branch/master)\n[![codecov](https://codecov.io/gh/fimbullinter/wotan/branch/master/graph/badge.svg)](https://codecov.io/gh/fimbullinter/wotan)\n[![Join the chat at https://gitter.im/fimbullinter/wotan](https://badges.gitter.im/fimbullinter/wotan.svg)](https://gitter.im/fimbullinter/wotan)\n\nMake sure to also read the [full documentation of all available modules](https://github.com/fimbullinter/wotan#readme).\n\n## Purpose\n\nAllows TSLint rule authors to provide the same rules for Wotan without any refactoring.\nAlthough `@fimbul/heimdall` already allows users to use your rules and formatters in Wotan, they still need to remember to use `-m @fimbul/heimdall` when running Wotan.\nYou can help these users by providing your rules in a format that Wotan understands without any plugin.\n\nIt also provides the exact opposite functionality: using rules originally written for Fimbullinter (wotan) as TSLint rule.\n\n## Installation\n\n```sh\nnpm install --save @fimbul/bifrost\n# or\nyarn add @fimbul/bifrost\n```\n\n## Using TSLint Rules and Formatters in Wotan\n\n### Rules\n\nGiven a TSLint rule `my-foo` in a file `myFooRule.ts`, you simply create a file `my-foo.ts` with the following content:\n\n```ts\nimport {wrapTslintRule} from '@fimbul/bifrost';\nimport {Rule} from './myFooRule.ts';\n\nconst Wrapped = wrapTslintRule(Rule, 'my-foo');\nexport {Wrapped as Rule};\n```\n\nIf you want to use a different directory for your TSLint rules and their Wotan wrapper, you just need to adjust the paths in the above example.\n\n### Formatters\n\nGiven a TSLint formatter `my-foo` in a file `myFooFormatter.ts`, you simply create a file `my-foo.ts` with the following content:\n\n```ts\nimport {wrapTslintFormatter} from '@fimbul/bifrost';\nimport {Formatter} from './myFooFormatter.ts';\n\nconst Wrapped = wrapTslintFormatter(Formatter);\nexport {Wrapped as Formatter};\n```\n\nNote that findings with severity `suggestion` are reported as `warning` through TSLint formatters.\n\n## Using Fimbullinter Rules in TSLint\n\nGiven a Fimbullinter rule `my-foo` in a file `my-foo.ts`, you simply create a file `myFooRule.ts` with the following content:\n\n```ts\nimport {wrapRuleForTslint} from '@fimbul/bifrost';\nimport {Rule} from './my-foo.ts';\n\nconst Wrapped = wrapRuleForTslint(Rule);\nexport {Wrapped as Rule};\n```\n\n## License\n\nApache-2.0 © [Klaus Meinhardt](https://github.com/ajafff)\n","readmeFilename":"README.md","_id":"@fimbul/bifrost@0.24.0-dev.20210214","_nodeVersion":"15.8.0","_npmVersion":"7.5.1","dist":{"integrity":"sha512-Ml+JYi/LJH+5P+MrwaHD8ody4a+iwcNvhShdp5vgAKw/8fA3pPMTmv2rh0puY4JOgFrizuPN+Fwf4jxb6Qqgrg==","shasum":"1bcf2a33d0d750c4098d304449fde5130d0e4299","tarball":"http://registry-npm.ywwl.com/@fimbul/bifrost/download/@fimbul/bifrost-0.24.0-dev.20210214.tgz","fileCount":7,"unpackedSize":28294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKOJaCRA9TVsSAnZWagAA3gEQAJvZY3WYm4bemXpnp8xT\nFg/2W818/qjOQAINA4/jCsmxvAAlJkOIb6VlsIwyjQuhAm5GWXN/lbnTxnim\nYt+WQcwBfhP6z1m0VYN4zqA7+tpf0SF87cTyPKsfthPLGVkw5N2C3pay12vP\nNOPjbpQVtQty3pVPxsEoDr7SvmC/gEdYdcS2b36NOpU3xbCyDPaV47OwX0NU\n84eWOEjYr3KWJpE6o+5eJsENEGYyvoJ46KghMvVVT/ohL3Gr28nk3ZuXhO9r\nkImQYcnMTLbmTCIu3IQVAKVfaUxnKjPY3tDR0CG1JFpzlmLoN3gPnFW7ON+6\nJsIGwoFwOuH6YMtwM7g3GslGEXT1Sh27DSr2Jp+3MfynKD0n4d8H6SiEvG0D\nQLb4FXiLDjH2eBVfsuldrQhYg2vxTbblMlrNSKSKVtecowYF8qkwLMuBviiQ\nAmhroKY59S/EZJ2lOxN+16nFmlxqESIqbooEC9St3nHLiwXPIbIyjYBlGnVP\nao3F23qfyEkk8nxwDH9QA6pmeUJysClUWNL5/5FyKvvMGJZa3SEXyWO9KI8P\nXyEIkGbCksGBxxuON46suow9h3PNr7WzwlDvoAWuiAOqaxY40kEzhin+kgLJ\nqo/02CmR2jw+ns6+DHNlFBjhUZTgPtX7biNfos+dhp9jp1jpG9HiL4K1q3vT\nCjui\r\n=IcVi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTTxYn6Bd0vG8zjSjMyf12Mt48+xRrmW7Q9PzzpqcyhwIhAJlG24bm0HvsCo0n1apry7KwupWdMO/cFZx6sFEnWhFg"}],"size":9153,"noattachment":false,"key":"/@fimbul/bifrost/-/@fimbul/bifrost-0.24.0-dev.20210214.tgz"},"_npmUser":{"name":"harbard","email":"klaus.meinhardt1@gmail.com"},"directories":{},"maintainers":[{"name":"ajaff","email":"klaus.meinhardt1@gmail.com"},{"name":"harbard","email":"klaus.meinhardt1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bifrost_0.24.0-dev.20210214_1613292121610_0.15164373538272446"},"_hasShrinkwrap":false,"publish_time":1613292121706,"_cnpm_publish_time":1613292121706,"dist-tags":{"latest":"0.24.0","next":"0.24.0"}}