New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fimbul/ymir

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fimbul/ymir - npm Package Compare versions

Comparing version 0.6.0-dev.20180321 to 0.6.0-dev.20180322

2

package.json
{
"name": "@fimbul/ymir",
"version": "0.6.0-dev.20180321",
"version": "0.6.0-dev.20180322",
"description": "Core library for the Fimbullinter project",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -49,3 +49,3 @@ import 'reflect-metadata';

readonly deprecated?: boolean | string;
supports?(sourceFile: ts.SourceFile, context: RuleSupportsContext): boolean;
supports?: RuleSupportsPredicate;
new (context: RuleContext): AbstractRule;

@@ -75,2 +75,6 @@ }

export declare type Settings = ReadonlyMap<string, {} | null | undefined>;
export declare function isTypescriptFile(sourceFile: ts.SourceFile): boolean;
export declare function typescriptOnly<T extends typeof AbstractRule>(target: T): void;
export declare function excludeDeclarationFiles<T extends typeof AbstractRule>(target: T): void;
export declare type RuleSupportsPredicate = (sourceFile: ts.SourceFile, context: RuleSupportsContext) => boolean;
export declare abstract class AbstractRule {

@@ -80,3 +84,3 @@ readonly context: RuleContext;

static deprecated: boolean | string;
static supports?: (sourceFile: ts.SourceFile, context: RuleSupportsContext) => boolean;
static supports?: RuleSupportsPredicate;
static validateConfig?(config: any): string[] | string | undefined;

@@ -83,0 +87,0 @@ readonly sourceFile: ts.SourceFile;

@@ -42,2 +42,19 @@ "use strict";

exports.TypedRuleContext = TypedRuleContext;
function combinePredicates(existing, predicate) {
if (existing === undefined)
return predicate;
return (sourceFile, context) => predicate(sourceFile, context) && existing(sourceFile, context);
}
function isTypescriptFile(sourceFile) {
return /\.tsx?$/.test(sourceFile.fileName);
}
exports.isTypescriptFile = isTypescriptFile;
function typescriptOnly(target) {
target.supports = combinePredicates(target.supports, isTypescriptFile);
}
exports.typescriptOnly = typescriptOnly;
function excludeDeclarationFiles(target) {
target.supports = combinePredicates(target.supports, (sourceFile) => !sourceFile.isDeclarationFile);
}
exports.excludeDeclarationFiles = excludeDeclarationFiles;
class AbstractRule {

@@ -44,0 +61,0 @@ constructor(context) {

Sorry, the diff of this file is not supported yet

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