diff --git a/packages/core/admin/admin/src/core/apis/CustomFields.js b/packages/core/admin/admin/src/core/apis/CustomFields.js index 35276ffa22..3b6534b59a 100644 --- a/packages/core/admin/admin/src/core/apis/CustomFields.js +++ b/packages/core/admin/admin/src/core/apis/CustomFields.js @@ -28,7 +28,7 @@ class CustomFields { register(customFields) { if (Array.isArray(customFields)) { // If several custom fields are passed, register them one by one - customFields.forEach(customField => { + customFields.forEach((customField) => { this.register(customField); }); } else { diff --git a/packages/core/content-type-builder/admin/src/components/AttributeOptions/utils/getPadding.js b/packages/core/content-type-builder/admin/src/components/AttributeOptions/utils/getPadding.js index ff0c16f884..0edc122e91 100644 --- a/packages/core/content-type-builder/admin/src/components/AttributeOptions/utils/getPadding.js +++ b/packages/core/content-type-builder/admin/src/components/AttributeOptions/utils/getPadding.js @@ -1,4 +1,4 @@ -const getPadding = index => { +const getPadding = (index) => { const isOdd = index % 2 === 1; const paddingLeft = isOdd ? 2 : 0; const paddingRight = isOdd ? 0 : 2; diff --git a/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js b/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js index 7b0a66b684..d0d0b12877 100644 --- a/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js +++ b/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js @@ -6,7 +6,7 @@ import has from 'lodash/has'; * @param {array} sections The sections to mutate */ const addItemsToFormSection = (formTypeOptions, sections) => { - formTypeOptions.forEach(item => { + formTypeOptions.forEach((item) => { if (!has(item, 'sectionTitle')) { // When there is no sectionTitle key, // add the item to the default section diff --git a/packages/core/strapi/lib/core/registries/__tests__/custom-fields.test.js b/packages/core/strapi/lib/core/registries/__tests__/custom-fields.test.js index 60cab67922..fd45f4346d 100644 --- a/packages/core/strapi/lib/core/registries/__tests__/custom-fields.test.js +++ b/packages/core/strapi/lib/core/registries/__tests__/custom-fields.test.js @@ -4,7 +4,7 @@ const customFieldsRegistry = require('../custom-fields'); const strapi = { plugins: { plugintest: 'foo' }, - plugin: jest.fn(plugin => strapi.plugins[plugin]), + plugin: jest.fn((plugin) => strapi.plugins[plugin]), }; describe('Custom fields registry', () => { diff --git a/packages/core/strapi/lib/core/registries/custom-fields.js b/packages/core/strapi/lib/core/registries/custom-fields.js index ed7e796f83..80fe2d921a 100644 --- a/packages/core/strapi/lib/core/registries/custom-fields.js +++ b/packages/core/strapi/lib/core/registries/custom-fields.js @@ -3,7 +3,7 @@ const { has } = require('lodash/fp'); const validators = require('../../services/entity-validator/validators'); -const customFieldsRegistry = strapi => { +const customFieldsRegistry = (strapi) => { const customFields = {}; return { diff --git a/packages/core/strapi/lib/services/custom-fields.js b/packages/core/strapi/lib/services/custom-fields.js index f0cbca182f..8f69db4e5f 100644 --- a/packages/core/strapi/lib/services/custom-fields.js +++ b/packages/core/strapi/lib/services/custom-fields.js @@ -1,6 +1,6 @@ 'use strict'; -const createCustomFields = strapi => { +const createCustomFields = (strapi) => { return { register(customField) { strapi.container.get('custom-fields').add(customField); diff --git a/packages/core/strapi/lib/utils/convert-custom-field-type.js b/packages/core/strapi/lib/utils/convert-custom-field-type.js index ecfbfdb685..7ae1eeef83 100644 --- a/packages/core/strapi/lib/utils/convert-custom-field-type.js +++ b/packages/core/strapi/lib/utils/convert-custom-field-type.js @@ -1,11 +1,11 @@ 'use strict'; -const convertCustomFieldType = strapi => { +const convertCustomFieldType = (strapi) => { const allContentTypeSchemaAttributes = Object.values(strapi.contentTypes).map( - schema => schema.attributes + (schema) => schema.attributes ); const allComponentSchemaAttributes = Object.values(strapi.components).map( - schema => schema.attributes + (schema) => schema.attributes ); const allSchemasAttributes = [...allContentTypeSchemaAttributes, ...allComponentSchemaAttributes]; diff --git a/packages/plugins/custom-fields/admin/src/utils/getTrad.js b/packages/plugins/custom-fields/admin/src/utils/getTrad.js index a2b8632a8d..d0a071b26a 100644 --- a/packages/plugins/custom-fields/admin/src/utils/getTrad.js +++ b/packages/plugins/custom-fields/admin/src/utils/getTrad.js @@ -1,5 +1,5 @@ import pluginId from '../pluginId'; -const getTrad = id => `${pluginId}.${id}`; +const getTrad = (id) => `${pluginId}.${id}`; export default getTrad;