Skip to content

Refactor: Transition to TypeScript and Webpack build system #1322

Refactor: Transition to TypeScript and Webpack build system

Refactor: Transition to TypeScript and Webpack build system #1322

Workflow file for this run

---
name: Build, run tests, code linting
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
branches-ignore:
- master
paths-ignore:
- '**.md'
jobs:
code-quality-check:
permissions:
id-token: write
contents: read
name: Check code quality
uses: CropperBlazor/Cropper.Blazor/.github/workflows/build-test-template.yml@dev
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
run-js-tests: true
es-linting:
permissions:
contents: read
needs: code-quality-check
name: ESLint - TypeScript Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Install npm dependencies
run: npm install
working-directory: src/Cropper.Blazor/Cropper.Blazor
- name: Run ESLint
run: npm run lint
working-directory: src/Cropper.Blazor/Cropper.Blazor
code-linting:
permissions:
# To write linting fixes
contents: write
# To write Super-linter status checks
statuses: write
name: Code linting
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
persist-credentials: false
- name: Super-Linter
uses: super-linter/super-linter@v8.2.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT_FOLDER: Reports
OUTPUT_DETAILS: detailed
LOG_LEVEL: WARN
VALIDATE_ALL_CODEBASE: true
VALIDATE_YAML: false
VALIDATE_MARKDOWN: false
VALIDATE_JAVASCRIPT_PRETTIER: false
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_DOTNET_SLN_FORMAT_STYLE: false
VALIDATE_DOTNET_SLN_FORMAT_ANALYZERS: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_CSS_PRETTIER: false
VALIDATE_HTML_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_TYPESCRIPT_PRETTIER: false
VALIDATE_TYPESCRIPT_ES: false
FILTER_REGEX_EXCLUDE: '(\W|^)(obj/|bin/|node_modules/)|(\W|^)(.*([.]min[.]css))($)|(\W|^)(.*([.]min[.]js))($)'
FILTER_REGEX_INCLUDE: "/github/workspace/src/Cropper.Blazor/.*|/github/workspace/.github/.*"
JSCPD_CONFIG_FILE: ".jscpd.json"
HTML_FILE_NAME: ".htmlhintrc"
CSS_FILE_NAME: ".stylelintrc.json"
GITHUB_ACTIONS_ZIZMOR_CONFIG_FILE: ".zizmor.yaml"
YAML_CONFIG_FILE: ".yaml-lint.yml"