From f65b90f539e20ce3cd3fde4c921a21b4beb5b674 Mon Sep 17 00:00:00 2001 From: Will Toohey Date: Sun, 29 Oct 2023 10:50:31 +1000 Subject: [PATCH] Validate javascript on PRs --- .eslintrc.yml | 9 +++++++++ .github/workflows/{html.yml => check.yml} | 8 ++++++-- .gitignore | 2 ++ package.json | 10 ++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .eslintrc.yml rename .github/workflows/{html.yml => check.yml} (54%) create mode 100644 .gitignore create mode 100644 package.json diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..8039f6e --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,9 @@ +plugins: + - html +env: + browser: true + es2021: true +overrides: [] +parserOptions: + ecmaVersion: latest +rules: {} diff --git a/.github/workflows/html.yml b/.github/workflows/check.yml similarity index 54% rename from .github/workflows/html.yml rename to .github/workflows/check.yml index e17df3b..198f2cd 100644 --- a/.github/workflows/html.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: HTML Check +name: Check HTML/JS is valid on: pull_request: @@ -9,8 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: HTML5 Validator + - name: Run HTML5 Validator uses: Cyb3r-Jak3/html5validator-action@v7.2.0 with: config: ./.github/html5validator.yml css: true + - name: Install modules for eslint + run: npm i + - name: Run ESLint + run: npx eslint . --ext .js,.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4421b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +package-lock.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..3ae4ade --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "bemanipatcher", + "version": "1.0.0", + "description": "Online DLL patcher. This file only exists for eslint.", + "author": "mon", + "devDependencies": { + "eslint": "^8.52.0", + "eslint-plugin-html": "^7.1.0" + } +}