open-index/open-npm huggingface dataset:
npm package: @ggbondz/eslint-flat-config
Description: ESLint config
Latest version: 1.0.1

# @zren/eslint-flat-config [npm](https://npmjs.com/package/@zren/eslint-config)

为JavaScript、TypeScript、Vue 2或Vue 3预设的固执己见的ESLint配置，
和Prettier。

## Features

-使用Prettier格式化。
-设计用于与TypeScript、Vue 2和3配合使用。
-支持JSON（5）、YAML、Markdown...
-对导入进行排序，`package.json `，`tsconfig.json `...
-[ESLint  Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
-忽略常见文件，如“dist”、“node_modules”、“coverage”和“.gitignore”中的文件。
-合理的默认值、最佳实践、只有一行配置
-合理严格，但代码质量更好。

## Install

```bash
npm i -D  @zren/eslint-flat-config
```

需要 Node.js >= 18.18, and ESLint >= 9.5.0.

## Usage

```js
import { config } from ' @zren/eslint-flat-config'
export default config(
  [
    /* your custom config */
  ],
  // Features: it'll detect installed dependency and enable necessary features automatically
  {
    prettier: true,
    markdown: true,
    vue: true, // auto detection
    unocss: false, // auto detection
  },
)
```

### Presets

```js
// eslint.config.js
import {
  presetJavaScript, // Ignore common files and include javascript support
  presetJsonc, // Includes basic json(c) file support and sorting json keys
  presetLangsExtensions, // Includes markdown, yaml + `presetJsonc` support
  presetBasic, // Includes `presetJavaScript` and typescript support

  // Includes
  // - `presetBasic` (JS+TS) support
  // - `presetLangsExtensions` (markdown, yaml, jsonc) support
  // - Vue support
  // - UnoCSS support (`uno.config.ts` is required)
  // - Prettier support
  presetAll,
} from ' @zren/eslint-flat-config'

export default presetAll
```

查看 [preset.ts](./src/presets.ts) 更多配置.