1.3.3 • Published 11 months ago
eslint-config-rakko v1.3.3
eslint-config-rakko
自用 ESLint 规则集
安装与使用
pnpm add -D eslint eslint-config-rakkoeslint.config.js
import { defineConfig } from 'eslint-config-rakko'
export default defineConfig({
typescript: true,
react: true,
})规则集
| 名称 | 状态 | 启用方法 |
|---|---|---|
| imports | 实验中 | 默认启用 |
| javascript | 稳定 | 默认启用 |
| stylistic | 稳定 | 默认启用 |
| typescript | 实验中 | 配置 typescript: true |
| typescript-type-aware | 实验中 | 配置 typescript.projectService |
| node | 实验中 | 配置 node: true |
| react | 实验中 | 配置 react: true |
| react-extra | 稳定 | 配置 react: true |
| solid | 实验中 | 配置 solid: true |
| unicorn | 实验中 | 配置 unicorn: true |
覆盖配置
可通过 overrides 覆盖各规则集中的配置,示例如下:
import { defineConfig } from 'eslint-config-rakko'
export default defineConfig({
overrides: {
'javascript': {
rules: { 'no-console': 'off' },
},
'typescript': {
rules: { '@typescript-eslint/no-shadow': 'off' },
},
},
})