{"id":27726,"library":"eslint-plugin-kirklin","title":"eslint-plugin-kirklin","description":"eslint-plugin-kirklin is a collection of opinionated ESLint rules created by Kirk Lin, primarily used with the kirklin/eslint-config configuration. The current stable version is 4.0.0, which adds support for ESLint v10. The plugin releases new features and breaking changes periodically, with v2.0.0 dropping CJS support to become ESM-only. Key differentiators include custom rules like consistent-list-newline, top-level-function, no-top-level-await, consistent-chaining, and indent-unindent, which enforce a consistent code style specific to the author's preferences.","status":"active","version":"4.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/kirklin/eslint-plugin-kirklin","tags":["javascript","eslint-plugin","typescript"],"install":[{"cmd":"npm install eslint-plugin-kirklin","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-kirklin","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-kirklin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to use the plugin","package":"eslint","optional":false}],"imports":[{"note":"Plugin is ESM-only since v2.0.0; requires eslint.config.js (flat config) for ESLint >=9.","wrong":"const plugin = require('eslint-plugin-kirklin')","symbol":"default","correct":"import plugin from 'eslint-plugin-kirklin'"},{"note":"Named export for accessing rule definitions, also ESM-only.","wrong":"const { rules } = require('eslint-plugin-kirklin')","symbol":"rules","correct":"import { rules } from 'eslint-plugin-kirklin'"},{"note":"Configurations are exported under configs (not config). Use plugin.configs.recommended for recommended config.","wrong":"import { config } from 'eslint-plugin-kirklin'","symbol":"configs","correct":"import { configs } from 'eslint-plugin-kirklin'"}],"quickstart":{"code":"// eslint.config.js\nimport plugin from 'eslint-plugin-kirklin';\n\nexport default [\n  {\n    plugins: {\n      kirklin: plugin,\n    },\n    rules: {\n      'kirklin/consistent-list-newline': 'error',\n      'kirklin/top-level-function': 'error',\n      'kirklin/no-top-level-await': 'error',\n      'kirklin/consistent-chaining': 'warn',\n    },\n  },\n];\n","lang":"typescript","description":"Shows how to import the plugin and configure recommended rules in flat config (ESLint >=9)."},"warnings":[{"fix":"Ensure your project is using ES modules (set \"type\": \"module\" in package.json or use .mjs extension for config).","message":"v2.0.0 dropped CommonJS (CJS) build; plugin is now ESM-only.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update to v4.0.0: npm install eslint-plugin-kirklin@latest","message":"v1.x versions are deprecated; upgrade to v2+ for ESM support and latest rules.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Update ESLint to >=10: npm install eslint@latest","message":"v4.0.0 requires ESLint v10. Using with older ESLint versions will fail.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Migrate to flat config: https://eslint.org/docs/latest/use/configure/configuration-files-new","message":"Plugin is designed for flat config (eslint.config.js). Legacy .eslintrc format is not supported since v2.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Consider upgrading to ESLint >=9 or use eslint-plugin-kirklin@1.x (but v1 is deprecated).","message":"If using ESLint <9, you must use a compatibility layer like @eslint/eslintrc to use this plugin.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Convert config to ESM (rename .eslintrc.js to eslint.config.js with \"type\": \"module\") or use dynamic import.","cause":"Plugin is ESM-only since v2.0.0, but config file is using CommonJS (require).","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-plugin-kirklin/index.js from /path/to/.eslintrc.js not supported."},{"fix":"Run: npm install eslint-plugin-kirklin --save-dev","cause":"Plugin not installed or not in node_modules.","error":"ESLint: Failed to load plugin 'kirklin' declared in '.eslintrc.*': Cannot find module 'eslint-plugin-kirklin'"},{"fix":"Use plugin.configs.recommended (or plugin.configs itself) instead of plugin.config.","cause":"Misleading: plugin.configs is an object, not a function; referring to it as config will cause a TypeError.","error":"TypeError: plugin.config is not a function"},{"fix":"Add plugins: { kirklin: plugin } to your config object.","cause":"Flat config requires the plugin to be registered in the plugins object.","error":"ESLint could not find the plugin 'eslint-plugin-kirklin' in the config."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}