eslint-plugin-skuba
raw JSON → 2.0.1 verified Sat Apr 25 auth: no javascript
ESLint plugin for skuba, the SEEK development toolkit. Version 2.0.1, released as a stable major after a major rewrite to support ESLint 9 flat config and TypeScript ESLint v8. It is part of the skuba ecosystem and is released alongside skuba releases, with a cadence of minor/patch releases as needed. Key differentiator: enforces SEEK-specific lint rules and style conventions, integrates closely with skuba's build and template system, and now ships ESM with type declarations. Intended for use with skuba-managed projects.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-plugin-skuba/dist/index.js from /path/to/eslint.config.js not supported. ↓
cause Using CommonJS require() on an ESM-only plugin.
fix
Change to import statement or rename eslint.config.js to eslint.config.mjs.
error ESLint: Failed to load plugin 'skuba': Cannot find module 'typescript-eslint' ↓
cause Missing peer dependency typescript-eslint.
fix
Run npm install typescript-eslint@latest.
error ESLint: Error while loading rule 'skuba/no-ts-expect-error': Rule is not found ↓
cause Using a rule name that does not exist in the plugin (typo or removed).
fix
Check available rules in plugin.configs.recommended or rules object.
Warnings
breaking Version 2.x drops CommonJS support and requires ESLint 9+ flat config. ↓
fix Migrate to ESM imports and flat config. See migration guide: https://seek-oss.github.io/skuba/docs/migration/eslint-plugin-skuba.html
breaking Peer dependency typescript-eslint >=8.39.0 required; older versions incompatible. ↓
fix Update typescript-eslint to ^8.39.0 or newer.
breaking Node.js >=22.14.0 required starting from v2.0.1. ↓
fix Upgrade Node.js to version 22.14.0 or higher.
deprecated Rule 'ts-expect-error' is deprecated in favor of 'no-ts-expect-error'. ↓
fix Replace 'skuba/ts-expect-error' with 'skuba/no-ts-expect-error'.
gotcha Flat config only: .eslintrc files are not supported in v2. ↓
fix Use eslint.config.js with flat config structure.
Install
npm install eslint-plugin-skuba yarn add eslint-plugin-skuba pnpm add eslint-plugin-skuba Imports
- default wrong
const plugin = require('eslint-plugin-skuba')correctimport plugin from 'eslint-plugin-skuba' - configs
import { configs } from 'eslint-plugin-skuba' - rules wrong
const { rules } = require('eslint-plugin-skuba')correctimport { rules } from 'eslint-plugin-skuba'
Quickstart
// eslint.config.js
import plugin from 'eslint-plugin-skuba';
import tseslint from 'typescript-eslint';
export default tseslint.config(
...tseslint.configs.recommended,
plugin.configs.recommended,
{
rules: {
'skuba/no-ts-expect-error': 'error',
},
},
);