@putout/quick-lint
quick-lint-js as library
Last updated 4 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/quick-lint 
SYNC missed versions from official npm registry.

Quick Lint License NPM version Build Status Coverage Status

quick-lint-js as library.

Install

npm i @putout/quick-lint --save

API

quickLint(source: string, options: Options)

interface Options {
    isJSX: boolean;
    isTS: boolean;
    startLine: number;
}
const quickLint = require('@putout/quick-lint');
const option = `
    function x() {
        await m();
    }
`;

quickLint(source, {
    isJSX: true,
    isTS: false,
    startLine: 0, // default
});

// returns
[{
    rule: 'parser (quick-lint-js)',
    message: '\'await\' is only allowed in async functions',
    position: {
        line: 2,
        column: 8,
    },
}, {
    rule: 'parser (quick-lint-js)',
    message: 'use of undeclared variable: m',
    position: {
        line: 2,
        column: 14,
    },
}];

License

MIT

Current Tags

  • 2.1.0                                ...           latest (4 months ago)

11 Versions

  • 2.1.0                                ...           4 months ago
  • 2.0.1                                ...           10 months ago
  • 2.0.0                                ...           10 months ago
  • 1.6.0                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.0                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (1)
Dev Dependencies (11)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |