# @pbs/eslint-config-pbs-kids

> A set of ESLint rules for PBS KIDS JavaScript and TypeScript projects.

Latest version **3.0.4** (published 2026-09-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @pbs/eslint-config-pbs-kids
pnpm add @pbs/eslint-config-pbs-kids
yarn add @pbs/eslint-config-pbs-kids
bun add @pbs/eslint-config-pbs-kids
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.0.4 |
| Published | 2026-09-10 |
| First published | 2019-04-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 28.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kidstech@pbs.org |
| Maintainers | wamberg, asberk, apirjol, pbs_jamoore |

## Links

- npm: https://www.npmjs.com/package/@pbs/eslint-config-pbs-kids
- Repository: https://github.com/pbs/pbs-kids-eslint-config
- Issues: https://github.com/pbs/pbs-kids-eslint-config/issues
- npm.io page: https://npm.io/package/@pbs/eslint-config-pbs-kids

## Dependencies (7)

- [globals](https://npm.io/package/globals.md) ^17.12.0
- [@eslint/js](https://npm.io/package/@eslint/js.md) ^10.0.1
- [@eslint/eslintrc](https://npm.io/package/@eslint/eslintrc.md) ^3.3.7
- [eslint-config-google](https://npm.io/package/eslint-config-google.md) ^0.14.0
- [@stylistic/eslint-plugin](https://npm.io/package/@stylistic/eslint-plugin.md) ^5.10.0
- [eslint-plugin-prefer-arrow](https://npm.io/package/eslint-plugin-prefer-arrow.md) ^1.2.3
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^8.70.0

## Recent versions

- 3.0.4 (latest) — 2026-09-10
- 3.0.3 — 2026-09-01
- 3.0.2 — 2026-08-30
- 3.0.1 — 2026-08-20
- 3.0.0 — 2026-08-19
- 2.0.7 — 2026-02-25
- 2.0.6 — 2026-02-25
- 2.0.5 — 2026-02-25
- 2.0.4 — 2026-02-25
- 2.0.3 — 2026-01-26
- 2.0.2 — 2025-07-21
- 2.0.1 — 2025-06-16
- 2.0.0 — 2025-01-16
- 1.0.4 — 2023-01-10
- 1.0.3 — 2022-06-16
- … 3 more at https://npm.io/package/@pbs/eslint-config-pbs-kids/versions

## README

# eslint-config-pbs-kids

A set of ESLint rules for PBS KIDS JavaScript and TypeScript projects.

## Setup

Include ESLint and this config as a dev dependency in your project.

```sh
npm i --save-dev eslint @pbs/eslint-config-pbs-kids
```

Next, create an ESLint configuration file `eslint.config.js` with the following contents:

```javascript
import { defineConfig } from 'eslint/config';
import kidsConfig from '@pbs/eslint-config-pbs-kids';

...

const eslintConfig = defineConfig([ ...otherConfigsYouMayBeUsing, {
  extends: [
    kidsConfig,
  ],
  rules: {
    // Add any project-specific rules here.
  }
} ]);

export default eslintConfig;
```

or in TypeScript:

```typescript
import { defineConfig } from 'eslint/config';
import kidsTypescriptConfig from '@pbs/eslint-config-pbs-kids/typescript';
import typescriptEslint from '@typescript-eslint/eslint-plugin';

const eslintConfig = defineConfig([ ...otherConfigsYouMayBeUsing, {
  extends: [
    // The option argument passed here is optional.
    kidsTypescriptConfig({
      // Pass in your project's `@typescript-eslint` plugin here, but only if you are already loading other TypeScript rules that invoke that plugin.
      // This is to avoid loading the plugin twice, which can cause errors.
      plugin: typescriptEslint,

      // Apply various levels of rules for TypeScript projects. Value can be set to a number 1-4. The default is 2.
      // You can also set the environment variable `KIDS_TSLINT_STRICT` to override this value.
      // Example usage: `KIDS_TSLINT_STRICT=3 npm run lint` will apply level 3 rules for that run only.
      strictLevel: 2,
    }),
  ],
  rules: {
    // Add any project-specific rules here.
  }
} ]);
export default eslintConfig;
```

If you're updating from ESLint from version 8 to version 9+, see the migration guide: <https://eslint.org/docs/latest/extend/plugin-migration-flat-config>.

You can then add scripting to support lint passes over your code in your package.json:

```json
{
  ...
  "scripts": {
    ...
    "lint": "eslint src/**/*.js",
    ...
  },
  ...
}
```

You can also configure ESLint to automatically fix errors inline, via the [`--fix` option](https://eslint.org/docs/user-guide/command-line-interface#--fix):

```json
{
  ...
  "scripts": {
    ...
    "lint": "eslint --fix src/**/*.js",
    ...
  },
  ...
}
```

## Web Projects

### `eslint-plugin-compat`

You can lint for specific browser feature support with `eslint-plugin-compat` by following these steps:

1. Install it in your project:

   ```sh
   npm i --save-dev eslint-plugin-compat
   ```

1. Add the following to your project's `package.json` to enable support for browsers PBS KIDS cares about.

   ```json
   ...
    "browserslist": [
      "chrome 111",
      "edge 111",
      "firefox 111",
      "safari 15"
    ],
   ```

1. Add the plugin to your `eslint.config.js`:

   ```javascript
   ...
   import compat from 'eslint-plugin-compat';

   module.exports = {
      ...
      {
        extends: [
          compat.configs['flat/recommended'],
        ],
      },
      ...
   };
   ```

1. Run `npx browserslist` from project directory to see which browsers match those queries and confirm that list makes sense.

## More Resources

Here's also some handy links:

- List of [available ESLint rules](https://eslint.org/docs/rules/) if you need to configure more
- How to [set the environment](https://eslint.org/docs/user-guide/configuring#specifying-environments) (like Browser, or Node, so that built-in globals work correctly).
- How to [add globals](https://eslint.org/docs/user-guide/configuring#specifying-globals) for certain libraries (like SpringRoll) that sometimes export globals

---
_Source: https://npm.io/package/@pbs/eslint-config-pbs-kids · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
