Skip to content

Commit

Permalink
fix(jsonc): indent config
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 5, 2023
1 parent ee36be4 commit 45e302d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/configs/jsonc.ts
Expand Up @@ -8,6 +8,10 @@ export function jsonc(options: OptionsStylistic & OptionsOverrides = {}): FlatES
overrides = {},
} = options

const {
indent = 2,
} = typeof stylistic === 'boolean' ? {} : stylistic

return [
{
name: 'antfu:jsonc:setup',
Expand Down Expand Up @@ -54,7 +58,7 @@ export function jsonc(options: OptionsStylistic & OptionsOverrides = {}): FlatES
'jsonc/array-bracket-spacing': ['error', 'never'],
'jsonc/comma-dangle': ['error', 'never'],
'jsonc/comma-style': ['error', 'last'],
'jsonc/indent': ['error', 2],
'jsonc/indent': ['error', indent],
'jsonc/key-spacing': ['error', { afterColon: true, beforeColon: false }],
'jsonc/object-curly-newline': ['error', { consistent: true, multiline: true }],
'jsonc/object-curly-spacing': ['error', 'always'],
Expand Down

0 comments on commit 45e302d

Please sign in to comment.