Enhancement/linting (#34)

* Stop emitting lint errors as warnings

* Execute lint on inital serve for development

* Fix linting errors

* Fix linting warnings

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Philipp Bankonier 2019-09-12 19:28:47 +02:00 committed by Rohit Yadav
parent 7a377c22e0
commit 22bca0c248
4 changed files with 25 additions and 23 deletions

View File

@ -3,8 +3,8 @@
"version": "1.3.0",
"private": true,
"scripts": {
"start": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"start": "vue-cli-service lint --no-fix && vue-cli-service serve",
"serve": "vue-cli-service lint --no-fix && vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'",

View File

@ -222,7 +222,6 @@
</a-collapse-panel>
</a-collapse>
</a-card>
</a-col>
</a-row>
@ -252,11 +251,9 @@ export default {
totalStorage: 0,
guestOsName: '',
osLogo: 'linux',
tags: [],
inputVisible: false,
inputValue: '',
activeKey: ['1', '2', '3'],
tags: ['os=centos', 'tag=value', 'demo=true'],
tagInputVisible: false,
tagInputValue: '',

View File

@ -38,6 +38,11 @@ module.exports = {
.set('@layout', resolve('src/layout'))
.set('@static', resolve('src/static'))
// do not emit errors as a warning
config.module.rule('eslint').use('eslint-loader').tap(
opts => ({ ...opts, emitWarning: false })
)
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
svgRule