From ef477904354ee2dc2b492e7e2f640c2293127fce Mon Sep 17 00:00:00 2001 From: aadeyemiadl <147636785+aadeyemiadl@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:59:15 -0400 Subject: [PATCH] Update install-lint.sh added eslint to script --- install-lint.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/install-lint.sh b/install-lint.sh index f49f0d91..ce5b5034 100644 --- a/install-lint.sh +++ b/install-lint.sh @@ -71,3 +71,47 @@ echo "# Python Linting Complete (Comments Above)" echo "#====================================================#" echo "" + + # Simple script to install and run ESlint + echo "" + echo "#====================================================#" + echo "# Installing and Configuring ESlint + echo "#====================================================#" + echo "" + +# Install npm if not already intsalled + sudo apt-get install npm +# Install eslint if not already intsalled + npm install --save-dev eslint + sudo apt install eslint -g + + chmod -R a+x node_modules + +# Initialize config file if not already done + npm init + npm init @eslint/config + + + echo "" + echo "#====================================================#" + echo "# ESlint Installation Complete" + echo "#====================================================#" + echo "" + +# Check ESlint version to make sure it is installed + eslint -v + + echo "" + echo "#====================================================#" + echo "# Now Running ESlint" + echo "#====================================================#" + echo "" + + # Run ESlint on NodeJS files + eslint ./ + + echo "" + echo "#====================================================#" + echo "# NodeJS Linting Complete (Comments Above)" + echo "#====================================================#" + echo ""