Skip to content

Commit

Permalink
chore: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
coderwyd committed Sep 6, 2024
1 parent ba47329 commit f80dc2b
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"build": "nr build:typegen && tsup",
"dev": "npx @eslint/config-inspector",
"lint": "eslint --flag unstable_ts_config .",
"lint:fix": "eslint . --fix",
"lint:fix": "eslint --flag unstable_ts_config . --fix",
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
"build:typegen": "tsx scripts/typegen.ts",
"prepack": "nr build",
Expand Down
3 changes: 1 addition & 2 deletions scripts/typegen.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { writeFile } from 'node:fs/promises'
import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
import { builtinRules } from 'eslint/use-at-your-own-risk'
import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
import picocolors from 'picocolors'
import {
command,
Expand Down Expand Up @@ -60,7 +60,6 @@ const configs = await combine(

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

// @ts-expect-error eslint typegen version
let dts = await flatConfigsToRulesDTS(configs, {
includeAugmentation: false,
})
Expand Down
2 changes: 1 addition & 1 deletion src/configs/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import {
GLOB_YAML,
} from '../constants/glob'
import { ensurePackages, interopDefault, parserPlain } from '../shared'
import { StylisticConfigDefaults } from './stylistic'
import type {
OptionsFormatters,
PartialPrettierExtendedOptions,
PrettierParser,
StylisticConfig,
TypedFlatConfigItem,
} from '../types'
import { StylisticConfigDefaults } from './stylistic'

export async function formatter(
options: OptionsFormatters | true = {},
Expand Down
1 change: 0 additions & 1 deletion src/configs/imports.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { GLOB_SRC_EXT } from '../constants/glob'
import { pluginAntfu, pluginImport } from '../plugins'
import type { OptionsStylistic, TypedFlatConfigItem } from '../types'

Expand Down
22 changes: 11 additions & 11 deletions src/configs/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
export * from './command'
export * from './comments'
export * from './disables'
export * from './formatter'
export * from './ignores'
export * from './imports'
export * from './javascript'
export * from './jsdoc'
export * from './jsonc'
export * from './jsx'
export * from './node'
export * from './perfectionist'
export * from './react'
export * from './regexp'
export * from './sort'
export * from './stylistic'
export * from './svelte'
export * from './tailwindcss'
export * from './test'
export * from './typescript'
export * from './unicorn'
export * from './vue'
export * from './test'
export * from './perfectionist'
export * from './react'
export * from './unocss'
export * from './formatter'
export * from './svelte'
export * from './tailwindcss'
export * from './command'
export * from './regexp'
export * from './jsx'
export * from './disables'
export * from './vue'
1 change: 0 additions & 1 deletion src/configs/javascript.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import globals from 'globals'
import { GLOB_SRC, GLOB_SRC_EXT } from '../constants/glob'
import { pluginUnusedImports } from '../plugins'
import type {
OptionsIsInEditor,
Expand Down
2 changes: 1 addition & 1 deletion src/configs/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import process from 'node:process'
import { GLOB_ASTRO_TS, GLOB_DTS, GLOB_MARKDOWN, GLOB_TS, GLOB_TSX } from '../constants/glob'
import { GLOB_ASTRO_TS, GLOB_MARKDOWN, GLOB_TS, GLOB_TSX } from '../constants/glob'
import { pluginAntfu } from '../plugins'
import { interopDefault, renameRules } from '../shared'
import type {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Linter } from 'eslint'
import {
command,
comments,
disables,
formatter,
ignores,
imports,
Expand All @@ -21,7 +23,6 @@ import {
typescript,
unicorn,
unocss,
disables,
vue,
} from './configs'
import {
Expand All @@ -37,7 +38,6 @@ import {
resolveSubOptions,
} from './shared'
import type { Awaitable, OptionsConfig, TypedFlatConfigItem } from './types'
import type { Linter } from 'eslint'

const flatConfigProps = [
'name',
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// eslint-disable-next-line ts/ban-ts-comment
// @ts-nocheck

export { default as pluginAntfu } from 'eslint-plugin-antfu'
export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments'
export { default as pluginAntfu } from 'eslint-plugin-antfu'
export * as pluginImport from 'eslint-plugin-import-x'
export { default as pluginNode } from 'eslint-plugin-n'
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist'
export { default as pluginUnicorn } from 'eslint-plugin-unicorn'
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports'
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist'
8 changes: 4 additions & 4 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type {
PartialPrettierExtendedOptions,
TypedFlatConfigItem,
} from './rule'
import type { StylisticCustomizeOptions } from '@stylistic/eslint-plugin'
import type { ParserOptions } from '@typescript-eslint/parser'
import type { FlatGitignoreOptions } from 'eslint-config-flat-gitignore'
import type { Options as VueBlocksOptions } from 'eslint-processor-vue-blocks'
import type {
PartialPrettierExtendedOptions,
TypedFlatConfigItem,
} from './rule'

export * from './rule'

Expand Down
2 changes: 1 addition & 1 deletion src/types/rule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ConfigNames, RuleOptions } from './typegen'
import type { Linter } from 'eslint'
import type { ConfigNames, RuleOptions } from './typegen'

export type Rules = RuleOptions

Expand Down

0 comments on commit f80dc2b

Please sign in to comment.