Socket
Socket
Sign inDemoInstall

@secretlint/types

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@secretlint/types - npm Package Compare versions

Comparing version 0.9.2 to 0.10.0

lib/SecretlintCoreSharedOptions.d.ts

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [0.10.0](https://github.com/secretlint/secretlint/compare/v0.9.2...v0.10.0) (2020-03-18)
### Features
* **core:** support locale options ([256a58c](https://github.com/secretlint/secretlint/commit/256a58c6cd03f585f15dd09972212ca6dfb70ac4))
## [0.9.2](https://github.com/secretlint/secretlint/compare/v0.9.1...v0.9.2) (2020-03-16)

@@ -8,0 +19,0 @@

3

lib/index.d.ts
export { SecretLintCoreIgnoreDescriptor, SecretLintCoreReportDescriptor, SecretLintCoreIgnoreMessage, SecretLintCoreResult, SecretLintCoreResultMessage, SecretLintCoreDescriptor, SecretLintUnionRuleCreator, SecretLintCoreDescriptorUnionRule, SecretLintCoreDescriptorRule, SecretLintCoreDescriptorRulePreset } from "./SecretLintCore";
export { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";
export { SecretLintRuleSeverityLevel } from "./SecretLintRuleSeverityLevel";

@@ -6,4 +7,4 @@ export { SecretLintRuleIgnoreDescriptor, SecretLintRuleCreator, SecretLintRuleContext, SecretLintRuleCreatorOptions, SecretLintRuleReportDescriptor, SecretLintRuleReportHandler, SecretLintRuleContentType } from "./SecretLintRule";

export { SecretLintRawSource, SecretLintSourceIdentifierNode, SecretLintSourceNodeLocation, SecretLintSourceNodePosition, SecretLintSourceNodeRange, SecretLintSourceValueNode } from "./SecretLintSource";
export { createRuleMessageTranslator, SecretLintRuleMessageTranslate, SecretLintRuleMessageTranslatorOptions, SecretLintRuleLocaleTag, SecretLintRuleLocalizeMessageMulti, SecretLintRuleLocalizeMessages, SecretLintRuleTranslatorResult } from "./SecretLintRuleTranslator";
export { SecretLintCreateRuleMessageTranslator, SecretLintRuleMessageTranslate, SecretLintRuleLocaleTag, SecretLintRuleLocalizeMessageMulti, SecretLintRuleLocalizeMessages, SecretLintRuleTranslatorResult, SecretLintRuleMessageTranslateData } from "./SecretLintRuleTranslator";
export { SecretLintSourceCode } from "./SecretLintSourceCode";
export { SecretLintConfigDescriptor, SecretLintConfigDescriptorRule, SecretLintConfigDescriptorRulePreset } from "./SecretLintConfigDescriptor";
import { SecretLintRuleCreator, SecretLintRuleCreatorOptions } from "./SecretLintRule";
import { SecretLintRulePresetCreator, SecretLintRulePresetCreatorOptions } from "./SecretLintRulePreset";
import { SecretLintRuleSeverityLevel } from "./SecretLintRuleSeverityLevel";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";
export declare type SecretLintConfigDescriptorRule<Options = SecretLintRuleCreatorOptions> = {

@@ -80,3 +81,4 @@ /**

export declare type SecretLintConfigDescriptor = {
sharedOptions?: SecretlintCoreSharedOptions;
rules: (SecretLintConfigDescriptorRule | SecretLintConfigDescriptorRulePreset)[];
};

@@ -5,2 +5,3 @@ import { SecretLintRuleIgnoreDescriptor, SecretLintRuleReportDescriptor, SecretLintRuleCreator, SecretLintRuleCreatorOptions } from "./SecretLintRule";

import { SecretLintRuleSeverityLevel } from "./SecretLintRuleSeverityLevel";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";
export declare type SecretLintCoreDescriptorRule<Options = SecretLintRuleCreatorOptions> = {

@@ -65,2 +66,3 @@ /**

export declare type SecretLintCoreDescriptor = {
sharedOptions?: SecretlintCoreSharedOptions;
rules: SecretLintCoreDescriptorUnionRule[];

@@ -67,0 +69,0 @@ };

import { SecretLintSourceIdentifierNode } from "./SecretLintSource";
import { createRuleMessageTranslator, SecretLintRuleLocalizeMessages, SecretLintRuleTranslatorResult } from "./SecretLintRuleTranslator";
import { SecretLintCreateRuleMessageTranslator, SecretLintRuleLocalizeMessages, SecretLintRuleTranslatorResult } from "./SecretLintRuleTranslator";
import { SecretLintSourceCode } from "./SecretLintSourceCode";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";
export declare type SecretLintRuleReportDescriptor = {

@@ -22,4 +23,4 @@ message: SecretLintRuleTranslatorResult<{}>;

export declare type SecretLintRuleContext = {
sharedOptions?: {};
createTranslator: createRuleMessageTranslator;
sharedOptions: SecretlintCoreSharedOptions;
createTranslator: SecretLintCreateRuleMessageTranslator<any>;
report(descriptor: SecretLintRuleReportDescriptor): void;

@@ -26,0 +27,0 @@ ignore(descriptor: SecretLintRuleIgnoreDescriptor): void;

import { SecretLintCoreDescriptorRule } from "./SecretLintCore";
import { SecretLintRuleCreator, SecretLintRuleCreatorOptions } from "./SecretLintRule";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";
export declare type SecretLintRulePresetContext = {
sharedOptions?: {};
sharedOptions: SecretlintCoreSharedOptions;
registerRule<Options = SecretLintRuleCreatorOptions>(rule: SecretLintRuleCreator<Options>, defaultValue?: Omit<SecretLintCoreDescriptorRule<Options>, "id" | "rule">): void;

@@ -6,0 +7,0 @@ };

@@ -10,11 +10,11 @@ export declare type SecretLintRuleLocaleTag = "en" | "cs" | "de" | "es" | "fr" | "it" | "ja" | "ko" | "pl" | "ru" | "tr" | "zh-CN" | "zh-TW" | string;

};
export declare type SecretLintRuleMessageTranslatorOptions = {
defaultLocale: SecretLintRuleLocaleTag;
};
export declare type SecretLintRuleTranslatorResult<T extends {}> = {
export declare type SecretLintRuleTranslatorResult<Data extends {}> = {
message: string;
messageId: string;
data: T | undefined;
data: Data | undefined;
};
export declare type SecretLintRuleMessageTranslate<T extends SecretLintRuleLocalizeMessages, Data extends {} = {}> = (message: keyof T, data?: Data) => SecretLintRuleTranslatorResult<Data>;
export declare type createRuleMessageTranslator = <T extends SecretLintRuleLocalizeMessages>(messages: T, options?: SecretLintRuleMessageTranslatorOptions) => SecretLintRuleMessageTranslate<T>;
export declare type SecretLintRuleMessageTranslateData = {
[index: string]: any;
};
export declare type SecretLintRuleMessageTranslate<T extends SecretLintRuleLocalizeMessages, Data extends SecretLintRuleMessageTranslateData = {}> = (message: keyof T, data?: Data) => SecretLintRuleTranslatorResult<Data>;
export declare type SecretLintCreateRuleMessageTranslator<T extends SecretLintRuleLocalizeMessages> = (messages: T) => SecretLintRuleMessageTranslate<T>;
{
"name": "@secretlint/types",
"version": "0.9.2",
"version": "0.10.0",
"description": "A typing package for @secretlint",

@@ -57,3 +57,3 @@ "keywords": [

},
"gitHead": "468d1ccd8b68d69031ced000b1a7bc980eabfc84"
"gitHead": "03d8ebf27b6a6723e846731e150acc77603290b2"
}

@@ -15,2 +15,3 @@ // Core Interface

} from "./SecretLintCore";
export { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";
export { SecretLintRuleSeverityLevel } from "./SecretLintRuleSeverityLevel";

@@ -43,9 +44,9 @@ // Rule interface

export {
createRuleMessageTranslator,
SecretLintCreateRuleMessageTranslator,
SecretLintRuleMessageTranslate,
SecretLintRuleMessageTranslatorOptions,
SecretLintRuleLocaleTag,
SecretLintRuleLocalizeMessageMulti,
SecretLintRuleLocalizeMessages,
SecretLintRuleTranslatorResult
SecretLintRuleTranslatorResult,
SecretLintRuleMessageTranslateData
} from "./SecretLintRuleTranslator";

@@ -52,0 +53,0 @@ export { SecretLintSourceCode } from "./SecretLintSourceCode";

import { SecretLintRuleCreator, SecretLintRuleCreatorOptions } from "./SecretLintRule";
import { SecretLintRulePresetCreator, SecretLintRulePresetCreatorOptions } from "./SecretLintRulePreset";
import { SecretLintRuleSeverityLevel } from "./SecretLintRuleSeverityLevel";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";

@@ -84,3 +85,4 @@ export type SecretLintConfigDescriptorRule<Options = SecretLintRuleCreatorOptions> = {

export type SecretLintConfigDescriptor = {
sharedOptions?: SecretlintCoreSharedOptions;
rules: (SecretLintConfigDescriptorRule | SecretLintConfigDescriptorRulePreset)[];
};

@@ -11,2 +11,3 @@ // Core Input and Output

import { SecretLintRuleSeverityLevel } from "./SecretLintRuleSeverityLevel";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";

@@ -75,3 +76,5 @@ export type SecretLintCoreDescriptorRule<Options = SecretLintRuleCreatorOptions> = {

> = SecretLintCoreDescriptorRule<Options> | SecretLintCoreDescriptorRulePreset<Options>;
export type SecretLintCoreDescriptor = {
sharedOptions?: SecretlintCoreSharedOptions;
rules: SecretLintCoreDescriptorUnionRule[];

@@ -78,0 +81,0 @@ };

// Rule Interfaces
import { SecretLintSourceIdentifierNode } from "./SecretLintSource";
import {
createRuleMessageTranslator,
SecretLintCreateRuleMessageTranslator,
SecretLintRuleLocalizeMessages,

@@ -9,2 +9,3 @@ SecretLintRuleTranslatorResult

import { SecretLintSourceCode } from "./SecretLintSourceCode";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";

@@ -28,5 +29,6 @@ export type SecretLintRuleReportDescriptor = {

};
export type SecretLintRuleContext = {
sharedOptions?: {};
createTranslator: createRuleMessageTranslator;
sharedOptions: SecretlintCoreSharedOptions;
createTranslator: SecretLintCreateRuleMessageTranslator<any>;
report(descriptor: SecretLintRuleReportDescriptor): void;

@@ -33,0 +35,0 @@ ignore(descriptor: SecretLintRuleIgnoreDescriptor): void;

// Rule Interfaces
import { SecretLintCoreDescriptorRule } from "./SecretLintCore";
import { SecretLintRuleCreator, SecretLintRuleCreatorOptions } from "./SecretLintRule";
import { SecretlintCoreSharedOptions } from "./SecretlintCoreSharedOptions";
export type SecretLintRulePresetContext = {
sharedOptions?: {};
sharedOptions: SecretlintCoreSharedOptions;
registerRule<Options = SecretLintRuleCreatorOptions>(

@@ -8,0 +9,0 @@ rule: SecretLintRuleCreator<Options>,

@@ -24,19 +24,16 @@ // TODO: add locale

export type SecretLintRuleMessageTranslatorOptions = {
defaultLocale: SecretLintRuleLocaleTag;
};
export type SecretLintRuleTranslatorResult<T extends {}> = {
export type SecretLintRuleTranslatorResult<Data extends {}> = {
message: string;
messageId: string;
data: T | undefined;
data: Data | undefined;
};
export type SecretLintRuleMessageTranslate<T extends SecretLintRuleLocalizeMessages, Data extends {} = {}> = (
message: keyof T,
data?: Data
) => SecretLintRuleTranslatorResult<Data>;
export type SecretLintRuleMessageTranslateData = { [index: string]: any };
export type SecretLintRuleMessageTranslate<
T extends SecretLintRuleLocalizeMessages,
Data extends SecretLintRuleMessageTranslateData = {}
> = (message: keyof T, data?: Data) => SecretLintRuleTranslatorResult<Data>;
export type createRuleMessageTranslator = <T extends SecretLintRuleLocalizeMessages>(
messages: T,
options?: SecretLintRuleMessageTranslatorOptions
export type SecretLintCreateRuleMessageTranslator<T extends SecretLintRuleLocalizeMessages> = (
messages: T
) => SecretLintRuleMessageTranslate<T>;
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