Open eggoynes opened 2 months ago
The way the ESlint program error can be fixed when running the run-pre-check.py script is to add one line of code before running ESlint and that will cause ESlint v9.0.0 to run successfully.
Put this one export command before the eslint program gets run. Currently eslint is run on line 98 of the code. This export command can be put on line 97.
export ESLINT_USE_FLAT_CONFIG=false
Put the above command before running the ESlint command in the run-pre-check.sh script.
eslint -c .eslintrc.json .
Script located in the deployment folder
deployment/run-pre-check.sh
Before
echo "Eslint Scan started"
npm i -g eslint
cd "$source_dir/html"
eslint -c .eslintrc.json .
After
echo "Eslint Scan started"
npm i -g eslint
cd "$source_dir/html"
export ESLINT_USE_FLAT_CONFIG=false <--- Add this line here to the run-pre-check.sh script before the eslint command
eslint -c .eslintrc.json .
This will be fixed in the next version release of this solution. Thank you.
Describe the bug
The build-s3-dist.sh works fine for building the solution. But if the HTML code linting script wants to be run which is called run-pre-check.sh in the deployment directory the ESlint command on line 98 of the script fails to run. This started when ESlint was updated to v9.0.0. Nothing has changed in the code, just the program ESlint itself has an error running.
https://github.com/aws-solutions/media-services-application-mapper/blob/main/deployment/run-pre-check.sh#L98
To Reproduce Steps to reproduce the behavior: