screeps-typescript-starter icon indicating copy to clipboard operation
screeps-typescript-starter copied to clipboard

upgrade eslint and fix tsconfig.lib

Open Jomik opened this issue 2 years ago • 5 comments

Jomik avatar Oct 11 '22 14:10 Jomik

I think the target should stay at ES2018. Node 10 supports ES2018 in all of the major ways.

I've done more research on this than I'm happy about. Node 10 should be dead, it stopped receiving security patches on 30 Apr 2021. So researching it is getting more frustrating as time goes on (ex. I cannot run tests on replit. because drumroll it's a (potentially) insecure package).

Node.green lists ES2018 as 92% supported for Node 10 but this I think is a very minor technicality. Supporting ES2018 allows for the following features to be used without transpiling, object spread and rest syntax, async generators, Promise.finally.

The Proxy ownKeys note is a rather minor footnote https://github.com/kangax/compat-table/pull/1543 Perhaps critical for node/browsers to get right but for devs it's more of a "don't do this, will cause obvious bugs" sort of indicator.


For engine, it would be better to remove it altogether. I really don't want to advocate for more use of Node 10. Players should be free to develop with whatever they want. At most, it was most an indication of what your "output" is expected to run in which would be Screeps MMO running on Node 10.

I haven't had time yet to test the rest of the changes but I suspect the dependency updates are fine, will check on the next pass.

pyrodogg avatar Oct 26 '22 18:10 pyrodogg

Object spread and rest syntax is a good point! That at least makes the bundled code smaller in size, so arguably better.

Promises and async generators do not really matter for screeps though.


Completely agree on removing the engine field.

Jomik avatar Oct 26 '22 18:10 Jomik

Can I bump this request to make this PR into the master branch?

Jeroendevr avatar Dec 09 '22 10:12 Jeroendevr

I think the README may need to have an update, to remove the reference to what node version is required.

Jomik avatar Dec 09 '22 13:12 Jomik

Seems a small thing to to, I would like to contribute to. But can I do that within this PR, is that possible? Or should I create a separate PR? Seems like a small fix to just merge this PR and then adjust the readme or do I overlook something?

Jeroendevr avatar Dec 14 '22 10:12 Jeroendevr