15.5.3 • Published 5 years ago
@the-/lint v15.5.3
@the-/lint
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
- module:@the-/lint
- module:@the-/lint.helpers
- module:@the-/lint.rules
- TheLint
See API Guide for more detail
License
This software is released under the MIT License.
Links
15.5.3
5 years ago
15.5.2
5 years ago
15.5.1
5 years ago
15.5.0
6 years ago
15.4.26
6 years ago
15.4.25
6 years ago
15.4.24
6 years ago
15.4.23
6 years ago
15.4.22
6 years ago
15.4.21
6 years ago
15.4.20
6 years ago
15.4.19
6 years ago
15.4.18
6 years ago
15.4.16
6 years ago
15.4.12
6 years ago
15.4.10
6 years ago
15.4.8
6 years ago
15.4.7
6 years ago
15.4.5
6 years ago
15.4.2
6 years ago
15.4.1
6 years ago
15.2.3
6 years ago
15.2.2
6 years ago
15.2.1
6 years ago
15.2.0
6 years ago
15.1.4
6 years ago
15.1.3
6 years ago
15.1.2
6 years ago
15.1.0
6 years ago
15.0.5
6 years ago
15.0.3
6 years ago
15.0.2
6 years ago