Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mintlify/validation

Package Overview
Dependencies
Maintainers
5
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mintlify/validation

Validates mint.json files

  • 0.1.79
  • npm
  • Socket score

Version published
Weekly downloads
21K
decreased by-16.37%
Maintainers
5
Weekly downloads
 
Created
Source

@mintlify/validation

@mintlify/validation is a small package to validate mint.json files.

Installation

npm install @mintlify/validation

Usage

import mintValidation from "@mintlify/validation"

const configObject = { name: "Site Name", navigation: [] }

mintValidation.validateMintConfig(configObject)

This package assumes you have already loaded a config object into a JavaScript object.

Return Values

The package returns an object with the properties status, warnings, and errors.

status can be one of: "success", "error".

warnings is a string array with warnings the user should know but are not expected to break the site.

errors is a string array of errors that will likely break the site.

When status === "error" you should stop trying to build mint, your mint.json file is invalid and the site will crash when building.

Return Value Example

{
    "status": "error",
    "warnings": ["Navigation is an empty array, no pages will be shown"],
    "errors": ["Mintlify does not support .ico favicons, use .svg or .png instead."]
}

Documentation

Additional documentation on mint.json is available on Mintlify's website.

Community

Join our Discord community if you have questions or just want to chat:

Built with 💚 by the Mintlify community.

Keywords

FAQs

Package last updated on 27 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc