Skip to content

Commit 4c6d744

Browse files
committedFeb 12, 2025··
feat: add de-morgan plugin
1 parent 26e2726 commit 4c6d744

File tree

6 files changed

+159
-132
lines changed

6 files changed

+159
-132
lines changed
 

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"eslint-config-prettier": "^10.0.1",
5757
"eslint-plugin-antfu": "^3.0.0",
5858
"eslint-plugin-command": "^3.0.0",
59+
"eslint-plugin-de-morgan": "^1.0.0",
5960
"eslint-plugin-import-x": "^4.6.1",
6061
"eslint-plugin-jsdoc": "^50.6.3",
6162
"eslint-plugin-jsonc": "^2.19.1",
@@ -82,7 +83,7 @@
8283
"@types/node": "^22.13.1",
8384
"@unocss/eslint-plugin": "^65.4.3",
8485
"bumpp": "^10.0.3",
85-
"eslint": "^9.20.0",
86+
"eslint": "^9.20.1",
8687
"eslint-typegen": "^1.0.0",
8788
"importx": "^0.5.1",
8889
"picocolors": "^1.1.1",

‎pnpm-lock.yaml

+144-131
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/configs/de-morgan.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { pluginDeMorgan } from '../plugins'
2+
import type { Config } from '../types'
3+
4+
export const deMorgan = (): Config[] => [
5+
{
6+
...pluginDeMorgan.configs.recommended,
7+
name: 'sxzz/de-morgan',
8+
},
9+
]

‎src/configs/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * from './command'
22
export * from './comments'
3+
export * from './de-morgan'
34
export * from './ignores'
45
export * from './imports'
56
export * from './javascript'

‎src/plugins.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export { default as pluginPrettierRecommended } from 'eslint-plugin-prettier/rec
1313
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports'
1414
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc'
1515
export { default as pluginIgnore } from 'eslint-config-flat-gitignore'
16+
export { default as pluginDeMorgan } from 'eslint-plugin-de-morgan'
1617

1718
export * as pluginImport from 'eslint-plugin-import-x'
1819
export * as pluginJsonc from 'eslint-plugin-jsonc'

‎src/presets.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
command,
33
comments,
4+
deMorgan,
45
ignores,
56
imports,
67
javascript,
@@ -33,6 +34,7 @@ export const presetJavaScript = (): Config[] => [
3334
...node(),
3435
...jsdoc(),
3536
...regexp(),
37+
...deMorgan(),
3638
]
3739
/** Includes basic json(c) file support and sorting json keys */
3840
export const presetJsonc = (): Config[] => [

0 commit comments

Comments
 (0)
Please sign in to comment.