Fix lint errors #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'CI/CD' | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| lint_js: | |
| name: Lint JavaScript Files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| - name: Install and Run Linter | |
| run: | | |
| # This command finds all JavaScript files recursively and runs JSHint on them | |
| npm init -y | |
| npm install eslint eslint-config-standard eslint@^8.0.1 eslint-plugin-import@^2.25.2 eslint-plugin-n@^16.0.0 eslint-plugin-promise@^6.0.0 | |
| ./node_modules/.bin/eslint -c .eslintrc.js secondChance-backend sentiment | |
| echo "Linted all the js files successfully" |