Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/stuartzhang/eslint-config-amo

ESLint presets for the AMO company
https://github.com/stuartzhang/eslint-config-amo

Last synced: 16 days ago
JSON representation

ESLint presets for the AMO company

Awesome Lists containing this project

README

        

# eslint-config-stzhang

【H5程序】与【node程序】`JavaScript`开发规则定制套装,支持`Vue`。

## 安装

`npm i eslint-config-stzhang -D`

### `peers`依赖

* eslint: 5.6+

### 项目根目录下的`.eslintrc.js`配置

> 针对`webpack`可编程配置的`node`程序。

#### nodejs 7.x

```javascript
module.exports = {
...
'extends': [
'stzhang/eslint-config-node7x.js'
],
...
};
```

#### nodejs 8.x 或更高

```javascript
module.exports = {
...
'extends': [
'stzhang/eslint-config-node8x.js'
],
...
};
```

### `src`目录下的`.eslintrc.js`配置

> 重点针对`*.vue`程序。

```javascript
module.exports = {
...
'root': true,
'extends': [
'stzhang/eslint-config-vue.js'
],
...
};
```

## 手动执行`eslint`

`npm i npx -g`

`npx eslint **/*.* --fix`