Registry / development / eslint-plugin-sukka

eslint-plugin-sukka

JSON →
library9.5.0jsnpmunverified

An ESLint plugin by SukkaW that provides a comprehensive set of custom ESLint rules and configurations built on top of ESLint 9.x and TypeScript 5.x. Version 9.5.0 (stable, released April 2025) focuses on code quality, performance, and style conventions. Key differentiators include strict performance-oriented rules, deep TypeScript integration, and opinionated defaults that align with SukkaW's personal coding style. It requires ESLint >=9.29.0 and TypeScript as a peer dependency. Compatible with flat config only (ESLint 9+); no support for legacy .eslintrc format. The plugin ships with TypeScript type definitions.

npm install eslint-plugin-sukka
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-SUKK
E
eslint-plugin-sukka
developmentjavascriptv9.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

configs
import { configs } from 'eslint-plugin-sukka'
import Sukka from 'eslint-plugin-sukka/configs'
Import the named export `configs` from the main entry; the plugin's recommended config is available as configs.recommended.
rules
import { rules } from 'eslint-plugin-sukka'
const rules = require('eslint-plugin-sukka/rules')
Named export for the rules object. CommonJS require is not recommended for ESLint 9+ flat config.
flat config usage
import pluginSukka from 'eslint-plugin-sukka'; export default [...pluginSukka.configs.recommended];
const pluginSukka = require('eslint-plugin-sukka'); module.exports = pluginSukka.configs.recommended;
Must use flat config array; the config is an array of objects, not a single object.

Minimal flat config example enabling recommended rules and overriding specific plugin rules.

// eslint.config.js export { default as pluginSukka } from 'eslint-plugin-sukka'; // or using require in CommonJS: // const pluginSukka = require('eslint-plugin-sukka'); export default [ { files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'], plugins: { sukka: pluginSukka }, rules: { ...pluginSukka.configs.recommended.rules, 'sukka/ts/prefer-readonly': 'warn', 'sukka/no-tostring': 'error' } } ];
Debug
Known issues
breakingVersion 9.x drops support for ESLint <9.29 and legacy .eslintrc config format.
fix
Upgrade to ESLint 9 and use flat config only.
affects: >=9.0.0 <10.0.0
breakingRenamed rule 'sukka/ts/no-inferrable-types' to 'sukka/ts/prefer-readonly' in v9.4.0.
fix
Replace 'sukka/ts/no-inferrable-types' with 'sukka/ts/prefer-readonly' in your config.
affects: >=9.4.0 <9.5.0
deprecatedRule 'sukka/no-array-reduce' is deprecated in favor of 'sukka/no-array-reduce' (note: same name, but the rule ID changed to 'sukka/no-array-reduce-2' in future versions).
fix
Use 'sukka/no-array-reduce-2' if you want the new behavior; otherwise remove the rule.
affects: >=9.3.0 <9.5.0
gotchaThe plugin's recommended config may enable rules that conflict with TypeScript's strict mode or other plugins.
fix
Review the recommended rules and disable any that conflict with your existing config.
affects: >=1.0.0
gotchaTypeScript peer dependency must be installed even for JavaScript-only projects because some rules internally use TypeScript APIs.
fix
Install TypeScript as a dev dependency or set parserOptions.parser to mark it as optional.
affects: >=1.0.0
gotchaThe plugin expects TypeScript source files to be parsed with the TypeScript parser (e.g., @typescript-eslint/parser). Not setting this will cause parse errors.
fix
Add '@typescript-eslint/parser' to your ESLint config and set parser: '@typescript-eslint/parser' for .ts files.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'sukka': Cannot find module 'eslint-plugin-sukka'
Plugin not installed or missing from node_modules.
fix
Run 'npm install eslint-plugin-sukka --save-dev'.
Error: Rule 'sukka/ts/no-inferrable-types' is not found
Rule was renamed in v9.4.0.
fix
Replace with 'sukka/ts/prefer-readonly'.
Error: ESLint configuration in .eslintrc.* is no longer supported. Use eslint.config.js instead.
ESLint 9 requires flat config; this plugin does not support legacy config.
fix
Convert to flat config using eslint.config.js.
Error: Failed to load config 'plugin:sukka/recommended' to extend from
Using string-based extends in ESLint 9 flat config.
fix
Import pluginSukka from 'eslint-plugin-sukka' and spread pluginSukka.configs.recommended directly in your config array.
Upgrade
Version history
9.5.0latest on npm
Audit
Dependencies
eslintrequiredcore peer dependency; plugin runs as an ESLint plugin
typescriptrequiredrequired for rules that type-check TypeScript code
Agent activity
42 hits · last 30 days
node
36
Perplexity
1
Resources
eslint-plugin-sukka — npm install eslint-plugin-sukka · libregistry