# @thinkbuff/eslint-config

> Thinkbuff's ESLint config preset

Latest version **0.2.7** (published 2025-05-05) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.7 |
| Published | 2025-05-05 |
| First published | 2024-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 11 |
| Unpacked size | 349.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eleven |
| Maintainers | eteplus |
| Keywords | eslint-config |

## Links

- npm: https://www.npmjs.com/package/@thinkbuff/eslint-config
- Homepage: https://github.com/thinkbuff/eslint-config/#readme
- npm.io page: https://npm.io/package/@thinkbuff/eslint-config

## Dependencies (11)

- [globals](https://npm.io/package/globals.md) ^16.0.0
- [local-pkg](https://npm.io/package/local-pkg.md) ^1.1.1
- [type-fest](https://npm.io/package/type-fest.md) ^4.40.1
- [typescript-eslint](https://npm.io/package/typescript-eslint.md) ^8.31.1
- [eslint-plugin-pnpm](https://npm.io/package/eslint-plugin-pnpm.md) ^0.3.1
- [yaml-eslint-parser](https://npm.io/package/yaml-eslint-parser.md) ^1.3.0
- [jsonc-eslint-parser](https://npm.io/package/jsonc-eslint-parser.md) ^2.4.0
- [eslint-plugin-unicorn](https://npm.io/package/eslint-plugin-unicorn.md) ^59.0.0
- [eslint-plugin-import-x](https://npm.io/package/eslint-plugin-import-x.md) ^4.11.0
- [@stylistic/eslint-plugin](https://npm.io/package/@stylistic/eslint-plugin.md) ^4.2.0
- [eslint-plugin-perfectionist](https://npm.io/package/eslint-plugin-perfectionist.md) ^4.12.3

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.2.7 (latest) — 2025-05-05
- 0.2.6 — 2024-12-25
- 0.2.5 — 2024-12-25
- 0.2.4 — 2024-12-25
- 0.2.3 — 2024-12-25
- 0.2.2 — 2024-08-28
- 0.2.1 — 2024-06-30
- 0.2.0 — 2024-06-11
- 0.1.5 — 2024-04-09
- 0.1.4 — 2024-04-03
- 0.1.2 — 2024-03-25
- 0.1.1 — 2024-03-24
- 0.1.0 — 2024-03-21
- 0.0.9 — 2024-03-18
- 0.0.8 — 2024-03-18
- … 7 more at https://npm.io/package/@thinkbuff/eslint-config/versions

## README

# @thinkbuff/eslint-config

[![npm](https://img.shields.io/npm/v/@thinkbuff/eslint-config.svg)](https://www.npmjs.com/package/@thinkbuff/eslint-config)

[Thinkbuff](https://github.com/thinkbuff)'s ESLint config preset

> Thanks to [antfu/eslint-config](https://github.com/antfu/eslint-config) for the inspiration and reference.

## Usage

- **Requires Node.js `>=20`.**
- **Requires ESLint `>=9`.**

### Install

```bash
pnpm i -D eslint @thinkbuff/eslint-config
```

### Create config file (`eslint.config.js`)

See the [ESLint docs](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new) for more information about extending config files.

#### ES Module (Recommended)

With [`"type": "module"`](https://nodejs.org/api/packages.html#type) in `package.json` (recommended):

```js
// eslint.config.js
import { defineFlatConfigAsync } from '@thinkbuff/eslint-config'
import { FlatCompat } from '@eslint/eslintrc';

const compat = new FlatCompat();

export default defineFlatConfigAsync({
  astro: true,
  unocss: true,
  // Additional ESlint Flat Config
  extends: [
    {
      files: ['src/**/*.ts'],
      rules: {
        'perfectionist/sort-objects': 'error',
      },
    },
    // Legacy config
    ...compat.config({
      extends: [
        'eslint:recommended',
        // Other extends...
      ],
    }),
  ]
}
```

#### CommonJS

```js
// eslint.config.js
const { defineFlatConfigAsync } = require('@thinkbuff/eslint-config')
const { FlatCompat } = require('@eslint/eslintrc')

const compat = new FlatCompat()

module.exports = defineFlatConfigAsync({
  astro: true,
  unocss: true,
  // Additional ESlint Flat Config
  extends: [
    {
      files: ['src/**/*.ts'],
      rules: {
        'perfectionist/sort-objects': 'error',
      },
    },
    // Legacy config
    ...compat.config({
      extends: [
        'eslint:recommended',
        // Other extends...
      ],
    }),
  ]
})
```

### Add script for package.json

For example:

```json
{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}
```

## VS Code support

Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

Add the following settings to your `.vscode/settings.json`:

```jsonc
{
  // Enable the ESlint flat config support
  "eslint.experimental.useFlatConfig": true,

  // Disable the default formatter, use eslint instead
  "prettier.enable": false,
  "editor.formatOnSave": false,

  // Auto fix
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.organizeImports": "never"
  },

  // Enable eslint for supported languages
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "vue",
    "astro"
  ]
}
```

## Maintainer

- [Eleven](https://github.com/eteplus)

## License

[MIT](./LICENSE) License &copy; 2024-PRESENT [Thinkbuff](https://github.com/thinkbuff)

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