Skip to content

Latest commit

 

History

History
133 lines (99 loc) · 7.63 KB

File metadata and controls

133 lines (99 loc) · 7.63 KB

Icon GitHub Action: Lint

Lint

Marketplace Release License Stars PRs Welcome

Overview

Action to lint Node.js projects with support for pull request reporting and annotations

Usage

- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@775ce0902c528062cc94141dd7d13261083b752a # 0.22.0
  with:
    # Working directory where lint commands are executed.
    # Can be absolute or relative to the repository root.
    #
    # Default: `.`
    working-directory: .

    # Whether running in container mode (skips checkout and node setup)
    # Default: `false`
    container: "false"

    # npm/pnpm/Yarn script command to run for linting.
    # This should be a script defined in your `package.json`.
    # The command should generate lint report files in a standard format.
    #
    # ESLint: `eslint --format json -o eslint-report.json .`
    # Prettier: `prettier --check . | tee prettier-report.txt`
    # Astro: `astro check | tee astro-report.txt`
    #
    # Default: `lint:ci`
    command: lint:ci

    # Optional lint report path forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/parse-ci-reports) action.
    # Provide an absolute path or one relative to the working directory.
    # When omitted, the action falls back to `auto:lint` detection.
    report-file: ""

    # Optional path mapping to adjust file paths in test and coverage reports.
    # See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/parse-ci-reports) for details.
    path-mapping: ""

Inputs

Input Description Required Default
working-directory Working directory where lint commands are executed. false .
Can be absolute or relative to the repository root.
container Whether running in container mode (skips checkout and node setup) false false
command npm/pnpm/Yarn script command to run for linting. false lint:ci
This should be a script defined in your package.json.
The command should generate lint report files in a standard format.
ESLint: eslint --format json -o eslint-report.json .
Prettier: prettier --check . | tee prettier-report.txt
Astro: astro check | tee astro-report.txt
report-file Optional lint report path forwarded to the parse-ci-reports action. false -
Provide an absolute path or one relative to the working directory.
When omitted, the action falls back to auto:lint detection.
path-mapping Optional path mapping to adjust file paths in test and coverage reports. false -
See the parse-ci-reports documentation for details.

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2026 hoverkraft

For more details, see the license.


This documentation was automatically generated by CI Dokumentor.