Skip to content

Migrate to @playcanvas/eslint-config v3 (/javascript)#8843

Draft
kpal81xd wants to merge 1 commit into
mainfrom
eslint-config-v3
Draft

Migrate to @playcanvas/eslint-config v3 (/javascript)#8843
kpal81xd wants to merge 1 commit into
mainfrom
eslint-config-v3

Conversation

@kpal81xd

@kpal81xd kpal81xd commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Part of the v3 rollout — playcanvas/eslint-config#48 (Wave 5 — highest blast radius).

What changed

  • Subpath migration: switched the root config to the /javascript (= /legacy) subpath export.
  • esmScriptTags: replaced the v2 playcanvasConfig.find(...) definedTags hack with the direct import { esmScriptTags } from '@playcanvas/eslint-config'. The old hack located the config entry carrying jsdoc/check-tag-names, read its definedTags, and re-set the rule to [...new Set([...existingTags, 'range', 'step', 'precision'])]. In v3 esmScriptTags already includes range/step/precision, so the rule override now sets definedTags: [...new Set([...esmScriptTags, 'alpha', 'beta', 'category', 'import'])] — preserving the shared config's own extra tags that the override would otherwise drop.
  • examples/ config: migrated to /javascript + /react. The hand-rolled minimal jsxUsesVars rule was removed since eslint-plugin-react (bundled by /react) provides react/jsx-uses-vars natively; all repo-specific bits (custom examples/* config-block rules, importOrder, globals, max-len, ignores) are preserved. The config loads and parses cleanly, but /react's recommended ruleset surfaces a large new error volume that still needs tuning — see Lint status. Rule triage for examples/ is still TODO.
  • Pinned @playcanvas/eslint-config to 3.0.0-beta.6 in both the root and examples/ packages.

Lint status

Draft — both configs load cleanly (no config-invalid / import / parse crashes).

  • Root (npm run lint): 6 errors / 3 warnings. Drop-in vs v2; remaining items are pre-existing JSDoc/import strict-mode nits (jsdoc/require-hyphen-before-param-description, one inline @type, import/no-named-as-default).
  • examples/ (npm run lint): 1830 errors / 0 warnings, dominated by rules newly introduced by /react: react/react-in-jsx-scope (1379 — obsolete under the React 19 JSX transform these examples use), react/prop-types (232), and the stricter legacy import/extensions (219). These need deliberate config tuning (disable react-in-jsx-scope / wire up the jsx-runtime, decide on prop-types, relax import/extensions), not source fixes.

Strict-mode/JSDoc triage tracked in playcanvas/eslint-config#48; not fixed here per the rollout policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant