@fimbul/ymir
Advanced tools
Comparing version 0.17.0-dev.20181218 to 0.17.0-dev.20181221
{ | ||
"name": "@fimbul/ymir", | ||
"version": "0.17.0-dev.20181218", | ||
"version": "0.17.0-dev.20181221", | ||
"description": "Core library for the Fimbullinter project", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -13,3 +13,3 @@ import 'reflect-metadata'; | ||
content: string; | ||
failures: ReadonlyArray<Failure>; | ||
findings: ReadonlyArray<Finding>; | ||
fixes: number; | ||
@@ -30,5 +30,5 @@ } | ||
} | ||
export interface Failure { | ||
readonly start: FailurePosition; | ||
readonly end: FailurePosition; | ||
export interface Finding { | ||
readonly start: FindingPosition; | ||
readonly end: FindingPosition; | ||
readonly message: string; | ||
@@ -39,6 +39,6 @@ readonly ruleName: string; | ||
} | ||
export declare const Failure: { | ||
compare(a: Failure, b: Failure): number; | ||
export declare const Finding: { | ||
compare(a: Finding, b: Finding): number; | ||
}; | ||
export interface FailurePosition { | ||
export interface FindingPosition { | ||
readonly line: number; | ||
@@ -48,3 +48,3 @@ readonly character: number; | ||
} | ||
export declare type Severity = 'error' | 'warning'; | ||
export declare type Severity = 'error' | 'warning' | 'suggestion'; | ||
export interface RuleConstructor<T extends RuleContext = RuleContext> { | ||
@@ -66,3 +66,3 @@ readonly requiresTypeInformation: boolean; | ||
readonly options: {} | null | undefined; | ||
addFailure(start: number, end: number, message: string, fix?: Replacement | ReadonlyArray<Replacement>): void; | ||
addFinding(start: number, end: number, message: string, fix?: Replacement | ReadonlyArray<Replacement>): void; | ||
getFlatAst(): ReadonlyArray<ts.Node>; | ||
@@ -95,4 +95,4 @@ getWrappedAst(): WrappedAst; | ||
abstract apply(): void; | ||
addFailure(start: number, end: number, message: string, fix?: Replacement | ReadonlyArray<Replacement>): void; | ||
addFailureAtNode(node: ts.Node, message: string, fix?: Replacement | ReadonlyArray<Replacement>): void; | ||
addFinding(start: number, end: number, message: string, fix?: Replacement | ReadonlyArray<Replacement>): void; | ||
addFindingAtNode(node: ts.Node, message: string, fix?: Replacement | ReadonlyArray<Replacement>): void; | ||
} | ||
@@ -137,3 +137,3 @@ export declare abstract class ConfigurableRule<T> extends AbstractRule { | ||
type RulesDirectoryMap = ReadonlyMap<string, ReadonlyArray<string>>; | ||
type RuleSeverity = 'off' | 'warning' | 'error'; | ||
type RuleSeverity = 'off' | 'warning' | 'error' | 'suggestion'; | ||
interface RuleConfig { | ||
@@ -215,3 +215,3 @@ readonly severity?: RuleSeverity; | ||
abstract preprocess(): string; | ||
abstract postprocess(failures: ReadonlyArray<Failure>): ReadonlyArray<Failure>; | ||
abstract postprocess(findings: ReadonlyArray<Finding>): ReadonlyArray<Finding>; | ||
abstract updateSource(newSource: string, changeRange: ts.TextChangeRange): ProcessorUpdateResult; | ||
@@ -303,8 +303,8 @@ } | ||
} | ||
export interface FailureFilterFactory { | ||
create(context: FailureFilterContext): FailureFilter; | ||
export interface FindingFilterFactory { | ||
create(context: FindingFilterContext): FindingFilter; | ||
} | ||
export declare abstract class FailureFilterFactory { | ||
export declare abstract class FindingFilterFactory { | ||
} | ||
export interface FailureFilterContext { | ||
export interface FindingFilterContext { | ||
sourceFile: ts.SourceFile; | ||
@@ -314,4 +314,4 @@ ruleNames: ReadonlyArray<string>; | ||
} | ||
export interface FailureFilter { | ||
filter(failure: Failure): boolean; | ||
export interface FindingFilter { | ||
filter(finding: Finding): boolean; | ||
} | ||
@@ -318,0 +318,0 @@ export interface LineSwitchParser { |
@@ -24,3 +24,3 @@ "use strict"; | ||
}; | ||
exports.Failure = { | ||
exports.Finding = { | ||
compare(a, b) { | ||
@@ -85,7 +85,7 @@ return a.start.position - b.start.position | ||
} | ||
addFailure(start, end, message, fix) { | ||
return this.context.addFailure(start, end, message, fix); | ||
addFinding(start, end, message, fix) { | ||
return this.context.addFinding(start, end, message, fix); | ||
} | ||
addFailureAtNode(node, message, fix) { | ||
return this.addFailure(node.getStart(this.sourceFile), node.end, message, fix); | ||
addFindingAtNode(node, message, fix) { | ||
return this.addFinding(node.getStart(this.sourceFile), node.end, message, fix); | ||
} | ||
@@ -180,5 +180,5 @@ } | ||
exports.DirectoryService = DirectoryService; | ||
class FailureFilterFactory { | ||
class FindingFilterFactory { | ||
} | ||
exports.FailureFilterFactory = FailureFilterFactory; | ||
exports.FindingFilterFactory = FindingFilterFactory; | ||
class LineSwitchParser { | ||
@@ -185,0 +185,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36075