← 全部工具

eslint-cli

热度 65 更新于 开发与构建

The local eslint executor.

npmauto-collected

安装

npm
npm install -g eslint-cli

通过 npm 安装。

:warning: This package is no longer necessary. Use the built-in npx command instead.

npm install --save-dev eslint
npx eslint src

---

eslint-cli

The local [ESLint] executor.

⤴️ Motivation

ESLint recommends that we install ESLint into project-local rather than global.

$ npm install --save-dev eslint

In that case, there are many merits, but eslint CLI command is not available.

This is error:

$ eslint src

So you have to use:

$ ./nodemodules/.bin/eslint src

It's inconvenient a bit. This package gives you eslint CLI command which runs local installed ESLint.

💿 Installation

Use [npm] to install.

$ npm install -g eslint-cli

Note: