open-index/open-npm huggingface dataset:
npm package: @linode/eslint-plugin-cloud-manager
Description: Custom ESLint rules for Linode Cloud Manager
Author: Alban Bailly
Latest version: 0.0.11

# @linode/eslint-plugin-cloud-manager

This software is Copyright Akamai Technologies, Inc.

![npm](https://img.shields.io/npm/v/@linode/eslint-plugin-cloud-manager)

## Description

Custom ESLint rules for Akamai's Cloud Manager. Enforces specific styling guidelines related to the Manager's coding guidelines and best practices.

## Installation

You can install this package using yarn, npm, bun, or pnpm.

```bash
npm install @linode/eslint-plugin-cloud-manager --save-dev
```

```bash
yarn add -D @linode/eslint-plugin-cloud-manager
```

```bash
bun add -D @linode/eslint-plugin-cloud-manager
```

```bash
pnpm add -D @linode/eslint-plugin-cloud-manager
```

and reload your eslint server.

## Development

```bash
bun install
```

### Testing

```bash
bun run test
```
npm package: @linode/validation
Description: Yup validation schemas for use with the Linode APIv4
Author: Linode LLC
Latest version: 0.83.0

# Linode API Validation Schemas

## Usage

This library consists of [Yup](https://github.com/jquense/yup) schemas corresponding to the endpoints of the
[Linode API](https://techdocs.akamai.com/linode-api/reference/api), intended to be used for client-side validation.
They closely (though not exactly) match the validation that is run by the API back-end when a
request is received. They can be used to validate API request payloads manually or to validate forms (for example through
Formik&rsquo;s `validationSchema`). They also work well with the [@linode/api-v4](https://npmjs.com/@linode/api-v4) package.

### Manual Validation

```js
import { CreateLinodeSchema } from '@linode/validation';

const payload = { label: 'My Linode', type: 'g6-standard-1' };
CreateLinodeSchema.validateSync(payload);
// Uncaught: u [ValidationError]: Region is required.
```

### With the @linode/api-v4 package

NOTE: This feature is in development.

```js
import { createLinode } from '@linode/api-v4';
import { CreateLinodeSchema } from '@linode/validation';

const payload = { label: 'My Linode', type: 'g6-standard-1' };
createLinode(payload, { schema: CreateLinodeSchema }).catch((error) => {
  console.log(error);
});

// { field: 'region', reason: 'Region is required.' }
```

## Why is it a separate library?

These schemas were originally included in the @linode/api-v4 package by default, and automatically
applied before any network request was made. This worked well in the early days of Cloud Manager,
especially before @linode/api-v4 was published as a separate package. However, as the project grew,
this setup caused a few problems:

1. Coupling the request handlers and validation schemas meant that it wasn't possible to turn client-side validation off, which isn't a good fit for a public package.
2. The validation doesn't match the API&rsquo;s exactly. There are some things, such as uniqueness, that are
   difficult to validate on the client. There are some additional cases where the validation is too complex, and
   we made a decision to fall back on the backend validation. This was acceptable when the schemas were only used internally by the Cloud
   Manager, but can lead to confusion for external users (in fact it's unlikely that most external users were even aware that validation
   was happening on the client side).
3. The auto-validation meant that we were double-validating in many cases; when using Formik, for example, the same schema is run on form submit, then run again in the JS client.
4. The api-v4 bundle was too big, and the schemas were a big part of it. This is unfortunate especially since not everyone necessarily wants to run client validation.