open-index/open-npm huggingface dataset:
npm package: @rock-hammer/eslint-config
Description: ESlint config for rock-hammer
Latest version: 0.0.26

# @rock-hammer/eslint-config

## 安装

需要额外安装：

* eslint
* @antfu/eslint-config
* eslint-plugin-sort-keys-fix

``` sh
pnpm add eslint @antfu/eslint-config @rock-hammer/eslint-config eslint-plugin-sort-keys-fix -D
```

## 使用

### module

如果在 package.json 中声明了 `"type": "module"`

``` js
// eslint.config.js
import antfu from '@antfu/eslint-config'
import config from '@rock-hammer/eslint-config'
import sortKeysFix from 'eslint-plugin-sort-keys-fix'

export default [
  ...antfu(),
  ...config(),
  {
    plugins: {
      'sort-keys': sortKeysFix,
    },
    rules: {
      'sort-keys/sort-keys-fix': 'warn',
    },
  },
]
```

### cjs

例如在 nest.js 项目中

``` js
// eslint.config.js
const antfu = require('@antfu/eslint-config').default
const config = require('@rock-hammer/eslint-config')

module.exports = [
  ...antfu(),
  ...config(),
  {
    rules: {
      'ts/consistent-type-imports': 'off',
    },
  },
]
```