open-index/open-npm huggingface dataset:
npm package: @rkozura/contentful-typescript-codegen
Description: Generate TypeScript types from your Contentful environment.
Author: Robert Kozura
Latest version: 1.0.5

# contentful-typescript-codegen

Generate typings from your Contentful environment.

- Content Types become interfaces.
- Locales (and your default locale) become string types.
- Assets and Rich Text link to Contentful's types.

At Intercom, we use this in our [website] to increase developer confidence and productivity,
ensure that breaking changes to our Content Types don't cause an outage, and because it's neat.

[website]: https://www.intercom.com

## Usage

```sh
yarn add --dev contentful-typescript-codegen
```

Then, add the following to your `package.json`:

```jsonc
{
  // ...
  "scripts": {
    "contentful-typescript-codegen": "contentful-typescript-codegen --output @types/generated/contentful.d.ts"
  }
}
```

Feel free to change the output path to whatever you like.

Next, the codegen will expect you to have created a file called `getContentfulEnvironment.js` in the
root of your project directory, and it should export a promise that resolves with your Contentful
environment.

The reason for this is that you can do whatever you like to set up your Contentful Management
Client. Here's an example:

```js
const contentfulManagement = require("contentful-management")

module.exports = function() {
  const contentfulClient = contentfulManagement.createClient({
    accessToken: process.env.CONTENTFUL_MANAGEMENT_API_ACCESS_TOKEN,
  })

  return contentfulClient
    .getSpace(process.env.CONTENTFUL_SPACE_ID)
    .then(space => space.getEnvironment(process.env.CONTENTFUL_ENVIRONMENT))
}
```

### Command line options

```
Usage
  $ contentful-typescript-codegen --output <file> <options>

Options
  --output,      -o  Where to write to
  --poll,        -p  Continuously refresh types
  --interval N,  -i  The interval in seconds at which to poll (defaults to 15)
```

## Example output

Here's an idea of what the output will look like for a Content Type:

```ts
interface IBlogPostFields {
  /** Title */
  title: string

  /** Body */
  body: Document

  /** Author link */
  author: IAuthor

  /** Image */
  image: Asset

  /** Published? */
  published: boolean | null

  /** Tags */
  tags: string[]

  /** Blog CTA variant */
  ctaVariant: "new-cta" | "old-cta"
}

/**
 * A blog post.
 */
export interface IBlogPost extends Entry<IBlogPostFields> {}
```

You can see that a few things are handled for you:

- Documentation comments are automatically generated from Contentful descriptions.
- Links, like `author`, are resolved to other TypeScript interfaces.
- Assets are handled properly.
- Validations on symbols and text fields are expanded to unions.
- Non-required attributes automatically have `| null` appended to their type.
- The output is formatted using **your** Prettier config.
npm package: @rkra-swap/v2-sdk
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 4.0.14

# Uniswap V2 SDK

[![Unit Tests](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3ALint)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![npm version](https://img.shields.io/npm/v/@uniswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).
npm package: @rkristelijn/eslint-plugin-mui
Description: Extended custom ESLint rules for MUI
Author: rkristelijn
Latest version: 1.2.1

# eslint-plugin-mui

Custom ESLint rules for MUI.

> Note: This is a fork of [eslint-plugin-mui](https://github.com/rafaelgomesxyz/eslint-plugin-mui) that seems to be not
> being worked on.

## Installation

You'll first need to install [ESLint](https://eslint.org/):

```sh
npm install eslint --save-dev
```

Next, install `@rkristelijn/eslint-plugin-mui`:

```sh
npm install @rkristelijn/eslint-plugin-mui --save-dev
```

## Usage

Add `mui` to the plugins section of your `eslint.config.cjs` configuration file.

```ts
const muiPlugin = require('eslint-plugin-mui');

module.exports = [
	plugins: {
		mui: muiPlugin,
	},
	rules: {
		// adding the recommended rules
		'mui/sort-sx-keys': 'warn',
		'mui/prefer-named-imports': 'warn',
		'mui/no-literal-colors': 'warn',
		'mui/no-grid-alias': 'warn'
		'mui/no-single-child-in-grid': 'warn',
		'mui/no-single-child-in-stack': 'warn'
	},
]
```

## Supported Rules

- [sort-sx-keys](https://github.com/rkristelijn/eslint-plugin-mui/tree/main/docs/rules/sort-sx-keys.md)
- [prefer-named-imports](https://github.com/rkristelijn/eslint-plugin-mui/tree/main/docs/rules/prefer-named-imports.md)
- [no-literal-color](https://github.com/rkristelijn/eslint-plugin-mui/tree/main/docs/rules/no-literal-color.md)
- [no-grid-alias](https://github.com/rkristelijn/eslint-plugin-mui/tree/main/docs/rules/no-grid-alias.md)
- [no-single-child-in-grid](https://github.com/rkristelijn/eslint-plugin-mui/tree/main/docs/rules/no-single-child-in-grid.md)
- [no-single-child-in-stack](https://github.com/rkristelijn/eslint-plugin-mui/tree/main/docs/rules/no-single-child-in-stack.md)

## Credits

This plugin is based on eslint-plugin-sort-keys-fix (https://github.com/leo-buneev/eslint-plugin-sort-keys-fix).

## Contributors

- [rkristelijn](https://github.com/rkristelijn)
- [Ensar025](https://github.com/Ensar025)
- [rafaelgomesxyz](https://github.com/rafaelgomesxyz) (original author)