falco-js

1.0.0-rc2 • Public • Published

Fastly VCL language linter

falco, repackaged for distribution with npm.

JSON output only!

Architecture support

  • darwin-amd64
  • darwin-arm64
  • linux-amd64

Usage

Installation

npm install falco-js

In code

import { lint, lintText } from 'falco-js'

lint('/Absolute/path/to/some.vcl')
  .then((jsonLintResults) => {
    const {
      Infos: suggestionCount,
      Warnings: warningCount,
      Errors: errorCount,
      LintErrors,
      ParseErrors,
      VCL
    } = jsonLintResults
    // ...
  })

lintText('my VCL code')

CLI

falco-js -vv /path/to/file.vcl
falco-js -help

Pipeable (-slurp arg)

cat /path/to/file.vcl | falco-js -slurp

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i falco-js

      Weekly Downloads

      2

      Version

      1.0.0-rc2

      License

      MIT

      Unpacked Size

      55 MB

      Total Files

      11

      Last publish

      Collaborators

      • therealdoramatadora