Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji committed Jan 17, 2025
1 parent 89e83cd commit 1a62c09
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- 📦   Support vue(2 and 3) presets
- 📦   Support react presets
- 📦   Support jsx presets
- 📦   Support vitest presets
- 📦   Support eslint comments presets
- 📦   Support overrides eslint config

Expand Down Expand Up @@ -114,6 +115,11 @@ export interface DefineConfigOptions {
* @default false
*/
react?: boolean
/**
* Enable Vitest support
* @default true
*/
vitest?: boolean
/**
* Enable eslint comments support
* @default true
Expand Down
6 changes: 6 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- 📦   支持 typescript 预设
- 📦   支持 vue(2 和 3) 预设
- 📦   支持 react 预设
- 📦   支持 vitest 预设
- 📦   支持 jsx 预设
- 📦   支持 eslint comments 预设
- 📦   支持覆盖 eslint 配置
Expand Down Expand Up @@ -114,6 +115,11 @@ export interface DefineConfigOptions {
* @default false
*/
react?: boolean
/**
* 启用 Vitest 支持
* @default true
*/
vitest?: boolean
/**
* 启用 eslint 注释支持
* @default true
Expand Down
1 change: 1 addition & 0 deletions src/configs/vitest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export function createVitestConfig(): Linter.Config[] {
},
{
name: createConfigName('vitest/rules'),
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
rules: {
'vitest/expect-expect': 'error',
'vitest/no-commented-out-tests': 'warn',
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface DefineConfigOptions {
react?: boolean
/**
* Enable Vitest support
* @default false
* @default true
*/
vitest?: boolean
/**
Expand Down Expand Up @@ -66,7 +66,7 @@ export function defineConfig(options: DefineConfigOptions = {}): Linter.Config[]
jsx = true,
vue = true,
react = false,
vitest = false,
vitest = true,
comments = true,
ignores = [],
rules = {},
Expand Down

0 comments on commit 1a62c09

Please sign in to comment.