Skip to content

chore: enforce file extensions in relative imports - #1147

Merged
vdusek merged 2 commits into
masterfrom
chore/lint-import-extensions
Oct 15, 2026
Merged

vdusek merged 2 commits into
masterfrom
chore/lint-import-extensions

Conversation

@B4nan

@B4nan B4nan commented Oct 9, 2026

Copy link
Copy Markdown
Member

Enables oxlint's import/extensions rule, so a relative import without the .js extension fails lint. Package imports are ignored, and the codebase already passes. Same rule as apify/apify-sdk-js#770.

@B4nan B4nan added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ There are broken links in the documentation.

See more at https://github.com/apify/apify-client-js/actions/runs/38123905406#summary-114424141605

@B4nan
B4nan requested a review from apify-factory October 12, 2026 08:30

@apify-factory apify-factory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nothing blocking.

@B4nan

B4nan commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@mfori I was hoping the factory could actually approve such a tiny change on its own. Any reason it doesn't work here?

@mfori

mfori commented Oct 12, 2026

Copy link
Copy Markdown
Member

@mfori I was hoping the factory could actually approve such a tiny change on its own. Any reason it doesn't work here?

It needs to be set up per repo in this testing phase, it's currently just apify-core, apify-agi and apify-ai-agent.
But maybe we can already turn it on across the whole organization @mtrunkat?

@B4nan

B4nan commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

If not for the whole org, please enable it for the tooling repos (SDKs, clients, crawlees, impit, actor-runtime, cgroups-sensor, actor-debugger, ... I guess we have more, but let's start with this list)

@mtrunkat

Copy link
Copy Markdown
Member

@mfori, @B4nan, what about if we create a custom property on the repository that turns this on via an organization rule?

I am not 100% sure we want to enable this everywhere (speaking of infra, etc.), but this way it will be very easy to use.

@B4nan

B4nan commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Sure, if we can enable it per repo via GH settings, it would be great.

@mfori

mfori commented Oct 12, 2026

Copy link
Copy Markdown
Member

Hm, a custom property is a good switch, but an org rule can’t run the pipeline. A ruleset can only add a required workflow, which would block merging on every PR, and we want it to run only when apify-factory is requested. Running it centrally from the factory’s webhook doesn’t work either: a push that changes the code must withdraw the approval, and webhooks can drop events. So the workflow has to live in each repo.

What about:

  • move the pipeline into a reusable workflow in apify/ai-developer
  • each repo keeps a ~15-line stub that calls it, plus an optional policy for its own rules
  • setting factory-auto-approve: true on a repo gets it a bot PR that adds the stub

Pros: every push is caught reliably, it’s not a required check, each repo keeps its own config, and changes ship once from ai-developer.
Cons: each repo carries a small file

@mtrunkat

Copy link
Copy Markdown
Member

sounds good

@vdusek
vdusek merged commit 77c48ba into master Oct 15, 2026
9 checks passed
@vdusek
vdusek deleted the chore/lint-import-extensions branch October 15, 2026 07:08
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.

6 participants