Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Provides linting APIs on the command line, through Node.js, and rich code editing through VSCode.

License

Notifications You must be signed in to change notification settings

OmarTawfik/github-actions-js

Repository files navigation

GitHubActions.js CircleCI

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:

$ npm i github-actions-linter
$ yarn add github-actions-linter

Run linter through Node.js:

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:

$ 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

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

About

Provides linting APIs on the command line, through Node.js, and rich code editing through VSCode.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published