@slippy-lint/slippy
Version:
A simple but powerful linter for Solidity
45 lines (44 loc) • 1.71 kB
TypeScript
import { DiagnosticToReport } from "./rules/types.js";
import { TextRange } from "@nomicfoundation/slang/cst";
import { File as SlangFile } from "@nomicfoundation/slang/compilation";
declare const disableNextLineMarker = "slippy-disable-next-line";
type DisableNextLineDirective = {
marker: typeof disableNextLineMarker;
disabledLine: number;
disabledRules: string[];
textRange: TextRange;
};
declare const disableLineMarker = "slippy-disable-line";
type DisableLineDirective = {
marker: typeof disableLineMarker;
disabledLine: number;
disabledRules: string[];
textRange: TextRange;
};
declare const disablePreviousLineMarker = "slippy-disable-previous-line";
type DisablePreviousLineDirective = {
marker: typeof disablePreviousLineMarker;
disabledLine: number;
disabledRules: string[];
textRange: TextRange;
};
declare const disableMarker = "slippy-disable";
type DisableDirective = {
marker: typeof disableMarker;
endLine: number;
endColumn: number;
disabledRules: string[];
textRange: TextRange;
};
declare const enableMarker = "slippy-enable";
type EnableDirective = {
marker: typeof enableMarker;
endLine: number;
endColumn: number;
enabledRules: string[];
textRange: TextRange;
};
type CommentDirective = DisableNextLineDirective | DisableLineDirective | DisablePreviousLineDirective | DisableDirective | EnableDirective;
export declare function filterByCommentDirectives(content: string, diagnostics: DiagnosticToReport[], file: SlangFile, languageVersion: string): DiagnosticToReport[];
export declare function extractCommentDirectives(content: string, languageVersion: string): CommentDirective[];
export {};