mirror of
https://github.com/remarkjs/remark-lint.git
synced 2024-09-11 19:57:15 +03:00
no-file-name-articles: forbid teh
It is sometimes used as an alternative to "the", so `no-file-name-articles` rule should also forbid it. Closes GH-100.
This commit is contained in:
parent
3b11ff4a34
commit
e4640fec96
@ -1460,6 +1460,12 @@ When turned on is passed in, the following error is given:
|
||||
|
||||
When turned on is passed in, the following error is given:
|
||||
|
||||
```text
|
||||
1:1: Do not start file names with `teh`
|
||||
```
|
||||
|
||||
When turned on is passed in, the following error is given:
|
||||
|
||||
```text
|
||||
1:1: Do not start file names with `an`
|
||||
```
|
||||
|
@ -16,6 +16,10 @@
|
||||
*
|
||||
* 1:1: Do not start file names with `the`
|
||||
*
|
||||
* @example {"name": "teh-title.md", "label": "output", "config": {"positionless": true}}
|
||||
*
|
||||
* 1:1: Do not start file names with `teh`
|
||||
*
|
||||
* @example {"name": "an-article.md", "label": "output", "config": {"positionless": true}}
|
||||
*
|
||||
* 1:1: Do not start file names with `an`
|
||||
@ -33,7 +37,7 @@ module.exports = noFileNameArticles;
|
||||
* @param {File} file - Virtual file.
|
||||
*/
|
||||
function noFileNameArticles(ast, file) {
|
||||
var match = file.stem && file.stem.match(/^(the|an?)\b/i);
|
||||
var match = file.stem && file.stem.match(/^(the|teh|an?)\b/i);
|
||||
|
||||
if (match) {
|
||||
file.message('Do not start file names with `' + match[0] + '`');
|
||||
|
Loading…
Reference in New Issue
Block a user