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

hsz/yaml-lint-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yaml-lint-loader

Dependency Status Dev Dependency Status Version Month Download License

YAML lint loader module for webpack.

Loader verifies the syntax of YAML files using yaml-lint.

It is recommended to use it together with yaml-loader and json-loader to get the JSON objects.

Installation

npm install --save yaml-lint-loader

Usage

Documentation: Using loaders

Simplest case would be:

var json = require("json-loader!yaml-loader!yaml-lint-loader./file.yml");
// => returns file.yml as javascript object

Example webpack configuration for handling .yaml and .yml files may look like:

// webpack.config.js
module: {
  rules: [
    {
      test: /\.ya?ml$/,
      use: [
        { loader: 'json-loader' },
        { loader: 'yaml-loader' },
        { loader: 'yaml-lint-loader' },
      ],
    },
  ]
}

Configuration

It is possible to configure the behaviour of yaml-lint module which is used for linting YAML files with creating the .yaml-lint.json file in the current working directory with following example configuration:

{
  "schema": "CORE_SCHEMA",
  "ignore": "dir/*.yaml"
}

Available options for schema and ignore properties are described in yaml-lint README.

License

Copyright (c) 2018 Jakub Chrzanowski Licensed under the MIT license.

About

YAML linter module for Webpack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published