mirror of
https://github.com/sasjs/lint.git
synced 2026-01-13 07:10:05 +00:00
feat(lint): implement v1 with 3 rules - trailing spaces, encoded passwords and Doxygen header
This commit is contained in:
19
src/types/LintRule.ts
Normal file
19
src/types/LintRule.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Diagnostic } from './Diagnostic'
|
||||
import { LintRuleType } from './LintRuleType'
|
||||
|
||||
export interface LintRule {
|
||||
type: LintRuleType
|
||||
name: string
|
||||
description: string
|
||||
warning: string
|
||||
test: (value: string, lineNumber: number) => Diagnostic[]
|
||||
}
|
||||
|
||||
export interface LineLintRule extends LintRule {
|
||||
type: LintRuleType.Line
|
||||
}
|
||||
|
||||
export interface FileLintRule extends LintRule {
|
||||
type: LintRuleType.File
|
||||
test: (value: string) => Diagnostic[]
|
||||
}
|
||||
Reference in New Issue
Block a user