@guoyunhe/lint-action
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@guoyunhe/lint-action

Unified ESLint + Prettier action to compose lint and format commands

Install

npm i @guoyunhe/lint-action

Usage

Usually used with commander to make CLI tools:

#!/usr/bin/env node

import { Command } from 'commander';
import { lint } from '@guoyunhe/lint-action';

const program = new Command('my-scripts');

program
  .command('lint')
  .description('Check lint problems with ESLint')
  .option('--fix', 'Fix lint problems automatically')
  .action(lint);

program
  .command('format')
  .description('Format source code with Prettier and fix ESLint issues')
  .action(() => lint({ fix: true }));

/@guoyunhe/lint-action/

    Package Sidebar

    Install

    npm i @guoyunhe/lint-action

    Weekly Downloads

    6

    Version

    1.0.1

    License

    none

    Unpacked Size

    43.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • guoyunhe