Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tj-actions/eslint-changed-files
:octocat: Github action to run ESLint on changed pull request files with support for reporting errors via Github checks.
https://github.com/tj-actions/eslint-changed-files
actions changed-files changedetection code-quality code-review eslint eslint-github-bot github github-action github-actions github-actions-javascript github-annotations github-checks javascript lint-action pull-requests
Last synced: 4 days ago
JSON representation
:octocat: Github action to run ESLint on changed pull request files with support for reporting errors via Github checks.
- Host: GitHub
- URL: https://github.com/tj-actions/eslint-changed-files
- Owner: tj-actions
- License: mit
- Created: 2020-05-23T01:00:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T06:27:16.000Z (17 days ago)
- Last Synced: 2025-02-08T18:08:28.148Z (11 days ago)
- Topics: actions, changed-files, changedetection, code-quality, code-review, eslint, eslint-github-bot, github, github-action, github-actions, github-actions-javascript, github-annotations, github-checks, javascript, lint-action, pull-requests
- Language: Shell
- Homepage:
- Size: 7.9 MB
- Stars: 87
- Watchers: 4
- Forks: 21
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-ccamel - tj-actions/eslint-changed-files - :octocat: Github action to run ESLint on changed pull request files with support for reporting errors via Github checks. (Shell)
README
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
[](https://github.com/search?o=desc\&q=tj-actions+eslint-changed-files+language%3AYAML\&s=\&type=Code)[](https://github.com/tj-actions/eslint-changed-files/actions/workflows/test.yml) [](https://github.com/tj-actions/eslint-changed-files/actions?query=workflow%3A%22Update+release+version.%22)
[](#contributors-)
# eslint-changed-files
Run ESLint on either all files or selectively run ESLint on only changed files in a pull request with support for inline annotations of ESLint Warnings & Errors.

## Features
* Easy to debug
* Fast execution
* Fix ESlint errors
* [Glob pattern](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet) extension filtering
* Excludes ignored files from change detection.
* Inline annotations of ESLint Warnings & Errors.
* Inline annotations with possible resolutions that can be applied to the Pull Request.
* Monorepo support.## Example

## Usage
```yml
...:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4- uses: actions/setup-node@v4
with:
node-version: 20.x- name: Install dependencies
run: npm ci # OR: yarn install --frozen-lockfile- name: Run eslint on changed files
uses: tj-actions/eslint-changed-files@v25
with:
config_path: "/path/to/eslint.config.mjs"
extra_args: "--max-warnings=0"
```For more working examples view the [test.yml](https://github.com/tj-actions/eslint-changed-files/blob/main/.github/workflows/test.yml)
If you feel generous and want to show some extra appreciation:
Support this project with a :star:
[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]
[buymeacoffee]: https://www.buymeacoffee.com/jackton1
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
## Inputs
```yaml
- uses: tj-actions/eslint-changed-files@v25
id: eslint-changed-files
with:
# Run [ESlint](https://eslint.org) on all matching
# files.
# Type: boolean
# Default: "false"
all_files: ''# [ESLint](https://eslint.org/) [configuration file](https://eslint.org/docs/user-guide/configuring/). Optionally omit this
# input for Mono repositories.
# Type: string
config_path: ''# Escaped changed file paths passed
# to ESLint. NOTE: This defaults
# to `true` to prevent command
# injection.
# Type: boolean
# Default: "true"
escape_paths: ''# Extra arguments passed to [ESlint](https://eslint.org/docs/user-guide/command-line-interface)
# Type: string
extra_args: ''# Exit code for reviewdog when
# errors are found.
# Type: boolean
# Default: "true"
fail_on_error: ''# List of file extensions to
# watch for changes and run
# [ESlint](https://eslint.org/) against.
# Type: string
# Default: **/*.{ts,tsx,js,jsx}
#
file_extensions: ''# [Filter mode](https://github.com/reviewdog/reviewdog#filter-mode) for the reviewdog command
# (added, diff_context, file, nofilter).
# Type: string
# Default: "added"
filter_mode: ''# When using [ESlint](https://eslint.org/) `v8.x` use
# this option to pass the
# .eslintignore file to silence ignore
# files warning [ignore file](https://eslint.org/docs/latest/use/configure/ignore-deprecated#using-an-alternate-file)
# Type: string
ignore_path: ''# [ESLint](https://eslint.org/docs/latest/use/configure/ignore) [configuration file](https://eslint.org/docs/latest/use/configure/ignore#ignoring-files) ignores key. Optionally
# ignoring files in the `ignores`
# key from being passed to
# ESLint, this input would be
# ignored when `all_files` is set
# to `true`.
# Type: string
ignore_patterns: ''# Report level for reviewdog (info,warning,error)
# Type: string
# Default: "error"
level: ''# Relative path under GITHUB_WORKSPACE to
# the repository
# Type: string
# Default: "."
path: ''# [Reporter](https://github.com/reviewdog/reviewdog#reporters) of reviewdog command (github-check, github-pr-review).
# github-pr-review can use Markdown and
# add a link to the
# rule page in reviewdog reports.
# Type: string
# Default: "github-pr-review"
reporter: ''# Skip running reviewdog i.e don't
# add any annotations.
# Type: boolean
# Default: "false"
skip_annotations: ''# Skip initially fetching additional history
# to improve performance for shallow
# repositories. NOTE: This could lead
# to errors with missing history.
# It's intended to be used
# when you've fetched all necessary
# history to perform the diff.
# Type: boolean
# Default: "false"
skip_initial_fetch: ''# [GITHUBΒ TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) or a repo scoped [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)
# Type: string
# Default: "${{ github.token }}"
token: ''# Force the use of Github's
# REST API even when a
# local copy of the repository
# exists
# Type: boolean
# Default: "false"
use_rest_api: ''```
* Free software: [MIT license](LICENSE)
# Credits
* [reviewdog/reviewdog](https://github.com/reviewdog/reviewdog)
* [tj-actions/changed-files](https://github.com/tj-actions/changed-files)## Contributors β¨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Clinton Blackburn
π»
Sava Vidakovic
π» β οΈ π
Aravind
π» π
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!