Commit graph

13 commits

Author SHA1 Message Date
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
Ralph Sennhauser
25c53cb0ac
Enable eslint style rule 'keyword-spacing'
After Stan suggesting change in a review comment just enable the rule
'keyword-spacing' [1] and fix violations so this is no longer a topic in
spirit of #7812.

[1] https://eslint.style/rules/keyword-spacing

Ref: #7245
Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-25 14:34:12 +02:00
Ralph Sennhauser
97a82cbc4a
Enable eslint rule 'no-redeclare'
Enable recommended rule 'no-redeclare' [1] and manually fix violations.

[1] https://eslint.org/docs/latest/rules/no-redeclare

Ref: #8068
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-14 14:53:10 +02:00
Ralph Sennhauser
8b1c6c76b6
Make Profiler2Report a class and make eslint happy
This removes all global code and fixes eslint warnings 'no-shadow' and
'no-undef-init'. Leave other possible improvement style wise for an
other time.

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-29 11:03:13 +02:00
Ralph Sennhauser
9038b555fe
Eslint auto-fix JS in profiler2 webui
This fixes all issues eslint can safely do automatically. Drastically
reducing the number of open style issues reported.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-02 13:25:23 +02:00
Lancelot de Ferrière
874c4d1c59 Use __framestart only as frame references
Profiler2 currently explicitly considers 'frame' for frames, which is a bit annoying in replays as state hashes are computed outside of these. It's better to just rely on RecordFrameStart() calls.
2025-04-06 11:14:31 +02:00
Stan
421fbfd278 Make Profiler2 configurable in visual mode. Non visual doesn't load the config so it's not possible. Also update the profiler2 page to be able to change the port
Differential Revision: https://code.wildfiregames.com/D2444
This was SVN commit r24340.
2020-12-07 08:11:23 +00:00
elexis
43137fef3f Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c).
Differential Revision: https://code.wildfiregames.com/D716
Refs 09e974e1cb
Reviewed By: bb
Change in agreement with leper.

This was SVN commit r19899.
2017-07-10 14:26:24 +00:00
elexis
6149dd3841 Actually remove trailing whitespace for non-header files as well.
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
elexis
bcbf25bfbd Fix line endings of all files in source/ except source/third_party/.
This was SVN commit r18558.
2016-07-25 09:07:45 +00:00
wraitii
be1b5a9fa7 Improve Profiler2 JS interface with multiple threads and frameless threads. Add a setting to the analysis graphs. Refs #4056
This was SVN commit r18436.
2016-06-25 10:12:04 +00:00
wraitii
490ee7387f Fix a double to float coercion and JS errors with empty threads in Profiler2 . Refs #4056
This was SVN commit r18424.
2016-06-22 16:46:49 +00:00
wraitii
3cbe96d24c Revamp Profiler2 to make it more usable.
Features include new graphs to compare runtime of functions and runtimes
across reports, as well as new profiling functions that only profile
spikes.

This was SVN commit r18423.
2016-06-22 13:38:05 +00:00