{"id":19737,"library":"eslint-plugin-enact","title":"ESLint Plugin Enact","description":"Enact specific linting rules for ESLint, designed for applications built with the Enact framework (LG webOS). Current stable version is 2.0.4, released in 2024. The plugin provides rules like kind-name, display-name (superseding react/display-name), and no-module-exports-import. It requires ESLint >=9.0.0 and Node >=20.0.0 or >=22.0.0. Key differentiator: it prevents false-flagging of Enact components (kind, hoc) by standard React lint rules, making it essential for Enact projects. Release cadence is irregular; minor updates focus on dependency bumps. Only supports flat config (ESLint v9+), breaking from v1's legacy config.","status":"active","version":"2.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/enactjs/eslint-plugin-enact","tags":["javascript","eslint","eslint-plugin","eslintplugin","react","enact"],"install":[{"cmd":"npm install eslint-plugin-enact","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-enact","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-enact","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: required as the lint runner, must be >=9.0.0","package":"eslint","optional":false}],"imports":[{"note":"ESM import is standard; CJS require is unsupported in v2 because ESLint v9 uses ESM-only flat config.","wrong":"const enact = require('eslint-plugin-enact')","symbol":"plugin","correct":"import enact from 'eslint-plugin-enact'"},{"note":"Export is named; flat config expects object with 'rules' key in plugin.","wrong":"const { rules } = require('eslint-plugin-enact')","symbol":"rules","correct":"import { rules } from 'eslint-plugin-enact'"},{"note":"Available via named export; typically used in flat config to spread recommended rules.","wrong":"","symbol":"configs","correct":"import { configs } from 'eslint-plugin-enact'"}],"quickstart":{"code":"// eslint.config.js\nimport enact from 'eslint-plugin-enact'\n\nexport default [\n  {\n    plugins: { enact },\n    rules: {\n      'enact/kind-name': 'warn',\n      'enact/display-name': 'warn',\n      'enact/no-module-exports-import': 'error',\n    },\n    settings: {\n      enact: {\n        kind: 'kind',\n        hoc: 'hoc'\n      }\n    }\n  }\n]","lang":"javascript","description":"Configures Enact ESLint plugin in flat config with three rules and custom settings for kind/hoc detection."},"warnings":[{"fix":"Migrate to flat config (eslint.config.js) and upgrade ESLint to v9+.","message":"Version 2.x requires ESLint >=9.0.0 and flat config; legacy eslintrc format no longer supported.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use Node 20 or 22+.","message":"Node engine requirement changed to ^20.0.0 || >=22.0.0 in v2, dropping Node 18 and below.","severity":"breaking","affected_versions":">=2.0.0-alpha.1"},{"fix":"Disable the rule or migrate to react/prop-types if needed.","message":"Rule enact/prop-types was removed in v2.0.0-beta.1.","severity":"deprecated","affected_versions":"<2.0.0-beta.1"},{"fix":"Disable the react/display-name rule in your ESLint config.","message":"The enact/display-name rule supersedes react/display-name; you should disable the React plugin rule to avoid conflicts.","severity":"gotcha","affected_versions":"all"},{"fix":"Use regex strings (e.g., 'kind' or '/^kind$/') in the settings object.","message":"Settings like kind and hoc are regex patterns, not plain strings. Incorrect usage may cause no matches.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install eslint-plugin-enact --save-dev` and ensure node_modules path is correct.","cause":"Plugin not installed or ESLint cannot resolve it.","error":"Error: Failed to load plugin 'enact': Cannot find module 'eslint-plugin-enact'"},{"fix":"Check available rules: 'enact/kind-name', 'enact/display-name', 'enact/no-module-exports-import'. Remove unknown rule.","cause":"Referenced rule name does not exist in the plugin.","error":"Error: Invalid config: plugins[0].rules.unknown-rule not found in plugin 'enact'"},{"fix":"Use flat config: `import enact from 'eslint-plugin-enact'` and spread enact.configs.recommended if available.","cause":"Using deprecated configurations referencing 'plugin:enact/recommended' (not a valid config key).","error":"Error: Could not find 'plugin:enact/recommended' in config. ESLint v9 does not support extends with plugins."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}