# @dushenyan/eslint-config

> Dushenyan ESLint config presets

Latest version **0.1.2** (published 2022-10-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install @dushenyan/eslint-config
pnpm add @dushenyan/eslint-config
yarn add @dushenyan/eslint-config
bun add @dushenyan/eslint-config
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2022-10-28 |
| First published | 2022-10-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dushenyan |
| Maintainers | dbudaiya |
| Keywords | eslint-config |

## Links

- npm: https://www.npmjs.com/package/@dushenyan/eslint-config
- npm.io page: https://npm.io/package/@dushenyan/eslint-config

## Dependencies (8)

- [typescript](https://npm.io/package/typescript.md) ^4.7.4
- [eslint-plugin-n](https://npm.io/package/eslint-plugin-n.md) ^15.2.3
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.26.0
- [eslint-plugin-promise](https://npm.io/package/eslint-plugin-promise.md) ^6.0.0
- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) ^17.0.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^5.30.0
- [@dushenyan/eslint-config-vue](https://npm.io/package/@dushenyan/eslint-config-vue.md) ^0.1.2
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^5.30.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2022-10-28
- 0.1.1 — 2022-10-27

## README

# eslint-config
![NPM](https://img.shields.io/npm/l/@dushenyan/eslint-config) &nbsp;
![npm (scoped)](https://img.shields.io/npm/v/@dushenyan/eslint-config?color=%20) <br/>

Antzy ESLint config presets

-  Supports `vue`  `ts` `js`

# Install
```
pnpm add eslint -D
pnpm add @dushenyan/eslint-config -D
```

# Config eslintrc.js
```
{
  "extends":"@dushenyan"
}
```

# Used Rules
The following configuration has been used and will be fixed automatically <br><br>

## Base Config 

|        used rules        |            explain             |
| :----------------------: | :----------------------------: |
|       arrow-parens       |    箭头函数去掉不必要的括号      |
|       sort-imports       |    import 单行从大到小排序      |
|    no-useless-return     |     关闭不允许多余的return      |
| no-multiple-empty-lines  |         不允许多个空行          |
|  array-bracket-newline   |    数组括号前后 >= 3个换行       |
|  array-element-newline   |  数组括号内的元素 >= 3个换行      |
|  function-paren-newline  | 函数括号内参数有一个换行就换行     |
| newline-per-chained-call |       方法链 >= 3个换行         |
|   object-curly-newline   |    import 解构 超过6个换行      |
| object-property-newline  | 花括号属性强制换行，默认一个参数不换行 |
| no-extra-label           | 禁用不必要的标签 |
| object-property-newline  | 花括号属性强制换行，默认一个参数不换行 |
| decimal                  | 禁止浮点小数 |
| switch-colon-spacing     | switch 的冒号左右有空格 |
| implicit-arrow-linebreak  | 箭头函数体后面不能换行 |
| multiline-comment-style  | 对多行注释格式化 |
| operator-assignment      | 简化赋值操作 |
| template-tag-spacing  | 函数调用模板字符串后面不能有空格 |
| object-shorthand  | 对象字面量中方法和属性使用简写语法 |
| prefer-arrow-callback  | 回调使用箭头函数 |
| prefer-template  | 使用字符串模板连接 |
| yield-star-spacing  | yield* 周围空格 |



<br/><br/>

## Typescript Config 

|        used rules        |            explain             |
| :----------------------: | :----------------------------: |
|  no-non-null-assertion   |    去掉禁止使用!后缀运算符     |
|       array-type         |            使用数组 T[]      |
| sort-type-union-intersection-members |  （｜ or &） 排序 |
| space-infix-ops          |         中缀运算符周围需要间距 |
| semi                     |         禁止不必要的分号 |
| comma-dangle             |         要求或不允许尾随逗号 |
| type-annotation-spacing  |         类型注释间距 |
| consistent-generic-constructors  |  如果使用构造函数 泛型就要这样写 new Map<string,number>() |
| consistent-indexed-object-style  |         强制使用 Record |
| member-delimiter-style    |   interface type 不要分号和逗号 |
| method-signature-style    |   函数声明 func: (arg: string) => number |
| space-before-blocks   |   interface 后面加空格 |
| consistent-type-imports    |   使用引用类型时自动加上 type |
| consistent-type-definitions    |   对象类型使用interface |






<br/><br/>

## Vue Config 

|        used rules        |            explain             |
| :----------------------: | :----------------------------: |
|  require-default-prop   | （off） 关闭强制props有默认值     |
|  no-setup-props-destructure  |   （off）setup可以解构    |
| multi-word-component-names          | （off）  组价名可以简短 |
|        html-indent           |  template 缩进两列 |
|        script-indent           |  script 缩进两列 |
| max-attributes-per-line        |  属性超过3个自动换行，换行后 同一行不能超过1个 |
|  html-closing-bracket-newline  |  标签右箭头换行 |
|  html-closing-bracket-spacing  |  禁止右箭头有空格 |
|  html-self-closing             |  自闭合标签 |
| mustache-interpolation-spacing |  {{ 这里有空格 }} |
|  no-multi-spaces               |  不允许多个空格 |
|no-spaces-around-equal-signs-in-attribute  | 属性周围不允许等号有空格 |
|  component-tags-order          |  vue格式['script','template'] |
|  define-macros-order           |  强制 defineProps defineEmits的顺序 |
|  static-class-names-order      |  class名排序 |

---
_Source: https://npm.io/package/@dushenyan/eslint-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
