Migrate to @playcanvas/eslint-config v3 (/typescript)#245
Draft
kpal81xd wants to merge 2 commits into
Draft
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 v3 rollout — playcanvas/eslint-config#48.
Changes
config:
import typescriptConfig from '@playcanvas/eslint-config/typescript'andexport default [...typescriptConfig, ...overrides].spread
tsPlugin.configs.recommended.rules, plus animport/resolversettings block.The
/typescriptconfig now provides the@typescript-eslintparser+plugin(recommended/strict/stylistic), the import-x resolver, jsdoc, and package-json rules,
so all of that was dropped.
import/*→import-x/*namespace: renamed theeslint-disable import/orderdirectivein
src/index.tstoimport-x/order. Dropped the manualimport/resolversettings block.jsdoc/*overrides (require-param-type,require-returns-type).examples/**/*.mjsand the**/*.tsblock's browser + custom globals (
AddEventListenerOptions,EventListener,EventListenerOptions), and the project's@typescript-eslint/*offsuppressions(
ban-ts-comment,no-explicit-any,no-unused-vars).Version bump
@playcanvas/eslint-configto exactly3.0.0-beta.5(carries the import-xresolver fix). Regenerated
package-lock.json.devDep cleanup
Removed direct devDeps now bundled transitively by
/typescript:@typescript-eslint/eslint-plugin@typescript-eslint/parsereslint-import-resolver-typescript(
globalskept — still referenced directly ineslint.config.mjsoverrides.)Lint result
Ran an auto-fix pass (
eslint ... --fix): 102 errors + 5 warnings auto-fixed(113/5 → 11/0). Auto-fixes were
consistent-type-imports(import type),array-type(
Array<T>→T[]), redundant type-annotation removal, andimport-x/orderreordering.tsc --noEmitandrollup -cboth pass after the fixes.11 residual errors remain (not hand-fixed — pre-existing genuine findings):
@typescript-eslint/no-unused-varsexamples/assets/scripts/camera-feed.mjs:84@typescript-eslint/no-empty-functionsrc/components/component.ts:44no-prototype-builtinssrc/components/particlesystem-component.ts:55@typescript-eslint/consistent-type-definitionssrc/components/script-component.ts:21Opened as a draft pending decisions on the residual findings above.