Giter Site home page Giter Site logo

eslint-action's Introduction

Eslint Annotate

Unit Tests Coverage Status

Runs eslint on changed files and creates inline annotations with errors.

Usage

In .github/workflows/main.yml:

name: Example Workflow

on: [pull_request, push]

jobs:
  lint:
    steps:
      - uses: actions/checkout@v1
      - uses: a-b-r-o-w-n/eslint-action@v2
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          files: "src/**/*"
          ignore: "src/some-file-to-ignore.js"
          extensions: ".js,.ts"
          working-directory: "./my-package"
          quiet: "false"

eslint-action's People

Contributors

a-b-r-o-w-n avatar adriaandotcom avatar dependabot[bot] avatar psyked avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eslint-action's Issues

Error loading modules

Hi,

I'm trying to use this action but I'm getting an error loading a module. My React Typescript application is not located in the root. So I use the following argument to point in the right path:

 files: src/Unosquare.AssetCore.Server/client-app/src/**/*

It seems like eslint is finding my config file but not the related modules declared:

##[error]Failed to load plugin 'react' declared in 'src/Unosquare.AssetCore.Server/client-app/.eslintrc.js': Cannot find module 'eslint-plugin-react'

The node_modules folder is restored before to use this GH Action.

Thanks!

check endpoint requires GitHub App

The endpoint of checks requires a GitHub app. Couldn't find the docs about how to do so, my other alternative is to fork this action and app authentication to the code. What am I missing?
Screenshot 2023-04-18 at 12 38 27

feat: support --quiet option

Warnings are currently ignored. Instead, it should be configured using the eslint option quiet to report warnings as annotations.

Question: Should annotations persist after issues are resolved?

Thanks for your hard work! This was the only GitHub action that works for me in a mono-repo where working-directory is not the repository root. :)

When all lint issues are solved, the annotations for the failed lines persist, even when I re-run tests.

I'm not sure if this is an issue with my workflow file or intended behavior:

      - name: Save Code Linting Report JSON
        run: npm run lint:report
        continue-on-error: true

      - name: Annotate Code Linting Results
        uses: ataylorme/[email protected]
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          report-json: "backend/eslint_report.json"
      - name: Upload ESLint report
        uses: actions/upload-artifact@v2
        with:
          name: eslint_report.json
          path: backend/eslint_report.json

error when eslint doesn't match any files

When I delete one file from the repo in PR I get this error. The file I deleted was src/image.png

##[error]No files matching 'src/image.png' were found.
8
##[error]Node run failed with exit code 1

my options

repo-token: ***
files: src/**/*
extensions: .js,.jsx,.ts,.tsx
ignore: **/node_modules/**

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.