open-index/open-npm huggingface dataset:
npm package: @storyofams/eslint-config-ams
Description: A shareable eslint config used in projects created by Story of AMS. The eslint config relies on several eslint plugins and implements prettier as a rule set.
Latest version: 1.1.7

# ⚙️ eslint-config-ams

A shareable eslint config used in projects created by Story of AMS. The eslint config relies on several eslint plugins and implements prettier as a rule set.

## installation

Start by removing any .eslintrc or prettierrc files in your project. (**Note that eslintignore and prettierignore are still needed per project**)

Once done, drop the following line in your favorite terminal:

```bash
yarn add @storyofams/eslint-config-ams eslint eslint-config-prettier eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-import eslint-import-resolver-alias eslint-plugin-react-hooks eslint-plugin-mdx prettier --dev
```

Finally add this to your package.json
Various available packages are:

- ams
For libraries/packages/etc where /web or /node is overkill

```js
"eslintConfig": {
  "extends": [
    "@storyofams/eslint-config-ams"
  ]
},
```

- ams/web
For all things frontend

```js
"eslintConfig": {
  "extends": [
    "@storyofams/eslint-config-ams/web"
  ]
},
```

- ams/node
For all things backend

```js
"eslintConfig": {
  "extends": [
    "@storyofams/eslint-config-ams/node"
  ]
},
```

## formatOnSave With VS Code

Once you have installed the eslint-config, you probably want your editor to lint and fix for you.
Here are the instructions for VS Code:

