javascript-action/.github/workflows/linter.yml

49 lines
961 B
YAML
Raw Normal View History

2023-11-28 05:03:31 +00:00
name: Lint Codebase
2023-09-14 14:36:51 +00:00
on:
pull_request:
2024-02-22 14:34:06 +00:00
branches:
- main
2023-09-14 14:36:51 +00:00
push:
2023-11-28 05:03:31 +00:00
branches:
2023-09-14 14:36:51 +00:00
- main
2023-11-28 05:03:31 +00:00
permissions:
contents: read
2023-12-01 14:10:50 +00:00
packages: read
statuses: write
2023-11-28 05:03:31 +00:00
2023-09-14 14:36:51 +00:00
jobs:
lint:
2023-11-28 05:03:31 +00:00
name: Lint Codebase
2023-09-14 14:36:51 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
2024-02-22 14:34:06 +00:00
with:
fetch-depth: 0
2023-09-14 14:36:51 +00:00
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
2023-09-14 14:36:51 +00:00
with:
2023-11-28 05:03:31 +00:00
node-version-file: .node-version
2023-09-14 14:36:51 +00:00
cache: npm
- name: Install Dependencies
id: install
run: npm ci
2023-11-28 05:03:31 +00:00
- name: Lint Codebase
2023-09-14 14:36:51 +00:00
id: super-linter
uses: super-linter/super-linter/slim@v6
2023-09-14 14:36:51 +00:00
env:
DEFAULT_BRANCH: main
2023-11-28 05:03:31 +00:00
FILTER_REGEX_EXCLUDE: dist/**/*
2023-09-14 14:36:51 +00:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_DEFAULT_STYLE: prettier
2023-11-28 05:03:31 +00:00
VALIDATE_ALL_CODEBASE: true
2023-09-14 14:36:51 +00:00
VALIDATE_JSCPD: false