ESLint Config Skuba
raw JSON → 8.1.0 verified Sat Apr 25 auth: no javascript
ESLint config for skuba projects. Current stable version 8.1.0, release cadence follows skuba monorepo releases. This package provides a flat ESLint configuration tailored for SEEK's skuba development platform, integrating TypeScript, React, and Jest linting rules. It is ESM-only and requires Node.js >=22.14.0, ESLint >=9.22.0, and TypeScript >=5.5.4. Differentiators include automatic ignores for coverage, dist, lib, tmp folders, and seamless alignment with skuba toolchain. Ships TypeScript types.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module ↓
cause Using CommonJS require() to import an ESM-only package.
fix
Switch to import statement or dynamic import().
error ConfigError: Config is not an array ↓
cause Spreading the imported config incorrectly, treating default export as a single object.
fix
Ensure you spread eslintConfigSkuba if it's an array: export default [...eslintConfigSkuba, ...]
error TypeError: Cannot read properties of undefined (reading 'rules') ↓
cause Assuming eslintConfigSkuba is a single config object rather than an array.
fix
Loop over the array or specify index: eslintConfigSkuba[0].rules
Warnings
breaking v8 requires ESLint >=9.22.0 (flat config only, no .eslintrc support) ↓
fix Migrate to flat config format; ensure ESLint >=9.22.0 is installed.
breaking v8 drops support for Node.js <22.14.0 ↓
fix Update Node.js to >=22.14.0.
gotcha Default export is an array of flat config objects, not a single config object ↓
fix Spread the imported array into your eslint config export.
deprecated In v7 and earlier, the config was exported as a single object; this changed in v8 ↓
fix Update to v8 and spread the array.
Install
npm install eslint-config-skuba yarn add eslint-config-skuba pnpm add eslint-config-skuba Imports
- eslintConfigSkuba wrong
const eslintConfigSkuba = require('eslint-config-skuba')correctimport eslintConfigSkuba from 'eslint-config-skuba' - default wrong
module.exports = require('eslint-config-skuba')correctexport { default as eslintConfigSkuba } from 'eslint-config-skuba' - types
import type { FlatConfig } from 'eslint-config-skuba'
Quickstart
// eslint.config.js
import eslintConfigSkuba from 'eslint-config-skuba';
export default [
...eslintConfigSkuba,
{
rules: {
'no-console': 'error',
},
},
];