open-index/open-npm huggingface dataset:
npm package: @focus21/prisma-utils
Description: Utils for working with Prisma.
Author: Focus21
Latest version: 1.1.1

# @focus21/prisma-utils

Utils for working with Prisma.

## Installation

```bash
pnpm add --save @focus21/prisma-utils
```

## Usage

### updateToCreateQuery

Change a Prisma `update` query to a `create` query.
Useful in `upsert` statements.

```javascript
import { updateToCreateQuery } from "@focus21/prisma-utils";

const myQuery = (update) =>
  prisma.table.upsert({
    update,
    create: updateToCreateQuery(update),
  });
```

### createTransaction

Create a transaction if not already in a transaction.
Works as a drop-in replacement for `prisma.$transaction`.

```javascript
import { createTransaction } from "@focus21/prisma-utils";

// Supports an optional transaction
const myQuery = (txOrPrisma = prisma, txOptions = {}) =>
  createTransaction(txOrPrisma, (tx) => tx.table.findMany(), txOptions);
```
npm package: @focus21/stylelint-config
Description: Focus21's Stylelint configs.
Author: Focus21
Latest version: 7.0.0

# @focus21/stylelint-config

Focus21's Stylelint configs.

## Usage

Installation:

```bash
pnpm add --save-dev @focus21/stylelint-config
```

In `stylelint.config.js`:

```javascript
const files = require("@focus21/stylelint-config/lib/files");

module.exports = {
  ignoreFiles: files.getIgnoreFiles(__dirname),
  extends: ["@focus21/stylelint-config"],
};
```

Which is equivalent to:

```javascript
const files = require("@focus21/stylelint-config/lib/files");

module.exports = {
  ignoreFiles: files.getIgnoreFiles(__dirname),
  extends: [
    "@focus21/stylelint-config/base",
    "@focus21/stylelint-config/prettier",
  ],
  overrides: [
    {
      files: files.jsFiles,
      extends: ["@focus21/stylelint-config/js-base"],
    },
  ],
};
```

Additionally available configs:

- `@focus21/stylelint-config/styled-components`:
  - Can be used on projects which use Styled Components.
  - Should be put after `js-base`.
- `@focus21/stylelint-config/tailwindcss`:
  - Can be used on projects which use Tailwind CSS.
  - Should be put after `base` and before `prettier`.
- `@focus21/stylelint-config/bem`:
  - Can be used on projects which use the BEM naming format.
  - Should be put after `base` and before `prettier`.