Socket
Socket
Sign inDemoInstall

remark-lint-no-file-name-irregular-characters

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-no-file-name-irregular-characters - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

12

index.js

@@ -44,13 +44,13 @@ /**

var expression = /[^\\.a-zA-Z0-9-]/
var expression = /[^\\.a-zA-Z\d-]/
function noFileNameIrregularCharacters(tree, file, pref) {
var style = pref || expression
function noFileNameIrregularCharacters(tree, file, option) {
var preferred = option || expression
var match
if (typeof style === 'string') {
style = new RegExp('[^' + style + ']')
if (typeof preferred === 'string') {
preferred = new RegExp('[^' + preferred + ']')
}
match = file.stem && file.stem.match(style)
match = file.stem && file.stem.match(preferred)

@@ -57,0 +57,0 @@ if (match) {

{
"name": "remark-lint-no-file-name-irregular-characters",
"version": "1.0.3",
"version": "1.0.4",
"description": "remark-lint rule to warn when file names contain irregular characters",

@@ -10,2 +10,3 @@ "license": "MIT",

"rule",
"remark-lint-rule",
"file",

@@ -18,2 +19,6 @@ "name",

"bugs": "https://github.com/remarkjs/remark-lint/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",

@@ -20,0 +25,0 @@ "contributors": [

@@ -85,12 +85,12 @@ <!--This file is generated-->

```diff
...
"remarkConfig": {
"plugins": [
...
"lint",
+ "lint-no-file-name-irregular-characters",
...
]
}
...
```

@@ -107,4 +107,4 @@

```diff
var remark = require('remark');
var report = require('vfile-reporter');
var remark = require('remark')
var report = require('vfile-reporter')

@@ -115,4 +115,4 @@ remark()

.process('_Emphasis_ and **importance**', function (err, file) {
console.error(report(err || file));
});
console.error(report(err || file))
})
```

@@ -126,4 +126,4 @@

This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.

@@ -157,3 +157,3 @@

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[chat-badge]: https://img.shields.io/badge/chat-spectrum.svg

@@ -160,0 +160,0 @@ [chat]: https://spectrum.chat/unified/remark

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc