Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unified-lint-rule

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unified-lint-rule - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

4

index.js

@@ -45,3 +45,3 @@ 'use strict'

file.fail(err)
} catch (error) {}
} catch (_) {}
}

@@ -105,3 +105,3 @@

throw new Error(
'Invalid severity `' +
'Incorrect severity `' +
level +

@@ -108,0 +108,0 @@ '` for `' +

{
"name": "unified-lint-rule",
"version": "1.0.4",
"version": "1.0.5",
"description": "unified plugin to make it a bit easier to create linting rules",

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

"unified",
"unified-plugin",
"plugin",

@@ -15,2 +16,6 @@ "lint",

"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)",

@@ -17,0 +22,0 @@ "contributors": [

@@ -30,9 +30,8 @@ # unified-lint-rule

function fileExtension(tree, file, pref) {
function fileExtension(tree, file, option) {
var ext = file.extname
var preferred = typeof option === 'string' ? option : 'md'
pref = typeof pref === 'string' ? pref : 'md'
if (ext && ext.slice(1) !== pref) {
file.message('Invalid extension: use `' + pref + '`')
if (ext && ext.slice(1) !== preferred) {
file.message('Incorrect extension: use `' + preferred + '`')
}

@@ -48,4 +47,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.

@@ -79,3 +78,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

@@ -82,0 +81,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