From 648398c63cfb6fe1cc139cbfbfc58a726ae00c9c Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 27 Jul 2025 01:11:55 +0800 Subject: [PATCH] ci: migrate eslint and stylelint from codacy to gh-actions --- .github/workflows/lint-js.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/lint-scss.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/lint-js.yml create mode 100644 .github/workflows/lint-scss.yml diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml new file mode 100644 index 000000000..1e1923486 --- /dev/null +++ b/.github/workflows/lint-js.yml @@ -0,0 +1,30 @@ +name: Lint JS + +on: + push: + paths: + - "_javascript/**/*.js" + - ".github/workflows/scripts/**/*.js" + - "*.js" + pull_request: + paths: + - "_javascript/**/*.js" + - ".github/workflows/scripts/*.js" + - "*.js" + +jobs: + lint-js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Install Dependencies + run: npm i + + - name: Lint JS + run: npm run lint:js diff --git a/.github/workflows/lint-scss.yml b/.github/workflows/lint-scss.yml new file mode 100644 index 000000000..57776dd2c --- /dev/null +++ b/.github/workflows/lint-scss.yml @@ -0,0 +1,26 @@ +name: Lint SCSS + +on: + push: + paths: + - "_sass/**/*.scss" + pull_request: + paths: + - "_sass/**/*.scss" + +jobs: + lint-scss: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Install Dependencies + run: npm i + + - name: Lint SCSS + run: npm run lint:scss