Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OmarTawfik/github-actions-js
Provides linting APIs on the command line, through Node.js, and rich code editing through VSCode.
https://github.com/OmarTawfik/github-actions-js
actions extension github linter parser vscode workflows
Last synced: 3 months ago
JSON representation
Provides linting APIs on the command line, through Node.js, and rich code editing through VSCode.
- Host: GitHub
- URL: https://github.com/OmarTawfik/github-actions-js
- Owner: OmarTawfik
- License: mit
- Archived: true
- Created: 2019-02-11T10:49:50.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-02T08:58:55.000Z (over 5 years ago)
- Last Synced: 2024-04-23T04:49:58.911Z (9 months ago)
- Topics: actions, extension, github, linter, parser, vscode, workflows
- Language: TypeScript
- Homepage:
- Size: 331 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - JavaScript-based linter for \*.workflow files
- fucking-awesome-actions - JavaScript-based linter for \*.workflow files
- awesome-workflows - JavaScript-based linter for \*.workflow files
README
# GitHubActions.js [![CircleCI](https://circleci.com/gh/OmarTawfik/github-actions-js.png?style=svg)](https://circleci.com/gh/OmarTawfik/github-actions-js)
Provides linting APIs on the command line, through Node.js, and rich code editing through VSCode.
### Using the NPM Package
> https://www.npmjs.com/package/github-actions-linter
Add the package through npm/yarn:
```bash
$ npm i github-actions-linter
$ yarn add github-actions-linter
```Run linter through Node.js:
```ts
import { lint } from "github-actions-linter";const diagnostics = lint(code);
console.log(diagnostics.length + " errors were found.");diagnostics.forEach(diagnostic => {
console.log(diagnostic.message);
});
```Or invoke through the CLI:
```bash
$ github-actions-linter file1.workflow file2.workflow
```It will exit cleanly if no errors were found, or with a positive error code (number of errors) if any existed:
![image](https://user-images.githubusercontent.com/15987992/53709938-bedad000-3def-11e9-8cc5-8ab55b1462e2.png)
### Using the VSCode Extension
> https://marketplace.visualstudio.com/items?itemName=OmarTawfik.github-actions-vscode
The VSCode extension provides many features, like inserting code snippets, colorization, formatting, and providing diagnostics as you type.
![image](https://user-images.githubusercontent.com/15987992/54337709-ed755980-45ec-11e9-9920-fd8e854437fb.gif)