Skip to content

Commit b137d97

Browse files
author
Sharma
committed
Removed trailing comma at the end
1 parent 7622956 commit b137d97

File tree

146 files changed

+1105
-1104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1105
-1104
lines changed

.prettierrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
module.exports = import('@pega/prettier-config').then((pegaPrettierConfig) => ({
55
...pegaPrettierConfig.default,
66
printWidth: 150,
7+
trailingComma: 'none'
78
}));

eslint.config.mjs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default defineConfig([
4141
'**/paths.js',
4242
'dist/*',
4343
'lib/*',
44-
'packages/react-sdk-components/src/index.tsx',
44+
'packages/react-sdk-components/src/index.tsx'
4545
]),
4646
{
4747
languageOptions: {
@@ -50,7 +50,7 @@ export default defineConfig([
5050
window: true,
5151
console: true,
5252
document: true,
53-
fetch: true,
53+
fetch: true
5454
},
5555

5656
ecmaVersion: 13,
@@ -59,25 +59,25 @@ export default defineConfig([
5959
parserOptions: {
6060
project: 'tsconfig.json',
6161
ecmaFeatures: {
62-
jsx: true,
63-
},
64-
},
62+
jsx: true
63+
}
64+
}
6565
},
6666

6767
settings: {
6868
'import/resolver': {
6969
typescript: {},
7070
react: {
71-
version: 'detect',
71+
version: 'detect'
7272
},
7373
node: {
74-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
75-
},
74+
extensions: ['.js', '.jsx', '.ts', '.tsx']
75+
}
7676
},
7777

7878
react: {
79-
version: 'detect',
80-
},
79+
version: 'detect'
80+
}
8181
},
8282

8383
plugins: { sonarjs, import: importPlugin, react, 'react-hooks': reactHooks },
@@ -123,26 +123,26 @@ export default defineConfig([
123123
'@typescript-eslint/ban-ts-comment': 'off', // prefer warn but needs different parserOptions
124124
'@typescript-eslint/no-unsafe-function-type': 'off',
125125

126-
'import/no-relative-packages': 'off', // arnab
127-
},
126+
'import/no-relative-packages': 'off' // arnab
127+
}
128128
},
129129
{
130130
files: ['**/*.@(ts|tsx)'],
131131

132132
rules: {
133133
'@typescript-eslint/method-signature-style': ['error', 'property'],
134134
quotes: 'off',
135-
'@typescript-eslint/quotes': 'off',
136-
},
135+
'@typescript-eslint/quotes': 'off'
136+
}
137137
},
138138
{
139139
files: ['**/*.@(jsx|tsx|mdx)'],
140140

141141
rules: {
142142
'react/react-in-jsx-scope': 'off',
143143
'react-hooks/rules-of-hooks': 'off',
144-
'react-hooks/exhaustive-deps': 'off',
145-
},
144+
'react-hooks/exhaustive-deps': 'off'
145+
}
146146
},
147147
{
148148
files: ['**/*.@(ts|tsx)'],
@@ -153,19 +153,19 @@ export default defineConfig([
153153
'react/jsx-fragments': 'off',
154154
'react/react-in-jsx-scope': 'off',
155155
'react-hooks/exhaustive-deps': 'off',
156-
'sonarjs/cognitive-complexity': ['warn', 45],
157-
},
156+
'sonarjs/cognitive-complexity': ['warn', 45]
157+
}
158158
},
159159
{
160160
files: ['**/*.@(js|jsx|ts|tsx|mdx)'],
161-
rules: {},
161+
rules: {}
162162
},
163163

164164
{
165165
files: ['*/**/mocks/**.@(mocks|styles).@(tsx|ts)'],
166166

167167
rules: {
168-
'import/prefer-default-export': ['off'],
169-
},
170-
},
168+
'import/prefer-default-export': ['off']
169+
}
170+
}
171171
]);

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module.exports = {
44
roots: ['<rootDir>/packages/react-sdk-components/tests/unit/'],
55
preset: 'ts-jest',
66
transform: {
7-
'^.+\\.(t|j)sx?$': 'ts-jest',
7+
'^.+\\.(t|j)sx?$': 'ts-jest'
88
},
99
setupFilesAfterEnv: ['<rootDir>/packages/react-sdk-components/tests/setupTests.js'],
10-
coverageDirectory: 'tests/coverage',
10+
coverageDirectory: 'tests/coverage'
1111
};

