# @mozartchen/eslint-config

> mozartchen eslint config

Latest version **0.0.2** (published 2024-04-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mozartchen/eslint-config
pnpm add @mozartchen/eslint-config
yarn add @mozartchen/eslint-config
bun add @mozartchen/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.0.2 |
| Published | 2024-04-05 |
| First published | 2024-03-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mozartchen |
| Maintainers | mozartchen |
| Keywords | eslint, eslintconfig |

## Links

- npm: https://www.npmjs.com/package/@mozartchen/eslint-config
- Repository: https://github.com/httpxyc/xyc-site
- Homepage: https://github.com/httpxyc/xyc-site#readme
- Issues: https://github.com/httpxyc/xyc-site/issues
- npm.io page: https://npm.io/package/@mozartchen/eslint-config

## Dependencies (8)

- [eslint](https://npm.io/package/eslint.md) ^8.56.0
- [eslint-config-xo](https://npm.io/package/eslint-config-xo.md) ^0.44.0
- [eslint-config-airbnb](https://npm.io/package/eslint-config-airbnb.md) ^19.0.4
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^7.1.1
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ^15.0.0
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^4.6.0
- [eslint-config-xo-typescript](https://npm.io/package/eslint-config-xo-typescript.md) ^3.0.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^7.1.1

## 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.0.2 (latest) — 2024-04-05
- 0.0.0 — 2024-03-07

## README

# `@mozartchen/eslint-config`

> TODO: 基于Airbnb的一些常用的eslint配置，包括basic、react、ts

## Usage

1. 安装eslint

   ```shell
   npm i eslint -D
   ```

2. 安装本包

   ```shell
   npm i @mozartchen/eslint-config -D
   ```

3. 若无`eslint`配置文件，则新建`eslint`配置文件`.eslintrc.js`

   ```javascript
   module.exports = {
     root: true,
     extends: ['@mozartchen/eslint-config'],
     ignorePatterns: ['dist', '.eslintrc.cjs'],
   }
   ```

4. 若需要使用`ts`，则项目中需要配置相应的`tsconfig.json`文件，然后在`eslint`配置中将`ts`类型文件重载并指定`ts`配置入口文件地址

   ```javascript
   overrides: [
       {
         // 若使用了react，则.tsx
         files: ['*.ts', '*.tsx'],
         // 若使用了react，则引入@mozartchen/eslint-config/react
         extends: ['@mozartchen/eslint-config/react', '@mozartchen/eslint-config/typescript'],
         parserOptions: {
           // 指定ts配置入口文件地址
           tsconfigRootDir: __dirname,
           tsx: true,
         },
       },
     ],
   ```

5. 设置`vscode`中的默认格式化程序为`eslint`

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