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

v9

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@v9

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

Choose a version

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

All Contributors

Ubuntu Mac OS Windows

eslint-changed-files

Run ESLint on either all files which performs slow in most cases or selectively run ESLint on only changed files in a pull request with support for error reporting via GitHub checks.

Screen Shot 2022-01-01 at 9 26 14 PM

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 dependencies
        run: npm ci  # OR: yarn 

      - name: Run eslint on changed files
        uses: tj-actions/eslint-changed-files@v8.6
        with:
          config_path: "/path/to/.eslintrc"
          ignore_path: "/path/to/.eslintignore"
          extra_args: "--max-warnings=0"

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

Support this project with a ⭐

Buy me a coffee

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
all_files string false Run ESlint on all matching
files
config_path string false ".eslintrc" ESlint configuration file
extra_args string false Extra arguments passed to ESlint
file_extensions string false "**/*.ts\n**/*.tsx\n**/*.js\n**/*.jsx\n" List of file extensions to
watch for changes and run
ESlint against
ignore_path string false ESlint ignore file
token string true "${{ github.token }}" GITHUB_TOKEN or a repo scoped
Personal Access Token

Credits

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Clinton Blackburn

💻

This project follows the all-contributors specification. Contributions of any kind welcome!