Skip to content

Commit 3730208

Browse files
committed
feat: add eslint-plugin-command
1 parent 387df5c commit 3730208

File tree

6 files changed

+29
-0
lines changed

6 files changed

+29
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"eslint-config-flat-gitignore": "^0.1.5",
8686
"eslint-config-prettier": "^9.1.0",
8787
"eslint-plugin-antfu": "^2.2.0",
88+
"eslint-plugin-command": "^0.2.0",
8889
"eslint-plugin-eslint-comments": "^3.2.0",
8990
"eslint-plugin-import-x": "^0.5.0",
9091
"eslint-plugin-jsdoc": "^48.2.4",

pnpm-lock.yaml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/typegen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import fs from 'node:fs/promises'
22
import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
33
import { builtinRules } from 'eslint/use-at-your-own-risk'
44
import {
5+
command,
56
comments,
67
formatter,
78
imports,
@@ -47,6 +48,7 @@ const configs = await combine(
4748
unicorn(),
4849
unocss(),
4950
vue(),
51+
command(),
5052
)
5153

5254
const configNames = configs.map(i => i.name).filter(Boolean) as string[]

src/configs/command.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import createCommand from 'eslint-plugin-command/config'
2+
import type { TypedFlatConfigItem } from '../types'
3+
4+
export async function command(): Promise<TypedFlatConfigItem[]> {
5+
return [
6+
{
7+
...createCommand(),
8+
name: 'coderwyd/command/rules',
9+
},
10+
]
11+
}

src/configs/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ export * from './unocss'
1717
export * from './formatter'
1818
export * from './svelte'
1919
export * from './tailwindcss'
20+
export * from './command'

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import process from 'node:process'
22
import fs from 'node:fs'
33
import { DEFAULT_PRETTIER_RULES } from './constants/prettier'
44
import {
5+
command,
56
comments,
67
formatter,
78
ignores,
@@ -125,6 +126,7 @@ export async function defineConfig(
125126
jsdoc(),
126127
imports(),
127128
unicorn(),
129+
command(),
128130

129131
// Optional plugins (installed but not enabled by default)
130132
perfectionist(),

0 commit comments

Comments
 (0)