1.3.3 • Published 6 months ago

eslint-config-rakko v1.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

eslint-config-rakko

自用 ESLint 规则集

npm GitHub Workflow Status

安装与使用

pnpm add -D eslint eslint-config-rakko

eslint.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' },
    },
  },
})

参考与感谢