Skip to content

eslint rules experiments for es2017 #9136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Arlen22
Copy link
Member

@Arlen22 Arlen22 commented Jul 8, 2025

I'm mostly just playing around with seeing how many eslint rules I can find that automatically upgrade to newer syntaxes and the PR is mostly to see how the size changes.

Arlen22 added 2 commits July 8, 2025 12:42
- update eslint to 2017
- add self to forbidden globals
- fix a few unfixable bugs caught by eslint
- convert newer features in twitter-archivist
Copy link

netlify bot commented Jul 8, 2025

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit 9940c09
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/686dd88fa524bb000853c3cf
😎 Deploy Preview https://deploy-preview-9136--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

github-actions bot commented Jul 8, 2025

Confirmed: Arlen22 has already signed the Contributor License Agreement (see contributing.md)

Copy link

github-actions bot commented Jul 8, 2025

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2534.8 KB

Diff: ⬇️ Decrease: 2.8 KB

@Arlen22 Arlen22 force-pushed the es2017/eslint-recommended branch from d18456d to 2e97a69 Compare July 8, 2025 20:18
@Arlen22 Arlen22 changed the title eslint recommended defaults gives a number of additional errors eslint rules experiments for es2017 Jul 8, 2025
@Arlen22 Arlen22 force-pushed the es2017/eslint-recommended branch 4 times, most recently from 6f1715b to 3835e8b Compare July 8, 2025 23:14
@Arlen22 Arlen22 force-pushed the es2017/eslint-recommended branch from 3835e8b to 9551969 Compare July 8, 2025 23:17
@Arlen22
Copy link
Member Author

Arlen22 commented Jul 8, 2025

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2532.7 KB
Diff: ⬇️ Decrease: 4.9 KB

Well, converting from string concatenation to template strings saves 5 KB.

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2537.5 KB
Diff: ⬇️ Decrease: 0.0 KB

Only doing the recommended fixes without any additional rules.

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2521.9 KB
Diff: ⬇️ Decrease: 15.7 KB

Adding the default Typescript formatter with spaces around operators and removing semicolons

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2535.2 KB
Diff: ⬇️ Decrease: 2.4 KB

Same settings but with semicolons explicitly inserted.

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2534.7 KB
Diff: ⬇️ Decrease: 2.9 KB

And with the rest of the automated changes, like arrow functions, const declarations, etc.

@Arlen22 Arlen22 force-pushed the es2017/eslint-recommended branch 4 times, most recently from e543441 to 70f7c9c Compare July 9, 2025 02:36
@Arlen22 Arlen22 force-pushed the es2017/eslint-recommended branch from 70f7c9c to 9940c09 Compare July 9, 2025 02:48
@pmario
Copy link
Member

pmario commented Jul 9, 2025

You did go down the rabbit hole. Interesting.

Did you have a closer look at boot.js? It seems to be completely messed up. It seems it did "sort" the exported functions. IMO it should not do that. The diff is completely unreadable.

I do like the template strings.
Some variable indentations using const and let are off. So we definitely will need a prettyprinter with the right settings.

@pmario
Copy link
Member

pmario commented Jul 9, 2025

The biggest problem I do have is the enormous amount of devdependencies that are included.
What would be the minimum we need?
Why do we need typescript related plugins?

@Arlen22
Copy link
Member Author

Arlen22 commented Jul 9, 2025

I'm not sure if the typescript related rules are required. I might be able to get away with removing that.

I hadn't noticed the sorting but that can be disabled.

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.

2 participants