open-index/open-npm huggingface dataset:
npm package: @kiwicom/cookies
Description: Finally a proper cookie management system. :cookie:
Author: oreqizer
Latest version: 0.6.1

# Cookies

Finally a proper cookie management system. :cookie:

```sh
yarn add @kiwicom/cookies
```

## API

The API handles:

- managing _cookies_
- managing _local storage_
- managing _React context_
- managing 3rd party scripts
- generating documentation

### Cookies

```ts
import { Cookie, Settings, save, load, remove } from "@kiwicom/cookies";
```

`Cookie`

A _TypeScript_ `enum` that contains all cookie keys. Use it when manipulating cookies.

`Settings`

A _TypeScript_ / _Flow_ `type` with the following keys:

- `analytics: boolean;`
- `marketing: boolean;`

`save(key: Cookie, value: string, opts?: Options) => void`

The `Options` object is passed to `js-cookie` and has these attributes:

- `domain: string`
- `path: string`
- `secure: boolean`

Saves a cookie. Expiration is set automatically.

`load(key: Cookie) => string | null`

Loads a cookie.

`remove(key: Cookie, opts?: Options) => void`

The `Options` object is passed to `js-cookie` and has these attributes:

- `domain: string`
- `path: string`
- `secure: boolean`

Removes a cookie.

### Local storage

_TODO_

### React context

```ts
import { Agreed, CookiesProvider, useCookies } from "@kiwicom/cookies";
```

`Agreed`

A _TypeScript_ `enum` with values `TRUE` or `FALSE` that signify if consent was agreed to.

`CookiesProvider`

A _React_ context provider. Props:

- `agreedInitial?: Agreed | null` used for initial server-side rendering consistency

The context has the following attributes:

- `agreed: Agreed | null`
- `settings: Settings`
- `handleAgree(agreed: true | false) => void`
- `handleChange(settings: Settings) => void`

Call `handleAgree` when the user consents / revokes consent. Does not change settings on agreeing,
so call in conjunction with `handleChange`.

Call `handleChange` when user changes his cookie preferences.

`useCookies`

A utility hook that retrieves the context value.

### 3rd party scripts

Make scripts loadable via HTTP requests, then create `<script />` tags with attributes:

- `src` pointing to the script's URL
- `type` of `"text/plain"`
- `data-cookiescript` with value of `"necessary" | "analytics" | "marketing"`

The scripts will be loaded and executed on demand, based on the user's cookie settings.

### Documentation

Load the `@kiwicom/cookies/cookies.json` file for a list of objects with the following signature:

```ts
type Cookie = {
  name: string;
  category: string;
  type: "cookie"; // for now
  description: string;
};
```

## License

MIT
npm package: @kiwicom/eslint-config
Description: Kiwi.com's ESlint config for TypeScript and Flow.
Author: kiwicom
Latest version: 12.7.3

# @kiwicom/eslint-config

Our ESlint config.

Add the following script to your `package.json`:

```json
{
  "scripts": {
    "lint": "eslint . --max-warnings 0"
  }
}
```

Increase the number of warnings to your current number of warnings to avoid introducing
new ones.

Available configs to extend:

- `@kiwicom/eslint-config` - core, Babel, Node, imports
- `@kiwicom/eslint-config/ts` - TypeScript
- `@kiwicom/eslint-config/flow` - Flow
- `@kiwicom/eslint-config/react` - React
- `@kiwicom/eslint-config/jest` - Jest

## Setup

Your `.eslintrc.js`:

```js
// Example config for a React+Jest project with both TS and Flow
module.exports = {
  extends: ["@kiwicom", "@kiwicom/eslint-config/react", "@kiwicom/eslint-config/jest"],
  overrides: [
    {
      // TypeScript
      files: ["*.ts", "*.tsx"],
      extends: ["@kiwicom/eslint-config/ts"],
      parserOptions: {
        project: "./tsconfig.json",
      },
    },
    {
      // Flow
      files: ["*.js", "*.jsx", "*.js.flow"],
      extends: ["@kiwicom/eslint-config/flow"],
    },
  ],
};
```

## Prettier

Prettier rules to avoid conflicts are included, however, `prettier` itself is not.

Install `yarn add prettier -D` separately, create `prettier.config.js` and add the
following scripts to your `package.json`:

```json
{
  "scripts": {
    "prettier": "prettier --check .",
    "fmt": "prettier --write ."
  }
}
```

## Development

Benchmark:

- `TIMING=1 eslint ...`

Checking `prettier` conflicts:

- `npx eslint-config-prettier index.js`

## License

MIT
npm package: @kiwicom/eslint-config-kiwicom-cypress
Description: ESLint configuration for Cypress at Kiwi.com
Author: strajk@me.com
Latest version: 0.0.8
Deprecated: You should use eslint-plugin-cypress

# eslint-config-kiwicom-cypress

ESLint configuration for Cypress at Kiwi.com

This repo by itself exists as a proof of concept and a fast solution to aching problem, allowing us to move quickly.

Ultimate goal is to adjust & use [eslint-config-kiwicom](https://github.com/kiwicom/eslint-config-kiwicom) eventually.

#### Main differences to eslint-config-kiwicom :read-this:

* **No Prettier** as we prefer conceptual consistency over formatting consistency. [More reasing](https://strajk.github.io/QA-Academy/#/./cypress-best-practices?id=readability-gt-prettier)
* **Allow using of functions before definitiom** as we like to define helper functions at the end of the file
* **Spellchecking** as it useful, but could be slow on whole codebase.
* **Strict & opinionated rules specific to Cypress** as it's being develop rapidly and we don't wanna bother all other teams with it.  

## Links

* https://github.com/kiwicom/eslint-config-kiwicom-cypress
* https://www.npmjs.com/package/@kiwicom/eslint-config-kiwicom-cypress

## Usage

```
npx install-peerdeps --dev @kiwicom/eslint-config-kiwicom-cypress
```

Add `"extends": "@kiwicom/eslint-config-kiwicom-cypress"` to your `.eslintrc`


## Goals 


## Contributing

#### Publish

TODO: Smarter, nicer, more elegant solution.

```
npm publish
```