Add Simon Game project by Tanmita Roy #50
Workflow file for this run
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: javascript-linter | |
on: | |
pull_request: | |
branches: [main] | |
paths: ['**.js', '**.jsx'] | |
workflow_call: | |
jobs: | |
eslint: | |
name: eslint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out the repo | |
uses: actions/checkout@v4.1.0 | |
- name: Setting up Node.js environment | |
uses: actions/setup-node@v3.8.1 | |
with: | |
node-version: 20 | |
- name: Setting up eslint | |
run: | | |
npm init -y | |
npm install eslint @eslint/js globals --save-dev | |
touch eslint.config.cjs | |
- name: Adding eslint configurations | |
uses: DamianReeves/write-file-action@v1.2 | |
with: | |
path: eslint.config.cjs | |
write-mode: overwrite | |
contents: | | |
const js = require('@eslint/js'); | |
const globals = require('globals'); | |
module.exports = [ | |
{ | |
ignores: ['**/*.min.js'], | |
}, | |
js.configs.recommended, | |
{ | |
languageOptions: { | |
ecmaVersion: 'latest', | |
sourceType: 'module', | |
globals: { | |
...globals.browser, | |
...globals.es2021, | |
...globals.node, | |
}, | |
}, | |
rules: { | |
'no-undef': 'off', | |
'no-unused-vars': 'off', | |
}, | |
}, | |
]; | |
- name: eslint | |
run: | | |
npx eslint . |