1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-15 00:00:05 +00:00

feat(path-lint): add support for linting file names, add lint config schema

This commit is contained in:
Krishna Acondy
2021-03-24 19:37:51 +00:00
parent c88aa8b3f6
commit c92630a8f9
13 changed files with 237 additions and 18 deletions

View File

@@ -10,7 +10,6 @@ export interface LintRule {
name: string
description: string
message: string
test: (value: string, lineNumber: number) => Diagnostic[]
}
/**
@@ -18,6 +17,7 @@ export interface LintRule {
*/
export interface LineLintRule extends LintRule {
type: LintRuleType.Line
test: (value: string, lineNumber: number) => Diagnostic[]
}
/**
@@ -27,3 +27,11 @@ export interface FileLintRule extends LintRule {
type: LintRuleType.File
test: (value: string) => Diagnostic[]
}
/**
* A PathLintRule is run once per file.
*/
export interface PathLintRule extends LintRule {
type: LintRuleType.Path
test: (value: string) => Diagnostic[]
}