Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-square

GitHub Action

ESLint changed files

v8

ESLint changed files

check-square

ESLint changed files

Run ESLint on all changed files

Installation

Copy and paste the following snippet into your .yml file.

              

- name: ESLint changed files

uses: tj-actions/eslint-changed-files@v8

Learn more about this action in tj-actions/eslint-changed-files

Choose a version

Test Update release version. Public workflows that use this action.

Ubuntu Mac OS

eslint-changed-files

Github action to run eslint on changed and modified files in a pull request with support for excluding generated files with error reporting.

Example

Screen Shot 2021-09-06 at 1 15 22 PM

Usage

...:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 14
      - name: Install
        run: npm ci  # OR: yarn 
      - name: Run eslint on changed files
        uses: tj-actions/[email protected]
        with:
          config_path: "/path/to/.eslintrc"
          ignore_path: "/path/to/.eslintignore"
          extensions: "ts,tsx,js,jsx"
          extra_args: "--max-warnings=0"

Inputs

Input type required default description
token string false ${{ github.token }} GITHUB_TOKEN
or a repo scoped
Personal Access Token
config_path string false '.eslintrc' eslint configuration file
ignore_path string false '' eslint ignore file
extensions string[] false 'ts,tsx,js,jsx' File extensions to run eslint against
extra_args string false '' Extra arguments passed to eslint
all_files string false 'true' Run eslint on all matching files

If you feel generous and want to show some extra appreciation:

Buy me a coffee

TODO

  • Add support for running action on Windows

Credits