Page MenuHomeWildfire Games

Linter: Fix ESLint semicolon-related warnings
ClosedPublic

Authored by Krinkle on Jun 20 2019, 1:45 AM.

Details

Reviewers
bb
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22419: Fix ESLint semicolon-related warnings
Trac Tickets
#5524
Summary

This uses eslint --fix to automatically repair coding style violations.

This commit is scoped to binaries/data/ only, and limited to these three rules:

  • "no-extra-semi"
  • "semi"
  • "semi-spacing"

No manual fixups seem to be needed. I did exclude the fixes it made to
binaries/data/mods/mod/globalscripts/sprintf.js, as that appears to be
upstream file and not something meant to follow our coding style.

In a follow-up I'll add an Coala exclude for that, so that it won't complain again.

Test Plan
  • Coala passing.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Krinkle created this revision.Jun 20 2019, 1:45 AM
Krinkle updated this revision to Diff 8571.Jun 21 2019, 9:47 PM

(Re-upload of same diff with more context lines to aid in review.)

bb accepted this revision.Jun 28 2019, 6:29 PM
bb added a subscriber: bb.

patch reads correct, and jshints complete

The trick will now be to keep the code like this, we obviously have vulcan complaining, but as that is too spammy sometimes (ofcourse fixing stuff helps...), any chance this rule can be added for all phab uploads (as is done for trailing spaces)

binaries/data/mods/public/simulation/components/tests/test_Math.js
129 โ†—(On Diff #8571)

missing space

This revision is now accepted and ready to land.Jun 28 2019, 6:29 PM
Krinkle added inline comments.Jun 29 2019, 1:23 AM
binaries/data/mods/public/simulation/components/tests/test_Math.js
129 โ†—(On Diff #8571)

Yes, but out of scope for this patch, which deals with small set of rules only (semi-colons rules in this case) all linted files in the repo.

I can also do the inverse: Fix all rules at once over a small set of files, which I did for petra at D1993. Would you prefer that?

That has the benefit of immediately making Vulcan 100% useful for those directories as we go forward, but is also more work to review...

This revision was automatically updated to reflect the committed changes.
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Jul 1 2019, 1:09 PM
Krinkle updated the Trac tickets for this revision.Jul 20 2019, 9:33 PM