{"id":19533,"library":"eslint-config-iplayer","title":"ESLint Config iPlayer","description":"ESLint configuration for BBC iPlayer projects. Version 10.0.1 requires ESLint 9 and uses FlatConfig (eslint.config.js) instead of the legacy .eslintrc format. Provides presets: base, js, jsx, ts, tsx, legacy. Peer dependencies include eslint >=9.0.0 and typescript >=4.0.0. Breaking change from v9 to v10: switch to FlatConfig; old package.json extends no longer work. Release cadence follows BBC iPlayer needs.","status":"active","version":"10.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/bbc/eslint-config-iplayer","tags":["javascript","eslint","eslintconfig"],"install":[{"cmd":"npm install eslint-config-iplayer","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-iplayer","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-iplayer","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for linting","package":"eslint","optional":false},{"reason":"peer dependency for TypeScript rules","package":"typescript","optional":true}],"imports":[{"note":"v10 uses ESLint 9 FlatConfig; require('@eslint/eslintrc').FlatCompat is needed to extend. Old object format breaks.","wrong":"module.exports = { extends: 'iplayer/tsx' }","symbol":"flat config with compat","correct":"const compat = new (require('@eslint/eslintrc').FlatCompat)({ baseDirectory: __dirname }); module.exports = [ { ignores: ['node_modules'] }, ...compat.extends('eslint-config-iplayer/tsx') ];"},{"note":"Package is not ESM; use FlatCompat with import.meta.url in ESM projects.","wrong":"import config from 'eslint-config-iplayer'","symbol":"import in ESM","correct":"import { FlatCompat } from '@eslint/eslintrc'; const compat = new FlatCompat({ baseDirectory: import.meta.url });"},{"note":"scoped extends require full package name.","wrong":"compat.extends('iplayer')","symbol":"presets js/jsx/ts/tsx/base/legacy","correct":"compat.extends('eslint-config-iplayer/tsx')"}],"quickstart":{"code":"// Install\nnpm install --save-dev eslint eslint-config-iplayer @eslint/eslintrc\n\n// eslint.config.js\nconst { FlatCompat } = require('@eslint/eslintrc');\nconst path = require('path');\nconst compat = new FlatCompat({\n  baseDirectory: __dirname\n});\nmodule.exports = [\n  {\n    ignores: ['node_modules', 'dist']\n  },\n  ...compat.extends('eslint-config-iplayer/tsx')\n];\n","lang":"javascript","description":"Shows how to set up ESLint 9 FlatConfig with eslint-config-iplayer v10 using FlatCompat for TypeScript+JSX."},"warnings":[{"fix":"Switch to FlatConfig as shown in quickstart.","message":"Version 10 drops support for .eslintrc files and package.json eslintConfig. Must use eslint.config.js with FlatCompat.","severity":"breaking","affected_versions":">=10.0.0"},{"fix":"Use eslint.config.js with FlatCompat.extends('eslint-config-iplayer/base').","message":"Legacy extends 'iplayer/base' etc. from .eslintrc are deprecated. Use FlatCompat instead.","severity":"deprecated","affected_versions":">=10.0.0"},{"fix":"Always prefix with 'eslint-config-iplayer/'.","message":"Full package name required in compat.extends: e.g., 'eslint-config-iplayer/tsx' not 'iplayer/tsx'.","severity":"gotcha","affected_versions":">=10.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use object format for rule options. Check each rule's schema.","cause":"FlatConfig does not accept legacy rule config format (e.g., array).","error":"Configuration for rule \"no-console\" is invalid"},{"fix":"Ensure eslint-config-iplayer is installed and use full name in FlatCompat.extends.","cause":"Missing peer dependency or wrong extends name without full package name.","error":"Cannot find module 'eslint-config-iplayer'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}