Skip to content

Commit

Permalink
chore: reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Dec 8, 2023
1 parent 7855c0c commit 3b1f334
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
25 changes: 10 additions & 15 deletions src/configs/formatters.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import * as parserPlain from 'eslint-parser-plain'
import {
GLOB_CSS,
GLOB_LESS,
GLOB_MARKDOWN,
GLOB_MDX,
GLOB_POSTCSS,
GLOB_SCSS,
} from '../globs'
import { GLOB_CSS, GLOB_LESS, GLOB_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS } from '../globs'
import type { VendoredPrettierOptions } from '../vender/prettier-types'
import { ensurePackages, interopDefault } from '../utils'
import type {
FlatConfigItem,
OptionsFormatters,
StylisticConfig,
} from '../types'
import type { FlatConfigItem, OptionsFormatters, StylisticConfig } from '../types'
import { StylisticConfigDefaults } from './stylistic'

export async function formatters(
Expand All @@ -32,7 +21,11 @@ export async function formatters(
}
}

const { indent, quotes, semi } = {
const {
indent,
quotes,
semi,
} = {
...StylisticConfigDefaults,
...stylistic,
}
Expand Down Expand Up @@ -161,7 +154,9 @@ export async function formatters(
}

if (options.markdown) {
const formatter = options.markdown === true ? 'prettier' : options.markdown
const formatter = options.markdown === true
? 'prettier'
: options.markdown

configs.push(
{
Expand Down
12 changes: 5 additions & 7 deletions src/configs/markdown.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import * as mdx from 'eslint-plugin-mdx'

import type {
FlatConfigItem,
OptionsComponentExts,
OptionsFiles,
OptionsOverrides,
} from '../types'
import type { FlatConfigItem, OptionsComponentExts, OptionsFiles, OptionsOverrides } from '../types'
import { GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_OR_MDX } from '../globs'

export async function markdown(
options: OptionsFiles & OptionsComponentExts & OptionsOverrides = {},
): Promise<FlatConfigItem[]> {
const { componentExts = [], overrides = {} } = options
const {
componentExts = [],
overrides = {},
} = options

return [
{
Expand Down

0 comments on commit 3b1f334

Please sign in to comment.