15.5.3 • Published 4 years ago

@the-/lint v15.5.3

Weekly downloads
495
License
MIT
Repository
github
Last release
4 years ago

@the-/lint

npm Version

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', ({ content, report }) => {
    const { EOL } = require('os')

    if (!content.endsWith(EOL)) {
      report('Should have end with EOL', {
        actual: JSON.stringify(content[content.length - 1]),
        expect: JSON.stringify(EOL),
      })
    }
  })

  await lint.run()
}

tryExample().catch((err) => console.error(err))

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Links

15.5.3

4 years ago

15.5.2

4 years ago

15.5.1

4 years ago

15.5.0

5 years ago

15.4.26

5 years ago

15.4.25

5 years ago

15.4.24

5 years ago

15.4.23

5 years ago

15.4.22

5 years ago

15.4.21

5 years ago

15.4.20

5 years ago

15.4.19

5 years ago

15.4.18

5 years ago

15.4.16

5 years ago

15.4.12

5 years ago

15.4.10

5 years ago

15.4.8

5 years ago

15.4.7

5 years ago

15.4.5

5 years ago

15.4.2

5 years ago

15.4.1

5 years ago

15.2.3

5 years ago

15.2.2

5 years ago

15.2.1

5 years ago

15.2.0

5 years ago

15.1.4

5 years ago

15.1.3

5 years ago

15.1.2

5 years ago

15.1.0

5 years ago

15.0.5

5 years ago

15.0.3

5 years ago

15.0.2

5 years ago