aws-lex-web-ui
aws-lex-web-ui copied to clipboard
webui npm run dev throws LOTS of linting errors - fails build
Trying to test the web UI locally by running npm run dev
from the lex-web-ui
folder, I'm seeing the build fail with loads of linting errors.
Mostly seem to be about newline conventions for wrapping lines, e.g:
let myResult = mySuperLongCondition
? optionOne
: optionTwo;
// vs
let myResult = mySuperLongCondition ?
optionOne :
optionTwo;
...and likewise for comparators; plus a few long lines and some where it seems to not like the /* global ... */
declarations in files.
I see in package.json that the relevant commands are currently:
{
"scripts": {
"serve": "vue-cli-service serve",
"dev": "vue-cli-service serve",
"build": "vue-cli-service build --skip-plugins @vue/cli-plugin-eslint",
"build:dev": "vue-cli-service build --mode development",
"build-dist": "npm run build:lib-dev && npm run build:lib-prod",
"build:lib-dev": "BUILD_TARGET=lib vue-cli-service build --skip-plugins @vue/cli-plugin-eslint ---no-clean --mode development src/lex-web-ui.js",
"build:lib-prod": "BUILD_TARGET=lib vue-cli-service build --skip-plugins @vue/cli-plugin-eslint --no-clean ---mode production src/lex-web-ui.js"
}
}
...So I guess somebody got tired of enforcing linting and disabled the checks for the build pipeline.
My current workaround is to add the --skip-plugins @vue/cli-plugin-eslint
directive to my dev
command too, but seems like the actual solution should be to fix the errors and re-enable linting on the others too?
Thanks for this.. I've added this issue to our backlog to fix in an upcoming release.
hey, you can control linting errors by ignoring them in .eslintignore file.
Thanks! Got the same issue and adding --skip-plugins @vue/cli-plugin-eslint
as you said allowed me to ignore these errors.