Skip to content

Commit ae50c45

Browse files
committed
fix(jsonc): indent config
1 parent cdb3af7 commit ae50c45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/configs/jsonc.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export function jsonc(options: OptionsStylistic & OptionsOverrides = {}): FlatES
77
stylistic = true,
88
overrides = {},
99
} = options
10+
const {
11+
indent = 2,
12+
} = typeof stylistic === 'boolean' ? {} : stylistic
1013
return [
1114
{
1215
name: 'coderwyd:jsonc:setup',
@@ -53,7 +56,7 @@ export function jsonc(options: OptionsStylistic & OptionsOverrides = {}): FlatES
5356
'jsonc/array-bracket-spacing': ['error', 'never'],
5457
'jsonc/comma-dangle': ['error', 'never'],
5558
'jsonc/comma-style': ['error', 'last'],
56-
'jsonc/indent': ['error', 2],
59+
'jsonc/indent': ['error', indent],
5760
'jsonc/key-spacing': ['error', { afterColon: true, beforeColon: false }],
5861
'jsonc/object-curly-newline': ['error', { consistent: true, multiline: true }],
5962
'jsonc/object-curly-spacing': ['error', 'always'],

0 commit comments

Comments
 (0)