# @modyqyw/eslint-config

> An ESLint shareable config for JavaScript/TypeScript/React/ReactNative/Taro/Vue2/Vue3/UniApp projects.

Latest version **1.9.4** (published 2020-11-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.9.4 |
| Published | 2020-11-20 |
| First published | 2020-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 17 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ModyQyW |
| Maintainers | modyqyw |
| Keywords | eslint, config, javascript, typescript, js, ts, react, react-native, taro, vue, vue2, vue3, uniapp, uni-app |

## Links

- npm: https://www.npmjs.com/package/@modyqyw/eslint-config
- Repository: https://github.com/MillCloud/eslint-config
- Homepage: https://github.com/MillCloud/eslint-config#readme
- Issues: https://github.com/MillCloud/eslint-config/issues
- npm.io page: https://npm.io/package/@modyqyw/eslint-config

## Dependencies (17)

- [typescript](https://npm.io/package/typescript.md) ~4.1.2
- [babel-eslint](https://npm.io/package/babel-eslint.md) ~10.1.0
- [eslint-plugin-vue](https://npm.io/package/eslint-plugin-vue.md) ~7.1.0
- [vue-eslint-parser](https://npm.io/package/vue-eslint-parser.md) ~7.1.1
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ~7.21.5
- [vue-class-component](https://npm.io/package/vue-class-component.md) ~7.2.6
- [eslint-config-airbnb](https://npm.io/package/eslint-config-airbnb.md) ~18.2.1
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ~2.22.1
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ~6.4.1
- [vue-property-decorator](https://npm.io/package/vue-property-decorator.md) ~9.0.2
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ~4.8.1
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ~14.2.1
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ~4.2.0
- [eslint-import-resolver-node](https://npm.io/package/eslint-import-resolver-node.md) ~0.3.4
- [eslint-import-resolver-webpack](https://npm.io/package/eslint-import-resolver-webpack.md) ~0.13.0
- [eslint-config-airbnb-typescript](https://npm.io/package/eslint-config-airbnb-typescript.md) ~12.0.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ~4.8.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.9.4 (latest) — 2020-11-20
- 1.9.3 — 2020-11-12
- 1.9.2 — 2020-10-28
- 1.9.1 — 2020-10-23
- 1.9.0 — 2020-10-23
- 1.8.9 — 2020-10-19
- 1.8.8 — 2020-10-12
- 1.8.7 — 2020-10-07
- 1.8.6 — 2020-10-01
- 1.8.5 — 2020-09-28
- 1.8.4 — 2020-09-18
- 1.8.3 — 2020-09-16
- 1.8.2 — 2020-09-11
- 1.8.1 — 2020-09-06
- 1.8.0 — 2020-09-06
- … 23 more at https://npm.io/package/@modyqyw/eslint-config/versions

## README

**DEPRECATED. Check [@modyqyw/fabric](https://github.com/MillCloud/fabric).**

# @modyqyw/eslint-config

An ESLint shareable config for JavaScript/TypeScript/React/ReactNative/Taro/Vue2/Vue3/UniApp projects.

## Usage

### JavaScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw"],
};
```

### TypeScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw"],
};
```

### React / ReactNative / Taro3 + JavaScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/react"],
};
```

### React / ReactNative / Taro3 + TypeScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/react"],
};
```

### Vue2 / UniApp + JavaScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue2"],
};
```

### Vue2 / UniApp + TypeScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue2-typescript"],
};
```

### Vue3 / UniApp + JavaScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue3"],
};
```

### Vue3 / UniApp + TypeScript

```sh
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
```

```js
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue3-typescript"],
};
```

### VSCode

- Install plugins.
  - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- Set up `Settings.json`. Then `F1 => Format Document` => `F1 => File: Save`.

```json
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "vue"
  ],
  "files.eol": "\n",
  "files.associations": {
    "*.wxml": "html",
    "*.wxs": "javascript",
    "*.wxss": "css",
    "*.axml": "html",
    "*.sjs": "javascript",
    "*.acss": "css",
    "*.swan": "html",
    "*.ttml": "html",
    "*.ttss": "css",
    "*.jxml": "html",
    "*.jxss": "css",
    "*.wpy": "vue",
    "*.nvue": "vue",
    "*.ux": "vue"
  },
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  }
}
```

## More Configs

- `@modyqyw/prettier-config` - [Github](https://github.com/MillCloud/prettier-config#readme) [Gitee](https://gitee.com/millcloud/prettier-config#readme)
- `@modyqyw/eslint-config` - [Github](https://github.com/MillCloud/eslint-config#readme) [Gitee](https://gitee.com/millcloud/eslint-config#readme)
- `@modyqyw/stylelint-config` - [Github](https://github.com/MillCloud/stylelint-config#readme) [Gitee](https://gitee.com/millcloud/stylelint-config#readme)

`@modyqyw/eslint-config` and `@modyqyw/stylelint-config` do not use any `Prettier` config and plugin, while `@modyqyw/fabric` does.

## License

[MIT](./LICENSE)

Copyright (c) 2020-present MillCloud

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