Skip to content

Update eslint.yml

Update eslint.yml #18

Workflow file for this run

on:
push:
branches:
- 'main'
- 'dev'
name: eslint
jobs:
eslint:
runs-on: ubuntu-22.04
steps:
- name: clone-branch
run: |
git clone [email protected]:Defirence/javascript.git
pwd && ls -lash
- name: eslint
run: |
printf "Running eslint against webserver.js..."
# cd
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install curl -y
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get install yarn -y
yarn --version
yarn install && yarn audit && npx eslint webserver.js
printf "\n[INFO] - Done running eslint checks but with "new-cap" rule disabled, exiting ..."
# TODO: Chore: Add a step to use the $SNYK_TOKEN env var for the GitHub workflow.
# TODO: Chore: Snyk allows for installation via the yarn.lock and then auth via the env var.
# TODO: Feature: Consider having a separate step to scan with Snyk, and display an updated summary of security etc.
# TODO: Feature: Add support for FOSSA scanning and displaying the data on README.md