Socket
Socket
Sign inDemoInstall

unified-lint-rule

Package Overview
Dependencies
3
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    unified-lint-rule

unified plugin to make it a bit easier to create linting rules


Version published
Weekly downloads
284K
increased by6.86%
Maintainers
2
Install size
33.4 kB
Created
Weekly downloads
 

Readme

Source

unified-lint-rule

Build Coverage Downloads Size Sponsors Backers Chat

unified plugin to make it a bit easier to create linting rules.

Each rule in remark-lint uses this project, so see that for examples!

Install

npm:

npm install unified-lint-rule

Use

var rule = require('unified-lint-rule')

module.exports = rule('remark-lint:file-extension', fileExtension)

function fileExtension(tree, file, option) {
  var ext = file.extname
  var preferred = typeof option === 'string' ? option : 'md'

  if (ext && ext.slice(1) !== preferred) {
    file.message('Incorrect extension: use `' + preferred + '`')
  }
}

Contribute

See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

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

License

MIT © Titus Wormer

Keywords

FAQs

Last updated on 02 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc