Skip to content

lint: migrate to ESLint 10 flat config - #185

Draft
rtfpessoa wants to merge 3 commits into
rodrigo/upgrade-cli-runtimefrom
rodrigo/upgrade-cli-lint
Draft

rtfpessoa wants to merge 3 commits into
rodrigo/upgrade-cli-runtimefrom
rodrigo/upgrade-cli-lint

Conversation

@rtfpessoa

Copy link
Copy Markdown
Owner

This is 3 of 4, stacked on the runtime draft. It updates lint before the TypeScript compiler moves to 6, so reviewers can evaluate the rule migration independently of the compiler upgrade.

  • Replace the legacy config and --ignore-path with ESLint 10 flat config and explicit ignores. Use import-x with the TypeScript resolver, the n rules for Node, and @eslint/json for strict JSON. Retain regex optimization after checking diagnostics and autofix.
  • Preserve Jest 29 discovery linting and check missing TS and JSX exports from JS/JSX importers. Keep TypeScript 5.3.3 at this stage. The lockfile delta is limited to lint dependency trees.

Verified: Frozen Yarn Classic install; 27 tests on each of Node 22.23.5, 24.22.3, and 26.13.1; Jest discovery, JSX export, JSON, ignore, unresolved import, and regex lint probes. For the source adjustments, 320 option and rendered-output comparisons matched the runtime base on each of Node 12.0.0 and 24.22.3. This stacked base does not trigger the master-only PR workflow.

Reviewer focus: whether the scoped JS/JSX import parser and Jest globs preserve the old lint coverage. The authored delta is +141/-104; generated Yarn lockfile churn is +775/-1,263. The scope excludes runtime dependency changes and the TypeScript 6 upgrade.

JSX and Jest overrides

Upgrade lint presets and resolvers while preserving TypeScript 5.3 and CLI behavior.

Signed-off-by: Rodrigo Fernandes <rodrigo.fernandes@datadoghq.com>
Match Jest discovery and validate TypeScript exports from JS and JSX without changing MJS parser settings.

Signed-off-by: Rodrigo Fernandes <rodrigo.fernandes@datadoghq.com>
Parse JSX modules for import-x named and namespace checks from JS and JSX without changing MJS settings.

Signed-off-by: Rodrigo Fernandes <rodrigo.fernandes@datadoghq.com>

This branch has not been deployed

No deployments
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