remark-lint-no-file-name-outer-dashes
Advanced tools
Comparing version 1.0.2 to 1.0.3
15
index.js
@@ -20,12 +20,17 @@ /** | ||
'use strict'; | ||
'use strict' | ||
var rule = require('unified-lint-rule'); | ||
var rule = require('unified-lint-rule') | ||
module.exports = rule('remark-lint:no-file-name-outer-dashes', noFileNameOuterDashes); | ||
module.exports = rule( | ||
'remark-lint:no-file-name-outer-dashes', | ||
noFileNameOuterDashes | ||
) | ||
function noFileNameOuterDashes(ast, file) { | ||
var reason = 'Do not use initial or final dashes in a file name' | ||
function noFileNameOuterDashes(tree, file) { | ||
if (file.stem && /^-|-$/.test(file.stem)) { | ||
file.message('Do not use initial or final dashes in a file name'); | ||
file.message(reason) | ||
} | ||
} |
{ | ||
"name": "remark-lint-no-file-name-outer-dashes", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "remark-lint rule to warn when file names contain initial or final dashes", | ||
@@ -15,4 +15,4 @@ "license": "MIT", | ||
], | ||
"repository": "https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-no-file-name-outer-dashes", | ||
"bugs": "https://github.com/wooorm/remark-lint/issues", | ||
"repository": "https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-file-name-outer-dashes", | ||
"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) | | | ||
@@ -85,2 +85,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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
3086
30