Skip to content

Commit

Permalink
chore: update linting docs
Browse files Browse the repository at this point in the history
  • Loading branch information
frytg committed Aug 9, 2022
1 parent a429639 commit cc26d7c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ on:
required: false
type: string
default: 'VERBOSE'
skip-checkout:
description: 'Whether to skip repository checkout in this workflow'
required: false
type: boolean
default: false

env:
CSS_FILE_NAME: /.stylelintrc.json
Expand Down Expand Up @@ -129,7 +124,6 @@ jobs:
statuses: write
steps:
- name: 👀 Checkout repository
if: inputs.skip-checkout != true
uses: actions/checkout@v3
with:
persist-credentials: false
Expand All @@ -139,7 +133,7 @@ jobs:
with:
persist-credentials: false
repository: swrlab/node-utils
ref: 'dev/prettier-upgrade'
ref: 'main'
path: '.utils'

- name: ⛺️ Install Node.js
Expand Down
44 changes: 44 additions & 0 deletions docs/LINTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Super Linter for SWR Audio Lab

To simplify linting, this repository contains a template, that can be used by all SWR Audio Lab projects.

- [Super Linter for SWR Audio Lab](#super-linter-for-swr-audio-lab)
- [Super Linter](#super-linter)
- [Usage](#usage)
- [Configuration](#configuration)

## Super Linter

The used linter of choice here is `super-linter`, which bundles a lot of different projects. Some that are really not needed are disabled in the config.

Super Linter: [github.com/github/super-linter](https://github.com/github/super-linter)

## Usage

Simply create a file `.github/workflows/linter.yml`:

```yaml
name: Linter

on:
workflow_dispatch:
pull_request:

jobs:
lint:
uses: swrlab/node-utils/.github/workflows/linter.yml
with:
install-all: true
generate-keys: true
```
This uses GitHub's re-usable Actions workflow and call the template using the provided input variables:
- `install-all` - If `true` it will use `yarn install:all` instead of `yarn install` to trigger a custom script.
This is useful, if the repository has multiple sub-folders that all need to be installed
- `generate-keys` - If `true` will call `yarn keys:generate` to run a custom script for dummy key creation.
- `log-level` - One of the follorwing: `ERROR`, `WARN`, `NOTICE`, `VERBOSE`, `DEBUG` or `TRACE`; defaults to `VERBOSE`.

## Configuration

To prevent copying configuration files to every repository, all `super-linter` options are included in this one ([`.github/linters`](./../.github/linters/)) and get cloned into every run.

0 comments on commit cc26d7c

Please sign in to comment.