Migrate to @playcanvas/eslint-config v3 (/typescript + /react)#381
Draft
kpal81xd wants to merge 2 commits into
Draft
Migrate to @playcanvas/eslint-config v3 (/typescript + /react)#381kpal81xd wants to merge 2 commits into
kpal81xd wants to merge 2 commits into
Conversation
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the rollout in playcanvas/eslint-config#48.
What changed
Subpath migration (typescript + react). v3 ships tiered subpath exports instead of a single default config. This is a React app, so it now composes both tiers —
/reactis additive (JSX / a11y / hooks rules only) and is spread on top of/typescript:@typescript-eslintplugin/parser wiring andtsPlugin.configs.recommended.rulesspread —/typescriptprovides typescript-eslint recommended + strict + stylistic.import/resolversettings block —/typescriptwires the resolver internally viaimport-x/resolver-next.jsdoc/*overrides (jsdoc is no longer part of the/typescripttier).import/no-unresolved→import-x/no-unresolved(v3's/typescriptuseseslint-plugin-import-x). Noeslint-disable import/*comments existed in source.@typescript-eslint/{ban-ts-comment,no-explicit-any,no-unused-vars}: 'off', browser globals for.ts/.tsx, node globals +import-x/no-unresolved: 'off'for.js/.mjs./typescriptonly wires the TS parser for**/*.{js,mjs,ts}, so.tsxfiles getparser: tseslint.parserexplicitly (this app has many.tsxfiles).Version bump.
@playcanvas/eslint-config2.1.0→3.0.0-beta.5(carries the import-x resolver fix; verified noimport-x/no-unresolvedfalse positives).devDep cleanup (now bundled transitively by the config, unused elsewhere):
@typescript-eslint/eslint-plugin@typescript-eslint/parsereslint-import-resolver-typescriptglobalsKept
eslint,typescript,react/react-dom(runtime), and all build/test deps.Lint result
lint:fixauto-fixed formatting/order issues across 19 source files. 28 residual errors remain (all genuine findings from v3's stricter ruleset — not config-load errors). Left unfixed per the rollout process:@typescript-eslint/prefer-for-ofsrc/debug-lines.ts:402no-prototype-builtinssrc/helpers.ts:32@typescript-eslint/consistent-type-definitionssrc/index.tsx:24jsx-a11y/alt-textsrc/ui/index.tsx:51import-x/ordersrc/index.tsx:18@typescript-eslint/no-extraneous-classsrc/dummy-webgpu.ts:3no-emptysrc/index.tsx:210jsx-a11y/click-events-have-key-eventssrc/ui/load-controls.tsx:69jsx-a11y/no-static-element-interactionssrc/ui/load-controls.tsx:69Draft until the residual is triaged/fixed in a follow-up.