Skip to content

Commit d10a8ce

Browse files
authored
use inclusive language (#71607) (#71627)
1 parent b52a4a2 commit d10a8ce

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

packages/kbn-config-schema/src/types/string_type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export type StringOptions = TypeOptions<string> & {
2929

3030
export class StringType extends Type<string> {
3131
constructor(options: StringOptions = {}) {
32-
// We want to allow empty strings, however calling `allow('')` casues
33-
// Joi to whitelist the value and skip any additional validation.
32+
// We want to allow empty strings, however calling `allow('')` causes
33+
// Joi to allow the value and skip any additional validation.
3434
// Instead, we reimplement the string validator manually except in the
3535
// hostname case where empty strings aren't allowed anyways.
3636
let schema =

src/core/MIGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ This table shows where these uiExports have moved to in the New Platform. In mos
13081308
| `hacks` | n/a | Just run the code in your plugin's `start` method. |
13091309
| `home` | [`plugins.home.featureCatalogue.register`](./src/plugins/home/public/feature_catalogue) | Must add `home` as a dependency in your kibana.json. |
13101310
| `indexManagement` | | Should be an API on the indexManagement plugin. |
1311-
| `injectDefaultVars` | n/a | Plugins will only be able to "whitelist" config values for the frontend. See [#41990](https://github.com/elastic/kibana/issues/41990) |
1311+
| `injectDefaultVars` | n/a | Plugins will only be able to allow config values for the frontend. See [#41990](https://github.com/elastic/kibana/issues/41990) |
13121312
| `inspectorViews` | | Should be an API on the data (?) plugin. |
13131313
| `interpreter` | | Should be an API on the interpreter plugin. |
13141314
| `links` | n/a | Not necessary, just register your app via `core.application.register` |
@@ -1387,7 +1387,7 @@ class MyPlugin {
13871387
}
13881388
```
13891389

1390-
If your plugin also have a client-side part, you can also expose configuration properties to it using a whitelisting mechanism with the configuration `exposeToBrowser` property.
1390+
If your plugin also have a client-side part, you can also expose configuration properties to it using the configuration `exposeToBrowser` allow-list property.
13911391

13921392
```typescript
13931393
// my_plugin/server/index.ts

src/core/server/elasticsearch/client/mocks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const createInternalClientMock = (): DeeplyMockedKeys<Client> => {
2828
node: 'http://localhost',
2929
}) as any;
3030

31-
const blackListedProps = [
31+
const omittedProps = [
3232
'_events',
3333
'_eventsCount',
3434
'_maxListeners',
@@ -39,9 +39,9 @@ const createInternalClientMock = (): DeeplyMockedKeys<Client> => {
3939
'helpers',
4040
];
4141

42-
const mockify = (obj: Record<string, any>, blacklist: string[] = []) => {
42+
const mockify = (obj: Record<string, any>, omitted: string[] = []) => {
4343
Object.keys(obj)
44-
.filter((key) => !blacklist.includes(key))
44+
.filter((key) => !omitted.includes(key))
4545
.forEach((key) => {
4646
const propType = typeof obj[key];
4747
if (propType === 'function') {
@@ -52,7 +52,7 @@ const createInternalClientMock = (): DeeplyMockedKeys<Client> => {
5252
});
5353
};
5454

55-
mockify(client, blackListedProps);
55+
mockify(client, omittedProps);
5656

5757
client.transport = {
5858
request: jest.fn(),

src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ import { getRootProperties } from './get_root_properties';
3939
* @return {EsPropertyMappings}
4040
*/
4141

42-
const blacklist = ['migrationVersion', 'references'];
42+
const omittedRootProps = ['migrationVersion', 'references'];
4343

4444
export function getRootPropertiesObjects(mappings: IndexMapping) {
4545
const rootProperties = getRootProperties(mappings);
4646
return Object.entries(rootProperties).reduce((acc, [key, value]) => {
4747
// we consider the existence of the properties or type of object to designate that this is an object datatype
4848
if (
49-
!blacklist.includes(key) &&
49+
!omittedRootProps.includes(key) &&
5050
((value as SavedObjectsComplexFieldMapping).properties || value.type === 'object')
5151
) {
5252
acc[key] = value;

0 commit comments

Comments
 (0)