apify-docs
apify-docs copied to clipboard
style: use consistent code example language markers
Some examples were marked as js, some as javascript, some as ts, some as typescript. I chose the verbose variant, but in fact have no strong opinion, just wanted it to be consistent.
We use the short variants everywhere (at least I do), imo the long ones are mostly from the past.
I have no opinion as long as syntax highlighting works correctly, but consistency is always welcome.
We use the short variants everywhere (at least I do), imo the long ones are mostly from the past.
If that's so, I'll change it the other way around!
Eslint punishing me for touching old stuff 😅
apparently if we want to go for the shortest one we could change all python to py, but not sure if there is a point to it.
@TC-MO I'm okay with it! I added a663e40 🐍
Apart from one (temporarily?) timeouting link somewhere else in the docs and failing ESlint I think all should be fine. I don't feel like I should fix lint errors in code as part of this PR just because I've touched the files, I'd like to keep the PR focused only on changing the code block markers.
Is it okay to merge like this?
From lychee standpoint I'm ok, this link has been timing out multiple times on multiple pages. Not sure about ESlint maybe @B4nan can weigh in?
I'll do it. Found npm run lint:code:fix, that already did half of the job.
Okay, so I did my best, but I couldn't fix it all. I'm not proficient in TypeScript, React, or the JavaScript Apify SDK to fix stuff like "Unexpected any. Specify a different type" or "React Hook "Actor.useState" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function".
I'll let the build to finish, see if only these errors are left, and then I'll merge this PR.
All green except those three linter errors. Merging!
Apparently it fails on master too 🙀 I thought it only lints changes! Filed https://github.com/apify/apify-docs/issues/1068