Comments (3)
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 theeslint
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
definesgithub
variable implicitly).
For above reasons, I think it's hard to support github-script
linting with eslint.
from actionlint.
I understand that it is difficult to support eslint
and actions/github-script
.
I close this issue.
from actionlint.
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)
- No labels for Larger Hosted Runners HOT 2
- Actionlint does not alert on a mis-terminated expression for `if`
- Warning if explicit shell is not set HOT 2
- Support glob/regex patterns for self hosted runner labels configuration HOT 1
- Support validation of the inputs passed in the with block
- [BUG] `timeout-minutes` should allow expressions (but it demands `floats`) HOT 2
- Feature Request: checking workflow inputs for Untrusted input HOT 1
- Support tsc to check actions/github-script steps HOT 1
- Feature request: Require job name
- feature request: detect invalid reference to a workflow file HOT 1
- support macOS-14 runs on HOT 3
- Feature request: Allow usage of .shellcheckrc HOT 6
- Disallow usage of `>-`, which is not supported by GitHub actions HOT 5
- Release recent changes HOT 1
- Composite actions support? HOT 2
- False Positive On fromJson in services Mapping Nodes
- Failed on "google-github-actions/get-secretmanager-secrets" HOT 7
- v1.6.27 Actionlint do not recognising outputs from google-github-actions/get-secretmanager-secrets@v2 HOT 1
- Seems like actionlint lack support to detect when we call reusable workflow in the main workflow. HOT 2
- Default shell not being detected - currently treats all `run` on Linux as shell HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actionlint.