The official [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) supports linting both the template and script parts of Vue single file components.
Make sure to use the plugin's included config in your ESLint config:
...
...
@@ -43,3 +45,35 @@ module.exports = {
}
}
```
## stylelint
[stylelint](https://stylelint.io) supports linting style parts of Vue single file components.
[Make sure that your stylelint config is right.](https://stylelint.io/user-guide/configuration/)
Then from the command line:
``` bash
stylelint MyComponent.vue
```
Another option is using [stylelint-webpack-plugin](https://github.com/webpack-contrib/stylelint-webpack-plugin):
Официальный плагин [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) поддерживает проверку секций шаблона и кода в однофайловых компонентах Vue.
Убедитесь, что используете поставляемую с плагином конфигурацию в вашей конфигурации ESLint:
...
...
@@ -43,3 +45,35 @@ module.exports = {
}
}
```
## stylelint
[stylelint](https://stylelint.io) поддерживает проверку секций стилей в однофайловых компонентах Vue.
[Убедитесь, что ваша конфигурация stylelint корректна.](https://stylelint.io/user-guide/configuration/)
Затем выполните в командной строке:
``` bash
stylelint MyComponent.vue
```
Вы также можете использовать плагин [stylelint-webpack-plugin](https://github.com/webpack-contrib/stylelint-webpack-plugin):