Skip to content

Commit

Permalink
refactor(eslint-config): remove functional
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Dec 28, 2024
1 parent d9d588d commit b13d032
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 126 deletions.
1 change: 0 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"dependencies": {
"defu": "^6.1.4",
"eslint-flat-config-utils": "^0.4.0",
"eslint-plugin-functional": "^7.2.0",
"eslint-plugin-perfectionist": "^4.4.0"
},
"devDependencies": {
Expand Down
27 changes: 0 additions & 27 deletions packages/eslint-config/src/configs/functional.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/eslint-config/src/configs/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './antfu'
export * from './functional'
export * from './perfectionist'
export * from './sort'
8 changes: 4 additions & 4 deletions packages/eslint-config/src/configs/perfectionist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import type { Options } from '../options'

import perfectionistPlugin from 'eslint-plugin-perfectionist'

export const perfectionist = (option: Exclude<Options['perfectionist'], false>): Linter.Config[] => [
{
export const perfectionist = (option: Exclude<Options['perfectionist'], false>): Linter.Config =>
({
name: 'importantimport/perfectionist/rules',
rules: perfectionistPlugin.configs[`recommended-${option}`].rules,
}
]
})

6 changes: 1 addition & 5 deletions packages/eslint-config/src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ResolvableFlatConfig } from 'eslint-flat-config-utils'

import { defu } from 'defu'

import { disableAntfuTopLevelFunction, functional, perfectionist, sortPackageJsonScripts } from './configs'
import { disableAntfuTopLevelFunction, perfectionist, sortPackageJsonScripts } from './configs'
import { defaultOptions, type Options } from './options'

export const ii = (userOptions: Partial<Options> = {}): ResolvableFlatConfig<Linter.Config> => {
Expand All @@ -16,10 +16,6 @@ export const ii = (userOptions: Partial<Options> = {}): ResolvableFlatConfig<Lin
// ? [sortPackageJsonScripts]
// : []
// ),
...(options.functional
? functional(options.functional)
: []
),
...(options.perfectionist
? [perfectionist(options.perfectionist)]
: []
Expand Down
88 changes: 0 additions & 88 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 b13d032

Please sign in to comment.