open-index/open-npm huggingface dataset:
npm package: @mia-platform/eslint-config-mia
Description: Mia-Platform javascript lint rules
Author: Mia Platform Core Team
Latest version: 9.0.0

<div align="center">

# eslint-config-mia

[![Build Status][travis-svg]][travis-org]
[![javascript style guide][standard-mia-svg]][standard-mia]
[![NPM version][npmjs-svg]][npmjs-com]

</div>

**The ESLint [Shareable Config][share-config] for Mia-Platform JavaScript Style**

## Getting Started



### Requirements

- Node.js 18+

### Install

You can easily install the package with npm:

```sh
npm install --save-dev @mia-platform/eslint-config-mia eslint@^9.0.0
```

The package require [`eslint`](https://github.com/eslint/eslint) to work, to list the correct version you can run:

```sh
npm info "@mia-platform/eslint-config-mia@latest" peerDependencies
```

To be sure to install a compatible `eslint-config-mia` version, you can also check this table:

| eslint version | eslint-config-mia version |
| -------------- | ------------------------- |
| 6.8.0          | 3.0.0                     |
| 8.x            | 8.0.0                     |
| 9.x            | 9.0.0                     |


## How to use it

### ESLint v9 (flat config)

This package exports an ESLint v9 [flat config](https://eslint.org/docs/latest/use/configure/configuration-files) array.
Spread it directly into your `eslint.config.js`:

```js
const miaConfig = require('@mia-platform/eslint-config-mia')

module.exports = [
  ...miaConfig,
]
```

### Adding a lint script

Add a `lint` script in your `package.json`:

```json
"scripts": {
  "lint": "eslint ."
}
```

Then you can override rules by adding additional config objects to your `eslint.config.js`:

```js
const miaConfig = require('@mia-platform/eslint-config-mia')

module.exports = [
  ...miaConfig,
  {
    rules: {
      // your overrides here
    },
  },
]
```

## Badge

You want to show that you use this in your project? Feel free to add this badge to your README file.

[![javascript style guide][standard-mia-svg]][standard-mia]

```markdown
[![javascript style guide](https://img.shields.io/badge/code_style-standard--mia-orange.svg)](https://github.com/mia-platform/eslint-config-mia)
```

[travis-svg]: https://travis-ci.org/mia-platform/eslint-config-mia.svg?branch=master
[travis-org]: https://travis-ci.org/mia-platform/eslint-config-mia
[standard-mia-svg]: https://img.shields.io/badge/code_style-standard--mia-orange.svg
[standard-mia]: https://github.com/mia-platform/eslint-config-mia
[npmjs-svg]: https://img.shields.io/npm/v/@mia-platform/eslint-config-mia.svg?logo=npm
[npmjs-com]: https://www.npmjs.com/package/@mia-platform/eslint-config-mia
[share-config]: http://eslint.org/docs/developer-guide/shareable-configs
npm package: @mia-platform/kafkajs-pino-logger
Description: A custom Pino logger for KafkaJS that follows the Mia-Platform guidelines'
Author: Mia Platform Core Team
Latest version: 2.0.1

<div align="center">

# KafkaJS pino logger

[![NPM version][npmjs-svg]][npmjs-com]
[![javascript style guide](https://img.shields.io/badge/code_style-standard--mia-orange.svg)](https://github.com/mia-platform/eslint-config-mia)
[![Coverage Status][coverall-svg]][coverall-io]

</div>

This library provides a [pino](https://github.com/pinojs/pino) custom logger for
[KafkaJS](https://kafka.js.org/) that follows Mia-Platform
[guidelines for logs](https://docs.mia-platform.eu/docs/getting_started/monitoring-dashboard/dev_ops_guide/log)

## Getting Started

### Install

The package requires `kafkajs` to work, to list the correct version you can run:

```sh
npm info "@mia-platform/kafkajs-pino-logger@latest" peerDependencies
```

To install the package you can run:

```sh
npm install @mia-platform/kafkajs-pino-logger --save
```

## How to use it

The package exposes a log creator that you can pass to the `logCreator` option
when configuring your Kafka client.

```javascript
const { Kafka } = require('kafkajs')
const PinoLogCreator = require('@mia-platform/kafkajs-pino-logger')

const kafka = new Kafka({
  clientId: 'my-app',
  brokers: ['kafka1:9092', 'kafka2:9092'],
  logLevel: logLevel.ERROR,
  logCreator: PinoLogCreator
})
```

### Output logs

The logs will have this form:

```json
{"level":20,"time":1610718695,"pid":46244,"hostname":"test-host","logger":"kafkajs","extraKey":"Your extra","msg":"Your log message"}
```

[coverall-svg]: https://coveralls.io/repos/github/mia-platform/kafkajs-pino-logger/badge.svg?branch=main
[coverall-io]: https://coveralls.io/github/mia-platform/kafkajs-pino-logger?branch=main
[npmjs-svg]: https://img.shields.io/npm/v/@mia-platform/kafkajs-pino-logger.svg?logo=npm
[npmjs-com]: https://www.npmjs.com/package/@mia-platform/kafkajs-pino-logger