Skip to content

Commit

Permalink
eslint check action
Browse files Browse the repository at this point in the history
  • Loading branch information
jackschedel committed Jan 5, 2024
1 parent 477a672 commit dd66a51
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ESLint

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]

jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install ESLint
run: |
npm install [email protected]
npm install @microsoft/[email protected]
- name: Run ESLint
run: npx eslint .
--config .eslintrc.js
--ext .js,.jsx,.ts,.tsx
--format @microsoft/eslint-formatter-sarif
--output-file eslint-results.sarif
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function App() {
const goBack = useGoBack();
const goForward = useGoForward();

let test = 'eslint find this';

const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
// put any general app-wide keybinds here
if (e.ctrlKey && e.key === 'e') {
Expand Down

0 comments on commit dd66a51

Please sign in to comment.