Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fimbul/bifrost

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fimbul/bifrost

Compatibility layer for TSLint rules

  • 0.24.0
  • next
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Bifröst

Compatiblity layer for TSLint rules and formatters.

npm version npm downloads Renovate enabled CircleCI Build status codecov Join the chat at https://gitter.im/fimbullinter/wotan

Make sure to also read the full documentation of all available modules.

Purpose

Allows TSLint rule authors to provide the same rules for Wotan without any refactoring. Although @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. You can help these users by providing your rules in a format that Wotan understands without any plugin.

It also provides the exact opposite functionality: using rules originally written for Fimbullinter (wotan) as TSLint rule.

Installation

npm install --save @fimbul/bifrost
# or
yarn add @fimbul/bifrost

Using TSLint Rules and Formatters in Wotan

Rules

Given a TSLint rule my-foo in a file myFooRule.ts, you simply create a file my-foo.ts with the following content:

import {wrapTslintRule} from '@fimbul/bifrost';
import {Rule} from './myFooRule.ts';

const Wrapped = wrapTslintRule(Rule, 'my-foo');
export {Wrapped as Rule};

If 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.

Formatters

Given a TSLint formatter my-foo in a file myFooFormatter.ts, you simply create a file my-foo.ts with the following content:

import {wrapTslintFormatter} from '@fimbul/bifrost';
import {Formatter} from './myFooFormatter.ts';

const Wrapped = wrapTslintFormatter(Formatter);
export {Wrapped as Formatter};

Note that findings with severity suggestion are reported as warning through TSLint formatters.

Using Fimbullinter Rules in TSLint

Given a Fimbullinter rule my-foo in a file my-foo.ts, you simply create a file myFooRule.ts with the following content:

import {wrapRuleForTslint} from '@fimbul/bifrost';
import {Rule} from './my-foo.ts';

const Wrapped = wrapRuleForTslint(Rule);
export {Wrapped as Rule};

License

Apache-2.0 © Klaus Meinhardt

Keywords

FAQs

Package last updated on 19 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc