Skip to content

chore: drop deprecated importsNotUsedAsValues option - #3

Merged
B4nan merged 1 commit into
mainfrom
chore/drop-deprecated-imports-not-used-as-values
Apr 14, 2026
Merged

B4nan merged 1 commit into
mainfrom
chore/drop-deprecated-imports-not-used-as-values

Conversation

@B4nan

@B4nan B4nan commented Apr 14, 2026

Copy link
Copy Markdown
Member

Summary

The `importsNotUsedAsValues` option was deprecated in TypeScript 5.0 and fully removed in newer toolchains (e.g. `tsgolint`, which powers `oxlint --type-aware`, refuses to parse tsconfigs that contain it).

Since TS 5.0, the value `"remove"` has been the default behavior, so dropping it from this shared config is a no-op for consumers on any supported TypeScript version. It only removes a compat headache.

A new release after merging would unblock Crawlee v4 (apify/crawlee#3569) from migrating to oxlint with type-aware linting enabled without having to carry a local yarn patch.

The option was removed in TypeScript 5.5 and tsgolint (used by
oxlint --type-aware) refuses to parse tsconfigs that contain it.
Since TS 5.0, its behavior ('remove') has been the default, so
dropping it is a no-op for consumers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added this to the 138th sprint - Tooling team milestone Apr 14, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Apr 14, 2026
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Apr 14, 2026
@B4nan
B4nan merged commit b83b719 into main Apr 14, 2026
1 check failed
@B4nan
B4nan deleted the chore/drop-deprecated-imports-not-used-as-values branch April 14, 2026 14:45
B4nan added a commit to apify/crawlee that referenced this pull request Apr 17, 2026
## Summary

Replaces ESLint + Biome with Oxlint + Oxfmt, modeled after [mikro-orm's
setup](https://github.com/mikro-orm/mikro-orm). Type-aware linting is
enabled via `oxlint-tsgolint` and the `--type-aware` flag. Lint + format
coverage spans `packages`, `test`, and `docs`.

## Notable config choices

- **`@apify/tsconfig` bumped to `^0.1.2`** — that release
(apify/apify-tsconfig#3, apify/apify-tsconfig#4) drops the deprecated
`importsNotUsedAsValues` option that `tsgolint` refuses to parse. No
local patch needed anymore.
- **Root tsconfigs drop `baseUrl`** — `tsgolint` removed support for it.
Non-relative imports under `test/*` and the one stray `packages/*`
import in `memory-storage` were converted to relative paths so the
mappings could be removed entirely.
- **Rules that were triggering across existing code** are fully enabled
as errors now. Violations fall into two buckets:
- Real issues fixed in-place (dead code after `throw`, `let`→`const`,
unnecessary template expressions, `.match` → `RegExp#exec`, `stream` →
`node:stream`, deprecated `z.ZodSchema` → `z.ZodType`).
- Patterns the rule flags pessimistically but that are correct
(`Promise.all(arr.map(fn))` where `fn` returns `Awaitable<void>`) —
fixed by marking the inner arrow `async`.
- **`typescript/no-deprecated` stays at `warn`** — we intentionally use
our own deprecated APIs in implementation code (`pseudoUrls`,
`experiments.requestLocking` opt-out, puppeteer page-level
cookies/postData/target). They're visible but don't block CI.
- **`no-misused-promises`** is configured with `{ checksVoidReturn: {
arguments: false } }`. Event-listener callbacks (`page.on(..., async)`)
and timer callbacks (`setInterval(async () => ...)`) are standard Node
patterns and the rule's default behavior is too strict.
- **`lint-staged`** runs `oxlint --fix` then `oxfmt --write`. A handful
of unsafe auto-fixes (`no-useless-default-assignment` strips
destructuring defaults, `return-await` removes `await` keywords,
`no-inferrable-types` occasionally strips default values) are turned off
so the fixer can run automatically without risk.

## Migration mechanics

- `eslint.config.mjs`, `biome.json`, and `tsconfig.eslint.json` are
removed. `.oxlintrc.json` + `.oxfmtrc.json` replace them.
- CI's lint job runs `yarn lint` + `yarn format:check`.
- `oxfmt` is set to 120 columns / 4-space / single quotes / `lf`,
matching the previous Biome setup. Markdown/MDX and release-managed
files (CHANGELOGs, package.json) are in its ignore list to avoid
cosmetic churn.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
barjin pushed a commit to apify/crawlee that referenced this pull request Jul 20, 2026
Replaces ESLint + Biome with Oxlint + Oxfmt, modeled after [mikro-orm's
setup](https://github.com/mikro-orm/mikro-orm). Type-aware linting is
enabled via `oxlint-tsgolint` and the `--type-aware` flag. Lint + format
coverage spans `packages`, `test`, and `docs`.

- **`@apify/tsconfig` bumped to `^0.1.2`** — that release
(apify/apify-tsconfig#3, apify/apify-tsconfig#4) drops the deprecated
`importsNotUsedAsValues` option that `tsgolint` refuses to parse. No
local patch needed anymore.
- **Root tsconfigs drop `baseUrl`** — `tsgolint` removed support for it.
Non-relative imports under `test/*` and the one stray `packages/*`
import in `memory-storage` were converted to relative paths so the
mappings could be removed entirely.
- **Rules that were triggering across existing code** are fully enabled
as errors now. Violations fall into two buckets:
- Real issues fixed in-place (dead code after `throw`, `let`→`const`,
unnecessary template expressions, `.match` → `RegExp#exec`, `stream` →
`node:stream`, deprecated `z.ZodSchema` → `z.ZodType`).
- Patterns the rule flags pessimistically but that are correct
(`Promise.all(arr.map(fn))` where `fn` returns `Awaitable<void>`) —
fixed by marking the inner arrow `async`.
- **`typescript/no-deprecated` stays at `warn`** — we intentionally use
our own deprecated APIs in implementation code (`pseudoUrls`,
`experiments.requestLocking` opt-out, puppeteer page-level
cookies/postData/target). They're visible but don't block CI.
- **`no-misused-promises`** is configured with `{ checksVoidReturn: {
arguments: false } }`. Event-listener callbacks (`page.on(..., async)`)
and timer callbacks (`setInterval(async () => ...)`) are standard Node
patterns and the rule's default behavior is too strict.
- **`lint-staged`** runs `oxlint --fix` then `oxfmt --write`. A handful
of unsafe auto-fixes (`no-useless-default-assignment` strips
destructuring defaults, `return-await` removes `await` keywords,
`no-inferrable-types` occasionally strips default values) are turned off
so the fixer can run automatically without risk.

- `eslint.config.mjs`, `biome.json`, and `tsconfig.eslint.json` are
removed. `.oxlintrc.json` + `.oxfmtrc.json` replace them.
- CI's lint job runs `yarn lint` + `yarn format:check`.
- `oxfmt` is set to 120 columns / 4-space / single quotes / `lf`,
matching the previous Biome setup. Markdown/MDX and release-managed
files (CHANGELOGs, package.json) are in its ignore list to avoid
cosmetic churn.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
B4nan added a commit to apify/crawlee that referenced this pull request Aug 12, 2026
Replaces ESLint + Biome with Oxlint + Oxfmt, modeled after [mikro-orm's
setup](https://github.com/mikro-orm/mikro-orm). Type-aware linting is
enabled via `oxlint-tsgolint` and the `--type-aware` flag. Lint + format
coverage spans `packages`, `test`, and `docs`.

- **`@apify/tsconfig` bumped to `^0.1.2`** — that release
(apify/apify-tsconfig#3, apify/apify-tsconfig#4) drops the deprecated
`importsNotUsedAsValues` option that `tsgolint` refuses to parse. No
local patch needed anymore.
- **Root tsconfigs drop `baseUrl`** — `tsgolint` removed support for it.
Non-relative imports under `test/*` and the one stray `packages/*`
import in `memory-storage` were converted to relative paths so the
mappings could be removed entirely.
- **Rules that were triggering across existing code** are fully enabled
as errors now. Violations fall into two buckets:
- Real issues fixed in-place (dead code after `throw`, `let`→`const`,
unnecessary template expressions, `.match` → `RegExp#exec`, `stream` →
`node:stream`, deprecated `z.ZodSchema` → `z.ZodType`).
- Patterns the rule flags pessimistically but that are correct
(`Promise.all(arr.map(fn))` where `fn` returns `Awaitable<void>`) —
fixed by marking the inner arrow `async`.
- **`typescript/no-deprecated` stays at `warn`** — we intentionally use
our own deprecated APIs in implementation code (`pseudoUrls`,
`experiments.requestLocking` opt-out, puppeteer page-level
cookies/postData/target). They're visible but don't block CI.
- **`no-misused-promises`** is configured with `{ checksVoidReturn: {
arguments: false } }`. Event-listener callbacks (`page.on(..., async)`)
and timer callbacks (`setInterval(async () => ...)`) are standard Node
patterns and the rule's default behavior is too strict.
- **`lint-staged`** runs `oxlint --fix` then `oxfmt --write`. A handful
of unsafe auto-fixes (`no-useless-default-assignment` strips
destructuring defaults, `return-await` removes `await` keywords,
`no-inferrable-types` occasionally strips default values) are turned off
so the fixer can run automatically without risk.

- `eslint.config.mjs`, `biome.json`, and `tsconfig.eslint.json` are
removed. `.oxlintrc.json` + `.oxfmtrc.json` replace them.
- CI's lint job runs `yarn lint` + `yarn format:check`.
- `oxfmt` is set to 120 columns / 4-space / single quotes / `lf`,
matching the previous Biome setup. Markdown/MDX and release-managed
files (CHANGELOGs, package.json) are in its ignore list to avoid
cosmetic churn.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
B4nan added a commit to apify/crawlee that referenced this pull request Aug 18, 2026
Replaces ESLint + Biome with Oxlint + Oxfmt, modeled after [mikro-orm's
setup](https://github.com/mikro-orm/mikro-orm). Type-aware linting is
enabled via `oxlint-tsgolint` and the `--type-aware` flag. Lint + format
coverage spans `packages`, `test`, and `docs`.

- **`@apify/tsconfig` bumped to `^0.1.2`** — that release
(apify/apify-tsconfig#3, apify/apify-tsconfig#4) drops the deprecated
`importsNotUsedAsValues` option that `tsgolint` refuses to parse. No
local patch needed anymore.
- **Root tsconfigs drop `baseUrl`** — `tsgolint` removed support for it.
Non-relative imports under `test/*` and the one stray `packages/*`
import in `memory-storage` were converted to relative paths so the
mappings could be removed entirely.
- **Rules that were triggering across existing code** are fully enabled
as errors now. Violations fall into two buckets:
- Real issues fixed in-place (dead code after `throw`, `let`→`const`,
unnecessary template expressions, `.match` → `RegExp#exec`, `stream` →
`node:stream`, deprecated `z.ZodSchema` → `z.ZodType`).
- Patterns the rule flags pessimistically but that are correct
(`Promise.all(arr.map(fn))` where `fn` returns `Awaitable<void>`) —
fixed by marking the inner arrow `async`.
- **`typescript/no-deprecated` stays at `warn`** — we intentionally use
our own deprecated APIs in implementation code (`pseudoUrls`,
`experiments.requestLocking` opt-out, puppeteer page-level
cookies/postData/target). They're visible but don't block CI.
- **`no-misused-promises`** is configured with `{ checksVoidReturn: {
arguments: false } }`. Event-listener callbacks (`page.on(..., async)`)
and timer callbacks (`setInterval(async () => ...)`) are standard Node
patterns and the rule's default behavior is too strict.
- **`lint-staged`** runs `oxlint --fix` then `oxfmt --write`. A handful
of unsafe auto-fixes (`no-useless-default-assignment` strips
destructuring defaults, `return-await` removes `await` keywords,
`no-inferrable-types` occasionally strips default values) are turned off
so the fixer can run automatically without risk.

- `eslint.config.mjs`, `biome.json`, and `tsconfig.eslint.json` are
removed. `.oxlintrc.json` + `.oxfmtrc.json` replace them.
- CI's lint job runs `yarn lint` + `yarn format:check`.
- `oxfmt` is set to 120 columns / 4-space / single quotes / `lf`,
matching the previous Biome setup. Markdown/MDX and release-managed
files (CHANGELOGs, package.json) are in its ignore list to avoid
cosmetic churn.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants