1.4.0 • Published 11 months ago

@putout/quick-lint v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

1.4.0

11 months ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago