textlint-plugin-html
Advanced tools
Comparing version
@@ -19,5 +19,11 @@ // LICENSE : MIT | ||
this.config = config; | ||
this.extensions = this.config.extensions ? this.config.extensions : []; | ||
} | ||
_createClass(HTMLProcessor, [{ | ||
key: "availableExtensions", | ||
value: function availableExtensions() { | ||
return [".htm", ".html"].concat(this.extensions); | ||
} | ||
}, { | ||
key: "processor", | ||
@@ -37,7 +43,2 @@ value: function processor(ext) { | ||
} | ||
}], [{ | ||
key: "availableExtensions", | ||
value: function availableExtensions() { | ||
return [".htm", ".html"]; | ||
} | ||
}]); | ||
@@ -44,0 +45,0 @@ |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.1.7", | ||
"version": "0.2.0", | ||
"description": "textlint HTML processsor plugin.", | ||
@@ -46,3 +46,3 @@ "main": "lib/index.js", | ||
"power-assert": "^1.4.0", | ||
"textlint": "^7.2.2", | ||
"textlint": "^11.0.0", | ||
"textlint-ast-test": "^1.1.3", | ||
@@ -49,0 +49,0 @@ "textlint-rule-no-todo": "^2.0.0" |
@@ -12,3 +12,3 @@ # textlint-plugin-html [](https://travis-ci.org/textlint/textlint-plugin-html) | ||
## Supported extensions | ||
## Default supported extensions | ||
@@ -36,2 +36,18 @@ - `.html` | ||
### Options | ||
- `extensions`: `string[]` | ||
- Additional file extensions for html | ||
For example, if you want to treat `.custom-ext` as html, put following config to `.textlintrc` | ||
```json | ||
{ | ||
"plugins": { | ||
"html": { | ||
"extensions": [".custom-ext"] | ||
} | ||
} | ||
} | ||
``` | ||
## Tests | ||
@@ -38,0 +54,0 @@ |
@@ -7,9 +7,10 @@ // LICENSE : MIT | ||
this.config = config; | ||
this.extensions = this.config.extensions ? this.config.extensions : []; | ||
} | ||
static availableExtensions() { | ||
availableExtensions() { | ||
return [ | ||
".htm", | ||
".html" | ||
]; | ||
].concat(this.extensions); | ||
} | ||
@@ -16,0 +17,0 @@ |
Sorry, the diff of this file is not supported yet
24836
2.9%350
0.57%66
32%