Dennis Oelkers 90a797f8ff Bulk-fixing linter hints. (#25171)
* Fix no-restricted-imports: replace lodash with native alternatives and fix import paths

Replace lodash/get with optional chaining, lodash/defaultTo with nullish
coalescing (??), lodash/max with Math.max, and swap react-router-dom Link
imports to use the project's router wrapper. Add eslint-disable for files
that are the wrapper implementations themselves.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix jsx-a11y/control-has-associated-label: add aria-label to controls

Add descriptive aria-label attributes to buttons, table cells, and other
interactive controls that were missing accessible labels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix react/jsx-key: add missing key props to elements in iterators

Add stable key props to JSX elements inside .map() callbacks using
item IDs and unique property names as keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix no-param-reassign: avoid mutating function parameters

Replace reduce accumulator mutations with Object.fromEntries or spread
syntax. Use eslint-disable for browser API patterns (beforeunload).
Create new objects instead of mutating request/response parameters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix misc TypeScript/ESLint rules: require-imports, unsafe Function type, nested ternaries, triple-slash refs, unused props/vars

- Add eslint-disable for require() in .d.ts and jest.isolateModules
- Add eslint-disable for Function type in reflux .d.ts, remove redundant
  Function annotations in tests
- Refactor nested ternaries in SortUtils to if/else
- Convert triple-slash references to side-effect imports
- Fix unused prop type declarations in Timestamp and Section
- Rename catch variable e to _error in useIsLocalNode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix testing-library/no-node-access: replace DOM traversal with TL queries

Replace .querySelector(), .firstChild, and .getElementsByClassName() with
Testing Library queries (getByRole, getByText, findByTitle, within) in
test files. Add eslint-disable where DOM access is unavoidable (Leaflet
map containers, custom text matchers).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix no-restricted-properties and prefer-user-event in tests

Replace fireEvent.submit with userEvent.click on submit buttons and
fireEvent.change with userEvent.selectOptions in ContentPackEditParameter
tests. Add submit button to ContentPackEditParameter component to enable
the userEvent.click pattern. Use eslint-disable for fireEvent.change in
InputSetupWizard test where userEvent.type causes waitFor timeouts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix jest/expect-expect and jest/no-done-callback in tests

Add eslint-disable for it.each tests where assertions are in callback
functions that ESLint cannot statically detect. Add explicit assertion
to PivotHandler type-check test. Convert GlobalThroughputStore tests
from done-callback pattern to async/await with Promises.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Link import path after router.tsx was removed in d4b1262

Update Button.tsx and MenuItem.tsx to import Link from
components/common/Link (the new dedicated wrapper) instead of the
deleted components/common/router.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Type reflux StoreDefinition generically and remove eslint-disable for Function type

Make StoreDefinition<T> generic so init is typed as () => void and
getInitialState as () => T. Make fields optional in 4 store state types
(ContentPacksStore, IndicesConfigurationStore, InputTypesStore,
CollectorsStore) whose getInitialState returns a subset of the full state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert ContentPackEditParameter component changes and fix ESLint hints in test only

Replace fireEvent.change with userEvent.selectOptions and extract a
submitForm helper with a single eslint-disable to avoid duplicating
the disable comment across all fireEvent.submit call sites. The
component has no submit button and jsdom doesn't support implicit
form submission, so fireEvent.submit remains necessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use part string as React key instead of array index in RuleBlockDisplay

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Running `prettier`.

* Address PR #25171 review feedback

- Revert aria-label additions on td/th elements; increase
  jsx-a11y/control-has-associated-label depth to 3 instead
- Use screen.findByRole in Autocomplete test instead of waitFor+getByRole
- Add default value for optional field prop in Timestamp component
- Rename test helpers to expectIsDeepEqual/expectIsNumericString to
  satisfy jest/expect-expect without eslint-disable
- Replace require() with jest.isolateModulesAsync + dynamic import()
  in DocsHelper tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unused findValidationState from TabKeywordTimeRange test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix control-has-associated-label lint errors and SelectedGrantee test

Ignore td/th elements in control-has-associated-label rule (false
positives), add aria-label to backlog checkbox, and rename
checkCurrentState to expectCurrentState to remove eslint-disable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Replace type casts with proper types in UseCreateViewForEvent

Type function parameters for getSummaryAggregation and WidgetsGenerator
so reduce() accepts generic type parameters, removing all `as` casts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:25:11 +01:00
2025-06-18 16:05:39 +02:00
2015-02-03 11:54:05 +01:00
2022-12-28 10:08:36 +01:00
2016-03-07 15:56:59 -06:00
2020-11-16 18:41:59 +01:00
2024-12-05 11:04:28 +01:00

Graylog

License Maven Central

Welcome! Graylog is a free and open log management platform.

You can read more about the project on our website and check out the documentation on the documentation site.

Issue Tracking

Found a bug? Have an idea for an improvement? Feel free to add an issue.

Contributing

Help us build the future of log management and be part of a project that is used by thousands of people out there every day.

Follow the contributors guide and read the contributing instructions to get started.

Do you want to get paid for developing our free and open product? Apply for one of our jobs!

Staying in Touch

Come chat with us in the #graylog channel on freenode IRC, the #graylog channel on libera or create a topic in our community discussion forums.

License

Graylog is released under version 1 of the Server Side Public License (SSPL).

Languages
Java 69%
TypeScript 30.6%
JavaScript 0.2%