This package has been deprecated

Author message:

move to @the-/lint ( https://github.com/the-labo/the/tree/master/packages/lint#readme )

the-lint

1.8.10 • Public • Published

the-lint

Build Status npm Version JS Standard

Lint of the-frameworks

Installation

$ npm install the-lint --save

Usage

'use strict'
 
const {TheLint, rules} = require('the-lint')
 
async function tryExample () {
  const lint = new TheLint()
 
  // Use Buildin rules
  lint.add('src/controllers/*Ctrl.js', rules.defaultExportRule({
    type: 'function'
  }))
 
  // Use Custom rules
  lint.add('src/controllers/*Ctrl.js', ({
                                          filename,
                                          content,
                                          report
                                        }) => {
    const {EOL} = require('os')
    if (!content.endsWith(EOL)) {
      report('Should have end with EOL', {
        expect: JSON.stringify(EOL),
        actual: JSON.stringify(content[content.length - 1]),
      })
    }
  })
 
  await lint.run()
}
 
tryExample().catch((err) => console.error(err))
 

API Guide

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i the-lint

Weekly Downloads

3

Version

1.8.10

License

MIT

Unpacked Size

380 kB

Total Files

87

Last publish

Collaborators

  • okunishinishi