An open API service indexing awesome lists of open source software.

https://github.com/guoyunhe/lint-action

Unified ESLint + Prettier action to compose lint and format commands
https://github.com/guoyunhe/lint-action

Last synced: 3 months ago
JSON representation

Unified ESLint + Prettier action to compose lint and format commands

Awesome Lists containing this project

README

        

# @guoyunhe/lint-action

Unified ESLint + Prettier action to compose lint and format commands

## Install

```bash
npm i @guoyunhe/lint-action
```

## Usage

Usually used with `commander` to make CLI tools:

```ts
#!/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 }));
```