项目作者: eslint-kit

项目描述 :
A cli tool for eslint-config-kit
高级语言: TypeScript
项目地址: git://github.com/eslint-kit/cli.git
创建时间: 2020-02-08T13:54:28Z
项目社区:https://github.com/eslint-kit/cli

开源协议:MIT License

下载



ESLint Config Kit









The package was moved to @eslint-kit monorepo.


The ESLint Kit CLI is a command-line interface tool that helps you to setup ESLint for your project.

It can:

  • Setup configs from eslint-config-kit automatically.
    (JSON / YAML eslint config files are supported)

  • Install and manage required dependencies.
    (NPM / Yarn)

  • Add aliases support for eslint-plugin-import.
    (both JS and TS parsers are supported)

  • Create recommended .prettierrc for kit/prettier config.

Usage

Using npx (recommended):

  1. npx @eslint-kit/cli

Installing globally (it’s good in rare cases):

  1. npm i -g @eslint-kit/cli
  2. eslint-kit

Common options

  • -W, --workspace <name> - use the specified yarn workspace as the working directory.

    Currently, it installs all dependencies into the workspace’s package.json. If you want to keep eslint/prettier packages in the root package.json - do it manually.

Commands

Manage configs

Select everything you want using convenient dialogs. CLI will do everything for you.

  1. $ npx @eslint-kit/cli

or

  1. $ npx @eslint-kit/cli config

Accepts all common options.

Setup aliases

Just enter aliases in JSON format and CLI will take care of it.

  1. $ npx @eslint-kit/cli alias

Accepts all common options.

Check

Check packages for compatibility with ESLint Kit. If some versions are not ok, CLI will offer you a way to fix it.

  1. $ npx @eslint-kit/cli check

or

  1. $ npx @eslint-kit/cli check-versions

Learn more about eslint-kit here.

Accepts all common options.