Skip to content

Commit 87d8edb

Browse files
author
Sharma
committed
Fixed trailingComma and other formatting issues
1 parent af4ed8e commit 87d8edb

File tree

12 files changed

+22
-21
lines changed

12 files changed

+22
-21
lines changed

.prettierrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Prettier config options: https://prettier.io/docs/en/options.html
22
// Shared front-end config: https://git.pega.io/projects/FE/repos/configs/browse/packages/prettier-config/index.json
33

4-
module.exports = import('@pega/prettier-config').then(pegaPrettierConfig => ({
4+
module.exports = import('@pega/prettier-config').then((pegaPrettierConfig) => ({
55
...pegaPrettierConfig.default,
6-
printWidth: 150
6+
printWidth: 150,
7+
trailingComma: 'none'
78
}));

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const config = {
2020
],
2121
framework: '@storybook/react-webpack5',
2222

23-
webpackFinal: async config => {
23+
webpackFinal: async (config) => {
2424
if (config.resolve?.alias) {
2525
config.resolve.alias['@pega/react-sdk-components/lib/bridge/react_pconnect'] = path.resolve(__dirname, '../__mocks__/react_pconnect.jsx');
2626
config.resolve.alias['@pega/react-sdk-components/lib/components/designSystemExtension/DetailsFields'] = path.resolve(

__mocks__/DetailsFields.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { format } from '@pega/react-sdk-components/lib/components/helpers/format
77

88
import createPConnectComponent from './react_pconnect';
99

10-
const useStyles = makeStyles(theme => ({
10+
const useStyles = makeStyles((theme) => ({
1111
root: {
1212
paddingRight: theme.spacing(1),
1313
paddingLeft: theme.spacing(1),

__mocks__/state-utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { connect, Provider, shallowEqual } from 'react-redux';
22

33
const connectToState = (mapStateToProps = () => {}) => {
4-
return Component => {
4+
return (Component) => {
55
const ConnectedComponent = connect(mapStateToProps, null, null, {
66
areStatePropsEqual: (next, prev: any) => {
77
// Compare visibility

scripts/copy-configs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ function gatherConfigFiles() {
5959
// Look for an process any Custom component configs
6060
const jsFilesCustom = fg.sync(`${COMPONENTS_ROOT_SOURCE}/${COMPONENTS_CUSTOM_DIR}/**/${CONFIG_NAME}`);
6161

62-
jsFilesCustom.forEach(file => {
62+
jsFilesCustom.forEach((file) => {
6363
// console.log(`${LOG_PRELUDE} found file: ${file}`);
6464
copyConfigRelatedFile(file);
6565
});
6666

6767
// Look for an process any override component configs
6868
const jsFilesOverride = fg.sync(`${COMPONENTS_ROOT_SOURCE}/${COMPONENTS_OVERRIDE_DIR}/**/${CONFIG_NAME}`);
6969

70-
jsFilesOverride.forEach(file => {
70+
jsFilesOverride.forEach((file) => {
7171
// console.log(`${LOG_PRELUDE} found file: ${file}`);
7272
copyConfigRelatedFile(file);
7373
});
@@ -76,7 +76,7 @@ function gatherConfigFiles() {
7676
function gatherConfigExtFiles() {
7777
const jsFiles = fg.sync(`${COMPONENTS_ROOT_SOURCE}/**/${CONFIG_EXT_NAME}`);
7878

79-
jsFiles.forEach(file => {
79+
jsFiles.forEach((file) => {
8080
// console.log(`${LOG_PRELUDE} found file: ${file}`);
8181
copyConfigRelatedFile(file);
8282
});

src/samples/Embedded/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Typography } from '@mui/material';
22
import { makeStyles } from '@mui/styles';
33

4-
const useStyles = makeStyles(theme => ({
4+
const useStyles = makeStyles((theme) => ({
55
embeddedHeader: {
66
display: 'flex',
77
alignItems: 'center',

src/samples/Embedded/ResolutionScreen/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import makeStyles from '@mui/styles/makeStyles';
22

3-
const useStyles = makeStyles(theme => ({
3+
const useStyles = makeStyles((theme) => ({
44
resolutionPart: {
55
display: 'flex',
66
flexDirection: 'row'

src/samples/Embedded/ShoppingOptionCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import makeStyles from '@mui/styles/makeStyles';
22

3-
const useStyles = makeStyles(theme => ({
3+
const useStyles = makeStyles((theme) => ({
44
swatchHeader: {
55
display: 'flex',
66
flexDirection: 'row',

src/samples/Embedded/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ export default function Embedded() {
3636
}
3737
};
3838

39-
const initializeRootContainerProps = renderObj => {
39+
const initializeRootContainerProps = (renderObj) => {
4040
const { props } = renderObj;
4141

4242
setRootProps(props);
4343
};
4444

4545
const startMashup = () => {
46-
PCore.onPCoreReady(async renderObj => {
46+
PCore.onPCoreReady(async (renderObj) => {
4747
// Check that we're seeing the PCore version we expect
4848
compareSdkPCoreVersions();
4949

src/samples/FullPortal/InvalidPortal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function InvalidPortal({ defaultPortal, portals, onSelect }) {
1616
Please select one of the portals available to the operator's access group:
1717
</div>
1818
<div className='portals-list'>
19-
{portals.map(portal => (
19+
{portals.map((portal) => (
2020
<div key={portal} className='portal-list-item' onClick={() => onSelect(portal)}>
2121
{portal}
2222
</div>

0 commit comments

Comments
 (0)