Giter Club home page Giter Club logo

Comments (3)

rhysd avatar rhysd commented on May 18, 2024

Thanks for the suggestion.

The idea that providing a check for actions/github-script basically makes sense to me. However I think there are some challenges if we adopt eslint.

  • eslint is not globally installed usually. It is installed as dependency of local project and usually not installed in $PATH directory. actionlint cannot know where the eslint command exists. And asking non-JS users to install eslint globally only for actionlint is hard.
  • eslint usually requires a config file eslintrc otherwise eslint checks nothing. User needs to write up their configuration. It's hard to write up and maintain eslint config only for checking GitHub Actions workflows (especially for non-JS people).
  • eslint is not designed for linting a small code snippet. It is designed for linting (possibly large) JavaScript project. I think the design does not fit to actionlint's usage. Many code style checks are not useful for small snippets and some false positives would be reported (for example, github-script defines github variable implicitly).

For above reasons, I think it's hard to support github-script linting with eslint.

from actionlint.

massongit avatar massongit commented on May 18, 2024

I understand that it is difficult to support eslint and actions/github-script.
I close this issue.

from actionlint.

nomeata avatar nomeata commented on May 18, 2024

Would it be possible to support this with implicitly wrapping the body in the right function declaration, roughly like in https://github.com/actions/github-script#use-scripts-with-jsdoc-support?

Having some kind of syntax and ideally type checking locally would avoid so many problems I had :-]

Maybe using the type script compiler instead of eslint if that's more suitable?

from actionlint.

Related Issues (20)

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.