Skip to content

GitHub action running eslint check in your project, annotating errors/warnings in PR.

License

Notifications You must be signed in to change notification settings

Plastikmensch/eslint-check-action

 
 

Repository files navigation

Eslint check action

GitHub action running eslint check in your project, annotating errors/warnings in PR.

Features

  • Customizable
  • Installs project dependencies if missing
  • Annotates lines in PR with warnings and errors

Usage

Add workflow to your project (ex. .github/workflows/eslint.yml):

name: Lint
on: [push]
jobs:
  eslint_check:
    name: Prepare action
    runs-on: ubuntu-latest
    steps:
      # Checkout action must run prior to eslint check
    - name: Checkout 
      uses: actions/checkout@v1
    - name: Lint
      uses: Krizzu/[email protected]
      with:
        ghToken: ${{ secrets.GITHUB_TOKEN }}
        eslintFiles: "lib, scripts"
        eslintConfig: "myConfigs/eslint.config.js",
        eslintExt: "ts, tsx"

params

eslintFiles

Relative path to files/directories to run lint on. Default: .

eslintConfig

Relative path to eslint config. Can either be .js config, .eslintrc or package.json. Default: .eslintrc

eslintExt

File extension to run linting on. Default: js, ts, jsx, tsx

License

MIT.

About

GitHub action running eslint check in your project, annotating errors/warnings in PR.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 85.7%
  • Dockerfile 6.8%
  • JavaScript 4.2%
  • Shell 3.3%