remark-lint-no-file-name-articles
Advanced tools
Comparing version 1.0.1 to 1.0.2
12
index.js
@@ -28,14 +28,14 @@ /** | ||
'use strict'; | ||
'use strict' | ||
var rule = require('unified-lint-rule'); | ||
var rule = require('unified-lint-rule') | ||
module.exports = rule('remark-lint:no-file-name-articles', noFileNameArticles); | ||
module.exports = rule('remark-lint:no-file-name-articles', noFileNameArticles) | ||
function noFileNameArticles(ast, file) { | ||
var match = file.stem && file.stem.match(/^(the|teh|an?)\b/i); | ||
function noFileNameArticles(tree, file) { | ||
var match = file.stem && file.stem.match(/^(the|teh|an?)\b/i) | ||
if (match) { | ||
file.message('Do not start file names with `' + match[0] + '`'); | ||
file.message('Do not start file names with `' + match[0] + '`') | ||
} | ||
} |
{ | ||
"name": "remark-lint-no-file-name-articles", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "remark-lint rule to warn when file name start with an article", | ||
@@ -15,4 +15,4 @@ "license": "MIT", | ||
], | ||
"repository": "https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-no-file-name-articles", | ||
"bugs": "https://github.com/wooorm/remark-lint/issues", | ||
"repository": "https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-file-name-articles", | ||
"bugs": "https://github.com/remarkjs/remark-lint/issues", | ||
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
@@ -19,0 +19,0 @@ "contributors": [ |
@@ -13,3 +13,3 @@ <!--This file is generated--> | ||
| ------ | ------- | | ||
| [`remark-preset-lint-markdown-style-guide`](https://github.com/wooorm/remark-lint/tree/master/packages/remark-preset-lint-markdown-style-guide) | | | ||
| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/master/packages/remark-preset-lint-markdown-style-guide) | | | ||
@@ -101,2 +101,2 @@ ## Example | ||
[MIT](https://github.com/wooorm/remark-lint/blob/master/LICENSE) © [Titus Wormer](http://wooorm.com) | ||
[MIT](https://github.com/remarkjs/remark-lint/blob/master/LICENSE) © [Titus Wormer](http://wooorm.com) |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
3415