Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@fimbul/bifrost
Advanced tools
Compatiblity layer for TSLint rules and formatters.
Make sure to also read the full documentation of all available modules.
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.
npm install --save @fimbul/bifrost
# or
yarn add @fimbul/bifrost
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.
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.
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};
Apache-2.0 © Klaus Meinhardt
v0.17.0
:tada: This release introduces a plugin for TypeScript's LanguageService. This enables in-editor linting while you type. See the docs for more details.
:warning: Breaking Changes:
Failure
was renamed to Finding
throughout the codebaseResolver
adds a new required method getDefaultExtensions
Resolver#resolve
makes parameters basedir
and extensions
optionalRunner
requires a new service FileFilterFactory
suggestion
Features:
@fimbul/mithotyn
provides in-editor linting through a TypeScript LanguageService Pluginsuggestion
--fix
can no longer introduce syntax errorsasync-function-assignability
: checks methods and properties with computed namesasync-function-assignability
: checks method overloads individuallyFileFilterFactory
and FileFilter
allow customizing which files are linted@fimbul/ve
no longer includes the line break after the opening tag in the linted code@fimbul/ve
correctly adjusts the column of findings in the first line if there is no line break after the opening tagprefer-number-methods
: fixed finding locationBugfixes:
const enum
require
FAQs
Compatibility layer for TSLint rules
We found that @fimbul/bifrost demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.