packages/react-sdk-components/src/bridge/helpers/sdk_component_map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ComponentMap {
2525
// sdkComponentMap is top-level object
2626
this.sdkComponentMap = {
2727
localComponentMap: {},
28-
pegaProvidedComponentMap: {},
28+
pegaProvidedComponentMap: {}
2929
};
3030

3131
// isCoComponentMapLoaded will be updated to true after the async load is complete

packages/react-sdk-components/src/bridge/react_pconnect.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const connectRedux = (component, c11nEnv) => {
7575

7676
return {
7777
...obj,
78-
...addProps,
78+
...addProps
7979
};
8080
},
8181
null,
@@ -109,8 +109,8 @@ const connectRedux = (component, c11nEnv) => {
109109
}
110110
/* TODO For some rawConfig we are not getting routingInfo under allStateProps */
111111
return !routingInfoCompare(next, prev);
112-
},
113-
},
112+
}
113+
}
114114
)(component);
115115
};
116116

@@ -176,7 +176,7 @@ class PConnect extends Component {
176176
super(props);
177177
const { getPConnect } = this.props;
178178
this.state = {
179-
hasError: false,
179+
hasError: false
180180
};
181181

182182
this.eventHandler = this.eventHandler.bind(this);
@@ -194,7 +194,7 @@ class PConnect extends Component {
194194
// Update state so the next render will show the fallback UI.
195195
return {
196196
hasError: true,
197-
error,
197+
error
198198
};
199199
}
200200

@@ -277,7 +277,7 @@ class PConnect extends Component {
277277
getPConnect,
278278
...actions,
279279
additionalProps,
280-
...otherProps,
280+
...otherProps
281281
};
282282

283283
// If the new component is a reference node then mark with a unique key
@@ -302,14 +302,14 @@ PConnect.propTypes = {
302302
getPConnect: PropTypes.func.isRequired,
303303
additionalProps: PropTypes.shape({
304304
noLabel: PropTypes.bool,
305-
readOnly: PropTypes.bool,
305+
readOnly: PropTypes.bool
306306
}),
307-
validatemessage: PropTypes.string,
307+
validatemessage: PropTypes.string
308308
};
309309

310310
PConnect.defaultProps = {
311311
additionalProps: {},
312-
validatemessage: '',
312+
validatemessage: ''
313313
};
314314

315315
// Move these into SdkConstellationReady so PCore is available
@@ -319,7 +319,7 @@ document.addEventListener('SdkConstellationReady', () => {
319319
...c11nEnv,
320320
...c11nEnv.getPConnect().getConfigProps(),
321321
...c11nEnv.getPConnect().getActions(),
322-
...{ additionalProps },
322+
...{ additionalProps }
323323
});
324324
});
325325

packages/react-sdk-components/src/components/designSystemExtension/AlertBanner/AlertBanner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SEVERITY_MAP = {
1414
urgent: 'error',
1515
warning: 'warning',
1616
success: 'success',
17-
info: 'info',
17+
info: 'info'
1818
};
1919

