Wondering what’s next for npm?Check out our public roadmap! »

    dont-use-here-link
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    dont-use-here-link

    The simple library for preventing using of here as link in markdown files

    Install

    $ npm install --save-dev dont-use-here-link
    # or
    $ yarn add dont-use-here-link --dev

    Usage

    You can use these library from a cli or from import statement.

    Import like usage

    import { verifyLinks } from 'dont-use-here-link'
    // or
    const { verifyLinks } = require('dont-use-here-link')
    
    const hereLinks = async () => await verifyLinks('./blog') // can be folder or file
    
    console.log(hereLinks().catch(() => {}))
    // Checking all markdown files to ensure [here] not used for links…
    //   Checking file: blog\text.md…
    //   Checking file: blog\text2.md…
    // [here] links were found.
    // In file: blog/text.md
    //  - Line 2: 'Follow along with the [Google Chromium blog](http://blog.chromium.org) to learn about features as new versions ship and again, you can check the version of Chromium that Electron uses [here](https://electronjs.org/#electron-versions).'
    // Look for the source of these markdown and looks to not use [here] as link'.

    CLI like usage

    npx dont-use-here-link <folder or file>

    Example:

    npx dont-use-here-link ./blog
    
    > Checking all markdown files to ensure [here] not used for links…
    >  Checking file: blog\text.md…
    >  Checking file: blog\text2.md…
    > [here] links were found.
    > In file: blog/text.md
    >  - Line 2: 'Follow along with the [Google Chromium blog](http://blog.chromium.org) to learn about features as new versions ship and again, you can check the version of Chromium that Electron uses [here](https://electronjs.org/#electron-versions).'
    > Look for the source of these markdown and looks to not use [here] as link'.

    API

    verifyLinks(globRoot[, options])

    Arguments:

    • globRoot String (required)
    • options Object (optional)
      • searchWord String - Word what's need to search. Defaults [here]

    License

    MIT

    Install

    npm i dont-use-here-link

    DownloadsWeekly Downloads

    5

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    832 kB

    Total Files

    41

    Last publish

    Collaborators

    • avatar
    • avatar