错误预期在关闭括号之前有1个换行符,但没有换行符\发现vue / html-closing-bracket-newline

时间:2019-01-28 16:35:41

标签: javascript vue.js eslint eslint-plugin-vue

我当前的 .eslintrc.js 文件已为eslint-plugin-vue设置了这些选项 插件:

"vue/html-closing-bracket-newline": ["error", {
    "singleline": "never",
    "multiline": "always"
    }]

此问题仅接受以下语法:

<v-flex                                                                     
  xs12                                                                      
>                                                                           
  <Test />                                                                  
</v-flex> 

如何要求它让我这样写:

<v-flex                                                                     
  xs12>                                                                           
  <Test />                                                                  
</v-flex> 

如果我写了最后一种语法,ESLint会抱怨:

error  Expected 1 line break before closing bracket, but no line breaks\
 found  vue/html-closing-bracket-newline    

1 个答案:

答案 0 :(得分:1)

按照documentation

never

...应该可以解决您的问题。不幸的是,无法将规则实施为接受两者。它是alwaysalways
您的选择。但是Vue 强烈建议使用from keras.layers import Dense,Dropout,Softmax,Flatten from keras.models import Sequential from keras.preprocessing import image from keras.optimizers import adam model=Sequential() model.add(Flatten()) model.add(Dense(128,activation='relu')) model.add(Dense(128,activation='relu')) model.add(Dense(128,activation='relu')) model.add(Dropout(0.4)) model.add(Dense(10,activation='Softmax')) model.compile(loss='sparse_categorical_crossentropy', optimizer=adam, metrics=['accuracy'])