New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-g

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-g - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "eslint-g",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generator eslint config for pspgbhu",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,3 +0,3 @@

# eslint-generator
eslint config file generator. 主要是为了能够快速生成满足自身习惯的 eslint 配置文件,
# eslint-g
快速生成常用 eslint.json 配置文件,同时安装相应的 npm 依赖包。

@@ -12,23 +12,40 @@ ## Install

直接运行命令 `eslint-g` 等同于 `eslint-g -n` 就可以快速生成 .eslintrc.js 配置文件。
```base
esling-g
```bash
$ cd my-project # 进入项目根目录
$ esg # 生成默认 eslint.json 配置,同时安装依赖包
```
针对不同环境的配置
同时可以进一步的配置
node 环境
```bash
eslint-g -n
$ esg -r vue -i yarn # 使用 vue 的 eslint.json 配置,使用 yarn 安装依赖
```
react 环境
## Options
### **-r [rule]**
rule 有以下可选项:
- `node` 或 `n`: 生成 nodejs 的 eslint 配置 (默认使用 node 配置)
- `vue` 或 `v`: 生成 vue 的 eslint 配置
- `react` 或 `r`: 生成 react 的 eslint 配置
- `browser` 或 `b`: 生成浏览器环境通用的 eslint 配置
example:
```bash
eslint-g -r
$ esg -r react # 生成 react 的 eslint 配置
```
browser 环境
### **-i [installer]**
installer 有以下可选项:
- `npm`: 使用 npm 安装相关依赖(默认使用 npm)
- `yarn`: 使用 yarn 安装相关依赖
- `cnpm`: 使用 cnpm 安装相关依赖
example:
```bash
eslint-g -b
$ esg -i yarn # 使用 yarn 来安装相关依赖
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc