HomeWildfire Games

Define variables before mentioning them in scripted component tests, and add a…
AuditedrP22380

Description

Define variables before mentioning them in scripted component tests, and add a linter rule for this.

Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D1986

Event Timeline

elexis accepted this commit.Tue, Jun 25, 11:35 PM
elexis added a subscriber: elexis.
elexis added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Foundation.js
47

(only pos variable was necessary, but keeping them grouped is okay)

/ps/trunk/build/jenkins/lint-config/eslintrc.json
22

Agree that it is a benefitial pattern to define variables before referencing to them, that's one of the major purposes of the let keyword over var. refs https://eslint.org/docs/rules/no-use-before-define

All concerns with this commit have now been addressed.Tue, Jun 25, 11:35 PM