unified-lint-rule
unified plugin to make it a bit easier to create linting rules
Last updated 4 days ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install unified-lint-rule 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.6                                ...           latest (4 days ago)

7 Versions

  • 1.0.6                                ...           4 days ago
  • 1.0.5                                ...           3 months ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (2)
Downloads
Today 2
This Week 49
This Month 381
Last Day 47
Last Week 393
Last Month 1,184
Dependencies (1)
Dev Dependencies (0)
None
Dependents (116)

Copyright 2014 - 2017 © taobao.org |