2020
export default function AlertBanner(props: AlertBannerProps) {
@@ -23,7 +23,7 @@ export default function AlertBanner(props: AlertBannerProps) {
2323

2424
if (onDismiss) {
2525
additionalProps = {
26-
onClose: onDismiss,
26+
onClose: onDismiss
2727
};
2828
}
2929

packages/react-sdk-components/src/components/designSystemExtension/Banner/Banner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function Banner(props: BannerProps) {
2525
const variantMap = {
2626
'two-column': [6, 6],
2727
'narrow-wide': [4, 8],
28-
'wide-narrow': [8, 4],
28+
'wide-narrow': [8, 4]
2929
};
3030
return (
3131
<div style={{ marginBottom: '2rem' }}>

packages/react-sdk-components/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
4949
slotProps={{
5050
input: {
5151
readOnly: true,
52-
disableUnderline: true,
53-
},
52+
disableUnderline: true
53+
}
5454
}}
5555
/>
5656
);
@@ -70,8 +70,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
7070
slotProps={{
7171
input: {
7272
readOnly: true,
73-
disableUnderline: true,
74-
},
73+
disableUnderline: true
74+
}
7575
}}
7676
/>
7777
);
@@ -89,8 +89,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
8989
slotProps={{
9090
input: {
9191
readOnly: true,
92-
disableUnderline: true,
93-
},
92+
disableUnderline: true
93+
}
9494
}}
9595
/>
9696
);
@@ -106,8 +106,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
106106
slotProps={{
107107
input: {
108108
readOnly: true,
109-
disableUnderline: true,
110-
},
109+
disableUnderline: true
110+
}
111111
}}
112112
/>
113113
);
@@ -124,8 +124,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
124124
input: {
125125
readOnly: true,
126126
disableUnderline: true,
127-
inputProps: { style: { cursor: 'pointer' } },
128-
},
127+
inputProps: { style: { cursor: 'pointer' } }
128+
}
129129
}}
130130
/>
131131
</a>
@@ -144,8 +144,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
144144
input: {
145145
readOnly: true,
146146
disableUnderline: true,
147-
inputProps: { style: { cursor: 'pointer' } },
148-
},
147+
inputProps: { style: { cursor: 'pointer' } }
148+
}
149149
}}
150150
/>
151151
</a>
@@ -163,14 +163,14 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
163163
<TextField
164164
variant='standard'
165165
value={format(field.config.value, field.type, {
166-
format: theFormat,
166+
format: theFormat
167167
})}
168168
label={field.config.label}
169169
slotProps={{
170170
input: {
171171
readOnly: true,
172-
disableUnderline: true,
173-
},
172+
disableUnderline: true
173+
}
174174
}}
175175
/>
176176
);
@@ -186,8 +186,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
186186
slotProps={{
187187
input: {
188188
readOnly: true,
189-
disableUnderline: true,
190-
},
189+
disableUnderline: true
190+
}
191191
}}
192192
/>
193193
);
@@ -203,8 +203,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
203203
slotProps={{
204204
input: {
205205
readOnly: true,
206-
disableUnderline: true,
207-
},
206+
disableUnderline: true
207+
}
208208
}}
209209
/>
210210
);
@@ -245,7 +245,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
245245
if (showStatus && theFields?.[1].type !== 'status') {
246246
const oStatus = {
247247
type: 'status',
248-
config: { value: status, label: 'Status' },
248+
config: { value: status, label: 'Status' }
249249
};
250250

251251
const count = theFieldsModifiable.length;

packages/react-sdk-components/src/components/designSystemExtension/DetailsFields/DetailsFields.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ const useStyles = makeStyles((theme) => ({
2222
marginRight: theme.spacing(1),
2323
marginLeft: theme.spacing(1),
2424
marginTop: theme.spacing(1),
25-
marginBottom: theme.spacing(1),
25+
marginBottom: theme.spacing(1)
2626
},
2727
fieldLabel: {
2828
display: 'block',
2929
fontWeight: 400,
30-
color: theme.palette.text.secondary,
30+
color: theme.palette.text.secondary
3131
},
3232
fieldValue: {
3333
fontWeight: 400,
34-
color: theme.palette.text.primary,
35-
},
34+
color: theme.palette.text.primary
35+
}
3636
}));
3737

3838
export default function DetailsFields(props: DetailsFieldsProps) {
@@ -53,7 +53,7 @@ export default function DetailsFields(props: DetailsFieldsProps) {
5353
fieldComponents.push({
5454
type: theCompType,
5555
label,
56-
value: <React.Fragment key={index}>{createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect())}</React.Fragment>,
56+
value: <React.Fragment key={index}>{createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect())}</React.Fragment>
5757
});
5858
});
5959

0 commit comments

Comments
 (0)