open-index/open-npm huggingface dataset:
npm package: @pantheon-systems/eslint-config-pantheon
Description: A collection of Pantheon's ESLint configurations
Author: engineering@pantheon.io
Latest version: 1.0.8

Pantheon ESLint Config (`@pantheon-systems/eslint-config-pantheon`) is a linting tool for `JavaScript`.

It exports a set of ESLint rules for `Browser/React`, and a set of rules for `Node`. You can import either one (or both) based on the requirements of your project.

This plugin includes linting rules for `import`, `jest`, `jest-dom`, `jsx`, `jsx-a11y`, `react`, `react-hooks`, `testing-library`, etc.

## Prerequisites

- You need to have [eslint](https://eslint.org/) installed in your project.

  - The `eslint` version needs to be higher than `7.5.0` or `8.0.0`.

  - If your project uses `eslint` version lower than `7.5.0`, you can install Pantheon ESLint Config at version `0.2.1`.

- You need to have [prettier](https://prettier.io/) installed in your project.

## Installation

- You can install this plugin by the following command:

    ```bash
    $ yarn add @pantheon-systems/eslint-config-pantheon --dev
    ```
    Or:
    ```bash
    $ npm install @pantheon-systems/eslint-config-pantheon --save-dev
    ```


- **NOTE**: For projects using `eslint` version lower than `7.5.0`, you can install this plugin's `0.2.1` version instead:

  ```bash
  $ yarn add @pantheon-systems/eslint-config-pantheon@0.2.1 --dev
  ```
  Or:
  ```bash
  $ npm install @pantheon-systems/eslint-config-pantheon@0.2.1 --save-dev
  ```

## Configuration

1. In your project's ESLint config (e.g. `.eslintrc.js`):
    - For `Browser/React` environment, add `@pantheon-systems/eslint-config-pantheon/configurations/react` to `extends`:
    ```javascript
    module.exports = {
      extends: ['@pantheon-systems/eslint-config-pantheon/configurations/react']
    }
    ```

    - For `Node` environment, add `@pantheon-systems/eslint-config-pantheon/configurations/node`:
    ```javascript
    module.exports = {
      extends: ['@pantheon-systems/eslint-config-pantheon/configurations/node']
    }
    ```

2. In your `package.json`, you can add the following script to `scripts` if you want to lint all `jsx` files and `js` files in your `src` folder:
    ```javascript
    "scripts": {
      "eslint": "eslint src --ext .jsx --ext .js --cache"
    }
    ```

## How to Use

- Now you have `@pantheon-systems/eslint-config-pantheon` installed and configured, you can start linting by using:
  ```bash
  $ yarn eslint
  ```
  Or:
  ```bash
  $ npm run eslint
  ```

- If your eslint output has some errors, you can run the following command to fix these errors:
  ```bash
  $ yarn eslint --fix
  ```
  Or:
  ```bash
  $ npm run eslint --fix
  ```

- However, this auto-fix may not be perfect. Sometimes you may need to manually fix these errors in your code.

## Questions?

If you have any question/feedback, or need help with this plugin, please feel free to ask in `#ask-cxe` or `#frontend` channel in Pantheon Slack.

Thank you for using `@pantheon-systems/eslint-config-pantheon` and making our code prettier!
npm package: @pantheon-systems/pantheon-secrets
Description: Pantheon Secrets for Node sites
Author: Pantheon Systems
Latest version: 0.0.2

# pantheon-secrets

A lightweight TypeScript utility package for Node.js applications to retrieve secrets from Pantheon-style environment variables. It simplifies the process of fetching environment-specific and production secrets with full type safety.

## Installation

You can install this package via npm:

```bash
npm install pantheon-secrets
```

## Features

- 🔐 **Secure secret management** - Environment-based secret resolution
- 📦 **Dual module support** - Works with both ESM (`import`) and CommonJS (`require`)
- 🎯 **TypeScript native** - Full type safety and IntelliSense support
- 🚀 **Zero dependencies** - Lightweight with no external dependencies
- ✅ **Well tested** - Comprehensive test suite included

## Usage

The package exposes a single function, `pantheonGetSecret`, which takes the name of a secret as a string and returns the corresponding value or `null` if not found.

### ESM (Modern JavaScript/TypeScript)

```typescript
import { pantheonGetSecret } from 'pantheon-secrets';

const mySecret = pantheonGetSecret('HELLO');
console.log(`The value of HELLO is: ${mySecret}`);

const anotherSecret = pantheonGetSecret('nonexistent');
console.log(`The value of nonexistent is: ${anotherSecret}`);
// The value of nonexistent is: null
```

### CommonJS (Traditional Node.js)

```javascript
const { pantheonGetSecret } = require('pantheon-secrets');

const mySecret = pantheonGetSecret('HELLO');
console.log(`The value of HELLO is: ${mySecret}`);
```

## How It Works

The function automatically determines which secret to use based on your application's environment variables. It first checks for a live production secret, then looks for a value specific to your current environment, and finally falls back to a default value if no other options are found. If the secret is not defined, it returns null.

## Development

### Building

```bash
npm run build          # Build all formats
npm run build:esm      # Build ESM only
npm run build:cjs      # Build CommonJS only
```

### Testing

```bash
npm install    # Install dependencies
npm test       # Run test suite
```

### Project Structure

- `src/pantheon-secrets.ts` - Main TypeScript source
- `index.ts` - Entry point that exports from source
- `__tests__/` - Test directory containing all test files
- `dist/esm/` - ESM build output (ESNext)
- `dist/cjs/` - CommonJS build output (ES2020)
- TypeScript definitions included for both formats