Registry / testing / eslint-plugin-enact

eslint-plugin-enact

JSON →
library2.0.4jsnpmunverified

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.

npm install eslint-plugin-enact
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-ENAC
E
eslint-plugin-enact
testingjavascriptv2.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

plugin
import enact from 'eslint-plugin-enact'
const enact = require('eslint-plugin-enact')
ESM import is standard; CJS require is unsupported in v2 because ESLint v9 uses ESM-only flat config.
rules
import { rules } from 'eslint-plugin-enact'
const { rules } = require('eslint-plugin-enact')
Export is named; flat config expects object with 'rules' key in plugin.
configs
import { configs } from 'eslint-plugin-enact'
Available via named export; typically used in flat config to spread recommended rules.

Configures Enact ESLint plugin in flat config with three rules and custom settings for kind/hoc detection.

// eslint.config.js import enact from 'eslint-plugin-enact' export default [ { plugins: { enact }, rules: { 'enact/kind-name': 'warn', 'enact/display-name': 'warn', 'enact/no-module-exports-import': 'error', }, settings: { enact: { kind: 'kind', hoc: 'hoc' } } } ]
Debug
Known issues
breakingVersion 2.x requires ESLint >=9.0.0 and flat config; legacy eslintrc format no longer supported.
fix
Migrate to flat config (eslint.config.js) and upgrade ESLint to v9+.
affects: >=2.0.0
breakingNode engine requirement changed to ^20.0.0 || >=22.0.0 in v2, dropping Node 18 and below.
fix
Use Node 20 or 22+.
affects: >=2.0.0-alpha.1
deprecatedRule enact/prop-types was removed in v2.0.0-beta.1.
fix
Disable the rule or migrate to react/prop-types if needed.
affects: <2.0.0-beta.1
gotchaThe enact/display-name rule supersedes react/display-name; you should disable the React plugin rule to avoid conflicts.
fix
Disable the react/display-name rule in your ESLint config.
affects: all
gotchaSettings like kind and hoc are regex patterns, not plain strings. Incorrect usage may cause no matches.
fix
Use regex strings (e.g., 'kind' or '/^kind$/') in the settings object.
affects: all
Errors
Common errors & fixes
Error: Failed to load plugin 'enact': Cannot find module 'eslint-plugin-enact'
Plugin not installed or ESLint cannot resolve it.
fix
Run `npm install eslint-plugin-enact --save-dev` and ensure node_modules path is correct.
Error: Invalid config: plugins[0].rules.unknown-rule not found in plugin 'enact'
Referenced rule name does not exist in the plugin.
fix
Check available rules: 'enact/kind-name', 'enact/display-name', 'enact/no-module-exports-import'. Remove unknown rule.
Error: Could not find 'plugin:enact/recommended' in config. ESLint v9 does not support extends with plugins.
Using deprecated configurations referencing 'plugin:enact/recommended' (not a valid config key).
fix
Use flat config: `import enact from 'eslint-plugin-enact'` and spread enact.configs.recommended if available.
Upgrade
Version history
2.0.4latest on npm
Audit
Dependencies
eslintrequiredpeer dependency: required as the lint runner, must be >=9.0.0
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-enact — npm install eslint-plugin-enact · libregistry