Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tinovyatkin/action-eslint
GitHub Action to run ESLint on files changed in current PR
https://github.com/tinovyatkin/action-eslint
eslint github-actions
Last synced: 2 months ago
JSON representation
GitHub Action to run ESLint on files changed in current PR
- Host: GitHub
- URL: https://github.com/tinovyatkin/action-eslint
- Owner: tinovyatkin
- License: mit
- Created: 2019-08-15T20:54:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-07T22:44:00.000Z (about 1 year ago)
- Last Synced: 2024-11-04T14:03:43.828Z (3 months ago)
- Topics: eslint, github-actions
- Language: JavaScript
- Homepage:
- Size: 21.1 MB
- Stars: 45
- Watchers: 3
- Forks: 24
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lint changed Pull Request files with ESLint from GitHub Action
Using this GitHub Action, scan files changed in current Pull Request with inline code annotations:
Note: `node_modules/` needs to be committed per [Github action docs](https://help.github.com/en/actions/building-actions/creating-a-javascript-action#commit-tag-and-push-your-action-to-github).
## Usage
The workflow, usually declared in `.github/workflows/lint.yml`, looks like:
```yml
name: Linton: pull_request
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: rm -f .yarnclean
- run: yarn --frozen-lockfile --ignore-engines --ignore-optional --no-bin-links --non-interactive --silent --ignore-scripts --production=false
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
HUSKY_SKIP_INSTALL: true
# Alternative: if you use npm instead of yarn
# - run: npm ci --no-audit --prefer-offline
- uses: tinovyatkin/action-eslint@v1
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
check-name: eslint # this is the check name from above 👆 where to post annotations
```## License
All scripts and documentation in this project are released under the MIT License.