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:
@@ -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[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user