1. Install the [ESLint package](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
2. Now we need to setup some VS Code settings via `Code/File` → `Preferences` → `Settings`. It's easier to enter these settings while editing the `settings.json` file, so click the `{}` icon in the top right corner:

```js
// These are all my auto-save configs
"editor.formatOnSave": true,
// turn it off for JS and JSX, we will do this via eslint
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
},
// tell the ESLint plugin to run on save
"editor.codeActionsOnSave": {
"source.fixAll": true
},
// Optional BUT IMPORTANT: If you have the prettier extension enabled for other languages like CSS and HTML, turn it off for JS since we are doing it through Eslint already
"prettier.disableLanguages": ["javascript", "javascriptreact"],
```
npm package: @storyofams/mrm-preset
Description: <p align="center">   <a aria-label="Story of AMS logo" href="https://storyofams.com/" target="_blank" align="center">     <img src="https://storyofams.com/public/story-of-ams-logo-small@3x.png" alt="Story of AMS" width="120">   </a>   <h1 align="center">a
Author: MitchelvanBever
Latest version: 1.1.1

<p align="center">
  <a aria-label="Story of AMS logo" href="https://storyofams.com/" target="_blank" align="center">
    <img src="https://storyofams.com/public/story-of-ams-logo-small@3x.png" alt="Story of AMS" width="120">
  </a>
  <h1 align="center">ams-configs</h1>
</p>

<p align="center">
  <a aria-label="Releases" href="https://GitHub.com/storyofams/ams-configs/releases/">
    <img src="https://img.shields.io/github/release/storyofams/ams-configs.svg" />
  </a>
</p>

A repo containing our ever growing and ever evolving config files shareable between projects.

# Getting started
Finally a way to manage dot-/config-files and keep them updated fromm a single repo.

## Installation

Add mrm and the preset to your project:
```
npm i --save-dev mrm @storyofams/mrm-preset
```

Add script the following script to your package.json:
```
"mrm": "mrm --preset=@storyofams/mrm-preset"
```

## Add or update files
`yarn mrm frontend|backend|library`
npm package: @storyofams/next-cli
Description: CLI to help bootstrap new projects for @storyofams
Latest version: 0.0.1

<p align="center">
  <a href="https://storyofams.com/" target="_blank" align="center">
    <img src="https://storyofams.com/blog/story-of-ams-logo-small@3x.png" alt="Story of AMS" width="120">
  </a>
  <h1 align="center">@storyofams/next-cli</h1>
</p>

# Description

CLI to help bootstrap new projects for @storyofams

## Install

```bash
npm install --global @storyofams/next-cli
```

## CLI

```
$ @storyofams/next-cli --help

  Usage
    $ @storyofams/next-cli

  Options
    --name  Your name

  Examples
    $ @storyofams/next-cli --name=Jane
    Hello, Jane
```

# Ink

> Created with [create-ink-app](https://github.com/vadimdemedes/create-ink-app)
npm package: @storyofams/react-helpers
Description: Collection of helpers and hooks to create a resilient front-end application with React.
Latest version: 0.3.8

<p align="center">
  <a href="https://storyofams.com/" target="_blank" align="center">
    <img src="https://storyofams.com/blog/story-of-ams-logo-small@3x.png" alt="Story of AMS" width="120">
  </a>
  <h1 align="center">@storyofams/react-helpers</h1>
</p>

# Description

Collection of helpers and hooks to create a resilient front-end application with React.
npm package: @storyofams/storyblok-toolkit
Description: Batteries-included toolset for efficient development of React frontends with Storyblok as a headless CMS.
Latest version: 1.6.9

<p align="center">
  <a href="https://storyofams.com/" target="_blank" align="center">
    <img src="https://avatars.githubusercontent.com/u/19343504" alt="Story of AMS" width="100">
  </a>
  <h1 align="center">@storyofams/storyblok-toolkit</h1>
  <p align="center">
    <a aria-label="releases" href="https://github.com/storyofams/storyblok-toolkit/releases/" target="_blank">
      <img src="https://github.com/storyofams/storyblok-toolkit/workflows/Release/badge.svg">
    </a>
    <a aria-label="npm" href="https://www.npmjs.com/package/@storyofams/storyblok-toolkit" target="_blank">
      <img src="https://img.shields.io/npm/v/@storyofams/storyblok-toolkit">
    </a>
    <a aria-label="codecov" href="https://codecov.io/gh/storyofams/storyblok-toolkit" target="_blank">
      <img src="https://codecov.io/gh/storyofams/storyblok-toolkit/branch/master/graph/badge.svg?token=ZV0YT4HU5H">
    </a>
    <a aria-label="stars" href="https://github.com/storyofams/storyblok-toolkit/stargazers/" target="_blank">
      <img src="https://img.shields.io/github/stars/storyofams/storyblok-toolkit.svg?style=social&label=Star&maxAge=86400" />
    </a>
  </p>
  <p align="center">Batteries-included toolset for efficient development of React frontends with Storyblok as a headless CMS. <br><a href="https://storyblok-toolkit.vercel.app/" target="_blank">View docs</a></p>
</p>

---

## Purpose

The aim of this library is to make integrating Storyblok in a React frontend easy.

We provide wrappers to abstract away the setup process (implementing the Storyblok JS Bridge, making the app work with the Visual Editor). We also provide an easy way to configure a GraphQL client, an optimized image component and some utility functions.

## Installation

```sh
yarn add @storyofams/storyblok-toolkit
# or
npm install @storyofams/storyblok-toolkit
```

## Features

The following API's are included:

- `withStory()` and `StoryProvider`: `withStory` wraps a component/page where a story is loaded, and makes sure to keep it in sync with the Visual Editor. `StoryProvider` is a global provider that provides the context to make `withStory` work.
- `useStory()`: alternative to `withStory`, gets the synced story.
- `getClient()`: properly configures a `graphql-request` client to interact with Storyblok's GraphQL API.
- `Image`: automatically optimized and responsive images using Storyblok's image service. With LQIP (Low-Quality Image Placeholders) support.
- `getImageProps()`: get optimized image sizes without using `Image`.
- `getExcerpt()`: get an excerpt text from a richtext field.
- `getPlainText()`: get plaintext from a richtext field.

Next.js specific:
- `getStaticPropsWithSdk()`: provides a properly configured `graphql-request` client, typed using `graphql-code-generator` to interact with Storyblok's GraphQL API, as a prop inside of `getStaticProps`.
- `nextPreviewHandlers()`: API handlers to implement Next.js's preview mode.
npm package: @storyous/bucket-determinator
Description: ![](http://oi68.tinypic.com/ffcm4x.jpg)
Author: Ivo, Tomas
Latest version: 1.0.0

![](http://oi68.tinypic.com/ffcm4x.jpg)

# BucketDeterminator

This is small helper library to determine bucket allegiance based on MongoDB/ObjectId.

## Usage
```php
    use BucketDeterminator\BucketDeterminator;

    $bucketDeterminator = new BucketDeterminator(32);
    echo $bucketDeterminator->determine('5576a1a886157828c11bac4f'); // 15
```

```javascript
    const bucketDeterminator = require('../src/BucketDeterminator');
    const determinator = bucketDeterminator();
    return determinator.determine('5576a1a886157828c11bac4f'); //15

```

## Run tests
```
php vendor/bin/tester --coverage ./coverage.html --coverage-src ./src -c /path/to/php-ini/php.ini tests
```

```shell
npm run test
```

## License
MIT License

Copyright (c) 2018 storyous.com s.r.o.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
npm package: @storyous/winston-gelf
Description: GELF transport for Winston
Author: Stanislav Gurnik
Latest version: 0.0.3

# Winston GELF Transport

A GELF transport for Winston

## Installation

``` sh
  $ npm install winston
  $ npm install @storyous/winston-gelf
```

## Usage
```javascript
  const winston = require('winston');
  const { GELFTransport, ConsoleReporter } = require('winston-gelf');
  const options = {
    reporters: [new ConsoleReporter()],
  };

  const logger = new(winston.Logger)({
      transports: [new GELFTransport(options)]
  });

```

## Options

* __reporters__: List of reporters
* __version__: Current application version
* __hostname__: Hostname of application (default: os.hostname())
* __environment__: Environment (default: process.env.NODE_ENV)
* __service__: Service name (default: nodejs)
* __silent__: Should silence reporters (default: false)
* __level__: Level to report (default: info)