Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 1.2 KB

api.md

File metadata and controls

57 lines (46 loc) · 1.2 KB

Linter

Kind: global class
Access: public
Author: Sagie Gur-Ari

new Linter()

Exposes the markdown linting task.

Example

//to use via grunt, first load the task
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
//or load it manually
grunt.loadNpmTasks('grunt-markdownlint');

grunt.initConfig({
  markdownlint: {
    full: {
      options: {
        config: { //configure the linting rules
          'default': true,
          'line-length': false,
          'blanks-around-headers': false,
          'no-duplicate-header': false,
          'no-inline-html': false
        }
      },
      src: [
        'README.md',
        'docs/api.md'
      ]
    }
  }
});

grunt.registerTask('default', ['markdownlint']);

Linter#run(grunt, markdownlint)

Runs the markdown linting task.

Access: public

Param Type Description
grunt Object The grunt object
markdownlint function The markdownlint library