aws-lex-web-ui icon indicating copy to clipboard operation
aws-lex-web-ui copied to clipboard

webui npm run dev throws LOTS of linting errors - fails build

Open athewsey opened this issue 3 years ago • 3 comments

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?

athewsey avatar Apr 29 '21 08:04 athewsey

Thanks for this.. I've added this issue to our backlog to fix in an upcoming release.

rstrahan avatar Apr 29 '21 11:04 rstrahan

hey, you can control linting errors by ignoring them in .eslintignore file.

kalyanigaydhane avatar Sep 01 '21 08:09 kalyanigaydhane

Thanks! Got the same issue and adding --skip-plugins @vue/cli-plugin-eslint as you said allowed me to ignore these errors.

tonystrawberry avatar Jun 19 '23 04:06 tonystrawberry