You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/format-query-block.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ description: Enforce consistent format style in query block ex) `<page-query>`,`
10
10
11
11
- This rule checks the consistency of a code in `<page-query>` and `<static-query>` tags.
12
12
- This rule's formatter is [Prettier](https://prettier.io). [Parser is `graphql`](https://prettier.io/docs/en/options.html#parser)
13
-
- If you use `.prettierrc`, this rule is check that file. Consider option `tabWidth` and `useTabs`.
13
+
- If you use `.prettierrc`, this rule follow Prettier's option at `.prettierrc`. This rule checks the option `useTabs`, `tabWidth`, and `vueIndentScriptAndStyle`.
14
14
15
15
## :book: Rule Details
16
16
@@ -44,4 +44,21 @@ description: Enforce consistent format style in query block ex) `<page-query>`,`
44
44
45
45
## :wrench: Options
46
46
47
-
Nothing.
47
+
```json
48
+
{
49
+
"gridsome/format-query-block": [
50
+
"warn",
51
+
{
52
+
"overridePrettierOption": {
53
+
"tabWidth": 4,
54
+
"vueIndentScriptAndStyle": true
55
+
}
56
+
}
57
+
]
58
+
}
59
+
```
60
+
61
+
-`overridePrettierOption` (`{ tabWidth: number; useTabs: boolean; vueIndentScriptAndStyle: boolean; }`) ... This option can override Prettier's option. Default is `{}`
0 commit comments