代码校验 (Linting)

    请确认在你的 ESLint 配置文件中使用该插件要导入的配置:

    接下来从命令行运行:

    请确保它是作为一个 pre-loader 运用的:

    1. // webpack.config.js
    2. module.exports = {
    3. rules: [
    4. {
    5. enforce: 'pre',
    6. test: /\.(js|vue)$/,
    7. exclude: /node_modules/
    8. }
    9. ]
    10. }

    stylelint

    支持在 Vue 单文件组件的样式部分的代码校验。

    接下来从命令行运行:

    另一个选项是使用 stylelint-webpack-plugin: