Skip to content

Commit

Permalink
feat: add eslint perfectionist plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyao27 committed Apr 29, 2024
1 parent 7e21425 commit d86cbb8
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from './eslint-comments.js'
export * from './js.js'
export * from './jsonc.js'
export * from './markdown.js'
export * from './perfectionist.js'
export * from './presets.js'
export * from './react.js'
export * from './typescript.js'
Expand Down
10 changes: 10 additions & 0 deletions eslint/perfectionist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import perfectionistPlugin from 'eslint-plugin-perfectionist'

/** @type {import('eslint-define-config').FlatESLintConfigItem[]} */
export const perfectionist = [
{
plugins: {
perfectionist: perfectionistPlugin,
},
},
]
2 changes: 2 additions & 0 deletions eslint/presets.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { eslintComments } from './eslint-comments.js'
import { imports, js, jsx, unicorn } from './js.js'
import { jsonc, pkgOrder } from './jsonc.js'
import { markdown } from './markdown.js'
import { perfectionist } from './perfectionist.js'
import { GLOB_EXCLUDE } from './shared.js'
import { typescript } from './typescript.js'
import { vue } from './vue.js'
Expand All @@ -27,6 +28,7 @@ export const basic = [
...markdown,
...eslintComments,
...prettier,
...perfectionist,
]

/** @type { FlatESLintConfigItem[] } */
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"eslint-plugin-import-x": "^0.5.0",
"eslint-plugin-jsonc": "^2.15.1",
"eslint-plugin-markdown": "^4.0.1",
"eslint-plugin-perfectionist": "^2.10.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
Expand Down
38 changes: 38 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d86cbb8

Please sign in to comment.