Skip to content

Commit a7d0b3c

Browse files
authored
Update script-indent.md
1 parent e53bfd3 commit a7d0b3c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/rules/script-indent.md

+18
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@ const d = {
7979
</script>
8080
```
8181

82+
## Important note
83+
84+
This rule only checks `.vue` files and does not interfere with other `.js` files. Unfortunately the default `indent` rule when turned on will try to lint both, so in order to make them complementary you can use `overrides` setting and disable `indent` rule on `.vue` files:
85+
86+
```
87+
"rules": {
88+
"vue/script-indent": ["error", 4, { "baseIndent": 1 }]
89+
},
90+
"overrides": [
91+
{
92+
"files": ["*.vue"],
93+
"rules": {
94+
"indent": "off"
95+
}
96+
}
97+
]
98+
```
99+
82100
## Related rules
83101

84102
- [indent](https://eslint.org/docs/rules/indent)

0 commit comments

Comments
 (0)