markuplint
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -1,3 +0,3 @@ | ||
import Rule, { VerifiedReport } from './rule'; | ||
import Rule, { VerifiedResult } from './rule'; | ||
import { Ruleset } from './ruleset'; | ||
export declare function verify(html: string, ruleset: Ruleset, rules: Rule[]): VerifiedReport[]; | ||
export declare function verify(html: string, ruleset: Ruleset, rules: Rule[]): VerifiedResult[]; |
@@ -1,4 +0,4 @@ | ||
import Rule, { VerifiedReport } from './rule'; | ||
import Rule, { VerifiedResult } from './rule'; | ||
import { Ruleset } from './ruleset'; | ||
export declare function verify(html: string, ruleset: Ruleset, rules: Rule[]): Promise<VerifiedReport[]>; | ||
export declare function verifyFile(filePath: string, ruleset?: Ruleset, rules?: Rule[]): Promise<VerifiedReport[]>; | ||
export declare function verify(html: string, ruleset: Ruleset, rules: Rule[]): Promise<VerifiedResult[]>; | ||
export declare function verifyFile(filePath: string, ruleset?: Ruleset, rules?: Rule[]): Promise<VerifiedResult[]>; |
import { Document } from './parser'; | ||
import { Ruleset } from './ruleset'; | ||
export interface VerifiedReport { | ||
export interface VerifiedResult { | ||
level: RuleLevel; | ||
@@ -22,4 +22,4 @@ message: string; | ||
readonly defaultValue: T; | ||
abstract verify(document: Document, config: RuleConfig<T, O>, ruleset: Ruleset): VerifiedReport[]; | ||
abstract verify(document: Document, config: RuleConfig<T, O>, ruleset: Ruleset): VerifiedResult[]; | ||
optimizeOption(option: RuleOption<T, O> | boolean): RuleConfig<T, O>; | ||
} |
import { Document } from '../parser'; | ||
import Rule, { RuleConfig, VerifiedReport } from '../rule'; | ||
import Rule, { RuleConfig, VerifiedResult } from '../rule'; | ||
import { Ruleset } from '../ruleset'; | ||
@@ -11,3 +11,3 @@ /** | ||
name: string; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedReport[]; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedResult[]; | ||
} |
import { Document } from '../parser'; | ||
import Rule, { RuleConfig, VerifiedReport } from '../rule'; | ||
import Rule, { RuleConfig, VerifiedResult } from '../rule'; | ||
import { Ruleset } from '../ruleset'; | ||
@@ -11,3 +11,3 @@ /** | ||
name: string; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedReport[]; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedResult[]; | ||
} |
import { Document } from '../parser'; | ||
import Rule, { RuleConfig, VerifiedReport } from '../rule'; | ||
import Rule, { RuleConfig, VerifiedResult } from '../rule'; | ||
import { Ruleset } from '../ruleset'; | ||
@@ -12,3 +12,3 @@ /** | ||
defaultValue: 'double' | 'single'; | ||
verify(document: Document, config: RuleConfig<'double' | 'single'>, ruleset: Ruleset): VerifiedReport[]; | ||
verify(document: Document, config: RuleConfig<'double' | 'single'>, ruleset: Ruleset): VerifiedResult[]; | ||
} |
import { Document } from '../parser'; | ||
import Rule, { RuleConfig, VerifiedReport } from '../rule'; | ||
import Rule, { RuleConfig, VerifiedResult } from '../rule'; | ||
import { Ruleset } from '../ruleset'; | ||
@@ -11,3 +11,3 @@ /** | ||
name: string; | ||
verify(document: Document, config: RuleConfig<'tab' | number>, ruleset: Ruleset): VerifiedReport[]; | ||
verify(document: Document, config: RuleConfig<'tab' | number>, ruleset: Ruleset): VerifiedResult[]; | ||
} |
import { Document } from '../parser'; | ||
import Rule, { RuleConfig, VerifiedReport } from '../rule'; | ||
import Rule, { RuleConfig, VerifiedResult } from '../rule'; | ||
import { Ruleset } from '../ruleset'; | ||
@@ -11,3 +11,3 @@ /** | ||
name: string; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedReport[]; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedResult[]; | ||
} |
import { Document } from '../parser'; | ||
import Rule, { RuleConfig, VerifiedReport } from '../rule'; | ||
import Rule, { RuleConfig, VerifiedResult } from '../rule'; | ||
import { Ruleset } from '../ruleset'; | ||
@@ -11,3 +11,3 @@ /** | ||
name: string; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedReport[]; | ||
verify(document: Document, config: RuleConfig, ruleset: Ruleset): VerifiedResult[]; | ||
} |
{ | ||
"name": "markuplint", | ||
"version": "0.1.0", | ||
"description": "Lint for Markup language", | ||
"version": "0.2.0", | ||
"description": "HTML linter for legacy/modern HTML, Web Components, SVG, MathML, AMP HTML and more.", | ||
"main": "lib/index.js", | ||
@@ -20,5 +20,7 @@ "author": "Yusuke Hirao", | ||
"dependencies": { | ||
"meow": "^4.0.0", | ||
"parse5": "^3.0.3" | ||
}, | ||
"devDependencies": { | ||
"@types/meow": "^3.6.2", | ||
"ava": "^0.24.0", | ||
@@ -25,0 +27,0 @@ "coveralls": "^3.0.0", |
@@ -13,2 +13,21 @@ # markuplint | ||
## Usage | ||
### CLI | ||
``` | ||
$ markuplint verifyee.html | ||
``` | ||
``` | ||
Usage | ||
$ markuplint <input> | ||
Options | ||
--ruleset, -r Ruleset file path | ||
Examples | ||
$ markuplint verifyee.html --ruleset path/to/.markuplintrc | ||
``` | ||
## Thanks | ||
@@ -15,0 +34,0 @@ |
40
52975
2
11
37
1554
+ Addedmeow@^4.0.0
+ Addedarray-find-index@1.0.2(transitive)
+ Addedarrify@1.0.1(transitive)
+ Addedcamelcase@4.1.0(transitive)
+ Addedcamelcase-keys@4.2.0(transitive)
+ Addedcurrently-unhandled@0.4.1(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddecamelize-keys@1.1.1(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedfind-up@2.1.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhosted-git-info@2.8.9(transitive)
+ Addedindent-string@3.2.0(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-core-module@2.16.1(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedjson-parse-better-errors@1.0.2(transitive)
+ Addedload-json-file@4.0.0(transitive)
+ Addedlocate-path@2.0.0(transitive)
+ Addedloud-rejection@1.6.0(transitive)
+ Addedmap-obj@1.0.12.0.0(transitive)
+ Addedmeow@4.0.1(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedminimist-options@3.0.2(transitive)
+ Addednormalize-package-data@2.5.0(transitive)
+ Addedp-limit@1.3.0(transitive)
+ Addedp-locate@2.0.0(transitive)
+ Addedp-try@1.0.0(transitive)
+ Addedparse-json@4.0.0(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpath-type@3.0.0(transitive)
+ Addedpify@3.0.0(transitive)
+ Addedquick-lru@1.1.0(transitive)
+ Addedread-pkg@3.0.0(transitive)
+ Addedread-pkg-up@3.0.0(transitive)
+ Addedredent@2.0.0(transitive)
+ Addedresolve@1.22.10(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.21(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedstrip-indent@2.0.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtrim-newlines@2.0.0(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)