GithubHelp home page GithubHelp logo

krizzu / eslint-check-action Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 8.0 123 KB

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

License: MIT License

Dockerfile 6.84% JavaScript 4.16% TypeScript 85.69% Shell 3.32%
automation ci continuous-integration eslint github-actions

eslint-check-action's Introduction

Hello πŸ‘‹

I'm a software developer, located in WrocΕ‚aw, Poland πŸ‡΅πŸ‡±

I specialize in mobile apps development, leveraging frameworks such as React Native, Jetpack Compose and sometimes SwiftUI. Also exploring cross-platform solutions, such as Kotlin Multiplatform.

Krzysztof's github stats

eslint-check-action's People

Contributors

dependabot[bot] avatar krizzu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eslint-check-action's Issues

How to cache docker image

Hi! I find your action really useful, but the build time lasts quite long since it downloads the image on each build. Is there a way to cache the image between builds?

Thanks!

Failure and Error thrown when > 50 issues found

Trying this action out on an existing codebase and encountering an Error with a failure of:

No more than 50 items are allowed; 169 were supplied.

It would seem that this is a result of the limit on Annotations to be added in a single API request, as per https://developer.github.com/v3/checks/runs/

The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "About status checks".

Invalid request

image

with

jobs:
  eslint_check:
    name: prepare
    runs-on: ubuntu-latest
    steps:
    - name: Checkout 
      uses: actions/checkout@v1
    - name: Install dependencies
      run: yarn install
    - name: Lint
      uses: Krizzu/[email protected]
      with:
        ghToken: ${{ secrets.GITHUB_TOKEN }}
        eslintExt: "vue"
        eslintConfig: ".eslintrc.js"

file .eslintrc.js in root of repository

Where to put config file?

Okay, I tried it with a .eslintrc in my project root directory and it worked.

I tried it with a .eslintrc.json specifying it like this:

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 }}
        eslintConfig: "eslintrc.json"

and it fails with:
##[error]Cannot read config file: /github/workspace/eslintrc.json

the .eslintrc.json is in the exact same directory (root).

I also tried "./eslintrc.json"

Use Existing Github Check

Is it possible to run this action without creating a new Check? My goal would be to utilize the existing "test" check instead of creating a new "Eslint Run" check, which clutters up the check list view.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.