From 1520eac2262fa59f7f2af44c7b231ab9ad7a87ab Mon Sep 17 00:00:00 2001 From: phette23 Date: Mon, 10 Feb 2025 13:31:14 -0800 Subject: [PATCH] ci: lint workflow ref #165 --- .github/workflows/lint.yml | 25 +++++++++++++++++++++++++ eslint.config.js | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..57092c1a --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,25 @@ +name: 'CSS & JS Lint' + +on: + push: + branches: + - 'main' + - 'dev' + +jobs: + lint: + name: 'Lint' + runs-on: 'ubuntu-latest' + steps: + - name: 'Checkout' + uses: 'actions/checkout@v4.2.2' + - name: 'pnpm install' + uses: pnpm/action-setup@v4 + with: + run_install: true + version: 10 + # see package.json for specific arguments passed to linters + - name: 'JavaScript Lint' + run: npm run eslint + - name: 'SCSS Lint' + run: npm run sass-lint diff --git a/eslint.config.js b/eslint.config.js index 8f204596..9f35a2d7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,7 +5,7 @@ module.exports = [ js.configs.recommended, // "global" ignores must be alone in a config object // https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores - {ignores: ["**/*.min.js"]}, + {ignores: ["**/*.min.js", ".venv/**"]}, // client-side js for the website { files: ["libraries/**/*.js"],