0ad/binaries/data/mods/public/globalscripts
Dunedan 93ce94655d
Use @stylistic/brace-style for eslint
Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.

To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.

While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.

[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
2026-01-12 21:33:52 +01:00
..
tests Gendered Civilians 2025-09-02 10:23:44 +02:00
AttackEffects.js Fix eslint rule 'prefer-const' in globalscripts 2025-05-06 14:16:42 +02:00
DamageTypes.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Formation.js Allow picking a default formation for walk (and walk-like) orders. 2020-12-31 10:04:58 +00:00
FSM.js Enable eslint rule 'no-redeclare' 2025-06-14 14:53:10 +02:00
interpolation.js Fix eslint rule 'space-before-function-paren' 2025-05-13 15:21:57 +02:00
Math.js Enable eslint rule 'no-useless-assignment' 2025-08-01 11:26:40 +02:00
ModificationTemplates.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
MultiKeyMap.js Fix eslint rule 'prefer-const' in globalscripts 2025-05-06 14:16:42 +02:00
random.js Add randomAngle helper function to abbreviate calls. 2018-01-15 14:20:57 +00:00
Resources.js Fix eslint rule 'prefer-const' in globalscripts 2025-05-06 14:16:42 +02:00
StatusEffects.js Fix eslint rule 'prefer-const' in globalscripts 2025-05-06 14:16:42 +02:00
Technologies.js Fix eslint rule 'default-case' 2025-05-28 19:24:50 +02:00
Templates.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Trade.js Adapt trade gain normalization to map size (increased on small maps and decreased on large maps), and slow down the increase of the gain at very large distances. 2017-10-31 17:52:08 +00:00
utility.js Fix autofixable eslint warnings for eqeqeq 2025-06-26 11:03:19 +02:00
vector.js Fix eslint rule 'spaced-comment' 2025-05-17 12:08:47 +02:00
WeightedList.js Fix eslint rule 'prefer-const' in globalscripts 2025-05-06 14:16:42 +02:00