Migrate to @playcanvas/eslint-config v3 (/typescript)#64
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.
Migrates this repo to
@playcanvas/eslint-configv3, adopting the/typescriptsubpath tier. Part of the rollout in playcanvas/eslint-config#48.Changes
import playcanvasConfig from '@playcanvas/eslint-config'→import typescriptConfig from '@playcanvas/eslint-config/typescript'. The/typescripttier provides the typescript-eslint parser + plugin (for**/*.{js,mjs,ts},globals.node) and theimport-xresolver out of the box.@typescript-eslint/parser+@typescript-eslint/eslint-pluginimports and their parser/plugin config blocks, the manualimport/resolvernode-settings block (now supplied by the tier), and the now-defunctjsdoc/*rule overrides (the/typescripttier has no jsdoc plugin).import/no-unresolved→import-x/no-unresolved(v3 registerseslint-plugin-import-xnatively).**/*.tsextra globals (browser + mocha + node),no-use-before-define: off, and the test-fileno-unused-expressions: offblock.@playcanvas/eslint-configto3.0.0-beta.5(carries the import-x resolver fix) and removed@typescript-eslint/eslint-plugin+@typescript-eslint/parserfrom devDependencies (only referenced by the old config; the tier now provides them). Regeneratedpackage-lock.json.Auto-fixed (
lint:fix)3 source files auto-fixed (
src/history.ts,src/observer-history.ts,src/observer.ts):import-x/consistent-type-specifier-style(value→type imports), redundant default-value type annotations, and staleeslint-disabledirectives.Residual errors — EXPECTED, needs a separate typing pass
This is a TS lib that leans heavily on
any. 154 residual errors remain after auto-fix (no config-load errors). These are intentionally NOT hand-fixed here:@typescript-eslint/no-explicit-anysrc/event-handle.ts:51no-prototype-builtinssrc/observer.ts:370@typescript-eslint/no-this-aliassrc/observer.ts:301@typescript-eslint/no-unused-expressionstest/observer.test.mjs:35prefer-rest-paramssrc/event-handle.ts:56@typescript-eslint/prefer-for-ofsrc/events.ts:167@typescript-eslint/no-unsafe-function-typesrc/observer.ts:57Opened as draft because residual errors are expected and require a follow-up typing pass.