eslint-config-kyt
raw JSON → 1.6.3 verified Sat Apr 25 auth: no javascript
ESLint configuration for kyt projects, maintained by The New York Times. Current stable version is 1.6.3, part of the kyt monorepo with infrequent releases and no known recent breaking changes. It provides a comprehensive set of ESLint rules for React, Jest, JSON, Prettier, and import ordering, based on Airbnb's config. Unlike generic configs, it is tailored for kyt's webpack-based setup and includes Babel parser support. Suitable for Node.js and browser environments.
Common errors
error Error: Failed to load plugin 'react' declared in 'kyt': Cannot find module 'eslint-plugin-react' ↓
cause Missing peer dependency
fix
Install all peer dependencies: npx install-peerdeps eslint-config-kyt
error Error: .eslintrc.js: Configuration for rule 'react/jsx-filename-extension' is invalid ↓
cause Rule options changed in newer plugin version
fix
Update rule format per eslint-plugin-react docs, e.g., use ['error', { extensions: ['.jsx'] }]
Warnings
deprecated Some rules from eslint-config-airbnb may be deprecated in newer ESLint versions ↓
fix Check rule compatibility with ESLint 7 and above; consider updating peer deps.
gotcha Requires specific peer dependencies; missing any causes runtime errors ↓
fix Run npx install-peerdeps eslint-config-kyt to install all peers.
breaking Version 1.x might have incompatible rule changes compared to 0.x ↓
fix Review changelog for rule updates when upgrading from 0.x.
gotcha The config assumes Babel parser; non-React projects may need parser adjustments ↓
fix Override parser if not using Babel, e.g., parser: '@typescript-eslint/parser'.
Install
npm install eslint-config-kyt yarn add eslint-config-kyt pnpm add eslint-config-kyt Imports
- default config wrong
extends: 'eslint-config-kyt'correctmodule.exports = { extends: ['kyt'], }; - Namespaced config for React wrong
extends: ['eslint-config-kyt/react']correctmodule.exports = { extends: ['kyt/react'], }; - CommonJS require wrong
import config from 'eslint-config-kyt';correctconst config = require('eslint-config-kyt');
Quickstart
// .eslintrc.js
module.exports = {
extends: ['kyt'],
rules: {
'react/jsx-filename-extension': ['error', { extensions: ['.jsx'] }],
},
env: {
browser: true,
es2021: true,
},
};
// Install peer dependencies
// npx install-peerdeps eslint-config-kyt