Skip to content

Commit ea4c4b1

Browse files
committed
in the process of updating to 1.15.2
1 parent efaf9b0 commit ea4c4b1

File tree

58 files changed

+6914
-11936
lines changed

Some content is hidden

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

58 files changed

+6914
-11936
lines changed

.eslintrc.js

Lines changed: 358 additions & 19 deletions
Large diffs are not rendered by default.

gulpfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const fs = require('fs');
66
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
77

88
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
9-
build.addSuppression(/Warning/gi);
109

1110
// Update the version number in the version.ts file
1211
gulp.task('versionUpdater', (done) => {

package-lock.json

Lines changed: 6080 additions & 11272 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"@microsoft/eslint-config-spfx": "1.15.2",
6767
"@microsoft/eslint-plugin-spfx": "1.15.2",
6868
"@microsoft/microsoft-graph-types": "^2.1.0",
69-
"@microsoft/rush-stack-compiler-3.9": "0.4.47",
7069
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
7170
"@microsoft/sp-build-web": "1.15.2",
7271
"@microsoft/sp-module-interfaces": "1.15.2",
@@ -91,7 +90,6 @@
9190
"codecov": "3.8.3",
9291
"enzyme": "^3.11.0",
9392
"enzyme-adapter-react-16": "^1.15.6",
94-
"eslint": "8.7.0",
9593
"eslint-plugin-react-hooks": "4.3.0",
9694
"gulp": "4.0.2",
9795
"husky": "^6.0.0",

src/common/mocks/RequestClientMock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export class RequestClientMock extends SPHttpClient {
44
public Requests: { url: string, method: string, options?: ISPHttpClientOptions, resultString: string }[] = [];
55
public OnRequest: (url: string, method: string, options?: ISPHttpClientOptions) => void;
66
public fetch(url: string, configuration: SPHttpClientConfiguration, options: ISPHttpClientOptions): Promise<SPHttpClientResponse> {
7-
let mockedResponse = this.Requests.filter(req => req.method === options.method && req.url == url)[0];
7+
let mockedResponse = this.Requests.filter(req => req.method === options.method && req.url === url)[0];
88
let response: Response;
99
if (mockedResponse) {
1010
response = new Response(mockedResponse.resultString, {

src/common/utilities/GeneralHelper.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class GeneralHelper {
3939
let result: string = null;
4040
let placeholdersString: string = null;
4141

42-
if (formatParts[0] == '0')
42+
if (formatParts[0] === '0')
4343
return format.substring(2);
4444
const isFuture: boolean = formatParts[1] === '1';
4545
const formatType: string = formatParts[2];
@@ -60,7 +60,7 @@ export class GeneralHelper {
6060
result = isFuture ? strings.DateTime['L_RelativeDateTime_AboutAnHourFuture'] : strings.DateTime['L_RelativeDateTime_AboutAnHour'];
6161
break;
6262
case '5':
63-
if (timeString == null) {
63+
if (timeString === null) {
6464
result = isFuture ? strings.DateTime['L_RelativeDateTime_Tomorrow'] : strings.DateTime['L_RelativeDateTime_Yesterday'];
6565
}
6666
else {
@@ -74,7 +74,7 @@ export class GeneralHelper {
7474
Number(timeString));
7575
break;
7676
case '7':
77-
if (dayString == null) {
77+
if (dayString === null) {
7878
result = timeString;
7979
}
8080
else {
@@ -90,9 +90,9 @@ export class GeneralHelper {
9090
case '9':
9191
result = strings.DateTime['L_RelativeDateTime_Today'];
9292
}
93-
if (placeholdersString != null) {
93+
if (placeholdersString !== null) {
9494
result = placeholdersString.replace("{0}", timeString);
95-
if (dayString != null) {
95+
if (dayString !== null) {
9696
result = result.replace("{1}", dayString);
9797
}
9898
}
@@ -104,7 +104,7 @@ export class GeneralHelper {
104104
* I've tried to rename all the vars to have meaningful names... but some were too unclear
105105
*/
106106
public static getLocalizedCountValue(format: string, first: string, second: number): string {
107-
if (format == undefined || first == undefined || second == undefined)
107+
if (format === undefined || first === undefined || second === undefined)
108108
return null;
109109
let result: string = '';
110110
let a = -1;
@@ -113,19 +113,19 @@ export class GeneralHelper {
113113
for (let firstOperandOptionsIdx = 0, firstOperandOptionsLen = firstOperandOptions.length; firstOperandOptionsIdx < firstOperandOptionsLen; firstOperandOptionsIdx++) {
114114
const firstOperandOption: string = firstOperandOptions[firstOperandOptionsIdx];
115115

116-
if (firstOperandOption == null || firstOperandOption === '')
116+
if (firstOperandOption === null || firstOperandOption === '')
117117
continue;
118118
let optionParts: string[] = firstOperandOption.split(',');
119119

120120
for (var optionPartsIdx = 0, optionPartsLen = optionParts.length; optionPartsIdx < optionPartsLen; optionPartsIdx++) {
121121
const optionPart: string = optionParts[optionPartsIdx];
122122

123-
if (optionPart == null || optionPart === '')
123+
if (optionPart === null || optionPart === '')
124124
continue;
125125
if (isNaN(optionPart.parseNumberInvariant())) {
126126
const dashParts: string[] = optionPart.split('-');
127127

128-
if (dashParts == null || dashParts.length !== 2)
128+
if (dashParts === null || dashParts.length !== 2)
129129
continue;
130130
var j, n;
131131

@@ -165,7 +165,7 @@ export class GeneralHelper {
165165
if (a !== -1) {
166166
var e = format.split('||');
167167

168-
if (e != null && e[a] != null && e[a] != '')
168+
if (e !== null && e[a] !== null && e[a] !== '')
169169
result = e[a];
170170
}
171171
return result;
@@ -206,7 +206,7 @@ export class GeneralHelper {
206206
* @param value value
207207
*/
208208
public static isDefined(value): boolean {
209-
return value != null;
209+
return value !== null;
210210
}
211211

212212
/**
@@ -263,7 +263,7 @@ export class GeneralHelper {
263263
}
264264

265265
public static formatBytes(bytes, decimals) {
266-
if (bytes == 0) {
266+
if (bytes === 0) {
267267
return strings.EmptyFileSize;
268268
}
269269

src/controls/adaptiveCardDesignerHost/AdaptiveCardDesigner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const AdaptiveCardDesigner = (props: IAdaptiveCardDesignerHostProps) => {
111111
CardDesigner.ToolbarCommands.NewCard,
112112
(sender) => {
113113
let text = 'Do you want to create a new Card?';
114-
if (confirm(text) == true) {
114+
if (confirm(text) === true) {
115115
cardDesigner.setCard((props.newCardPayload) ? props.newCardPayload : EmptyCard);
116116
cardDesigner.clearUndoStack();
117117
cardDesigner.designerSurface.updateLayout(true);

src/controls/adaptiveCardDesignerHost/fluentUI/peers/Shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class NameValuePairPropertyEditor extends PropertySheetEntry {
4747
);
4848
}
4949

50-
if (nameValuePairs.length == 0) {
50+
if (nameValuePairs.length === 0) {
5151
let messageTextBlock = new Adaptive.TextBlock();
5252
messageTextBlock.spacing = Adaptive.Spacing.Small;
5353
messageTextBlock.text = this.messageIfEmpty;
@@ -136,4 +136,4 @@ export class NameValuePairPropertyEditor extends PropertySheetEntry {
136136
readonly messageIfEmpty: string = "This collection is empty") {
137137
super(targetVersion);
138138
}
139-
}
139+
}

src/controls/adaptiveCardHost/fluentUI/Actions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ const ActionButton = (props: IActionButtonProps) => {
247247
</div>
248248
</CompoundButton>;
249249
} else {
250-
if (props.style.toLocaleLowerCase().trim() == 'positive') {
250+
if (props.style.toLocaleLowerCase().trim() === 'positive') {
251251
control = <PrimaryButton
252252
className={props.className}
253253
text={props.text}
254254
theme={theme}
255255
onClick={props.actionClickHandler} />;
256-
} else if (props.style.toLocaleLowerCase().trim() == 'destructive') {
256+
} else if (props.style.toLocaleLowerCase().trim() === 'destructive') {
257257
const dangerButtonTheme: ITheme = createTheme({ palette: redPalette });
258258
control = <PrimaryButton
259259
className={props.className}

src/controls/adaptiveCardHost/fluentUI/Elements.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class FluentUIChoiceSetInput extends Input {
122122

123123
let control = () =>
124124
<>
125-
{this.isMultiSelect == false && this.style === "expanded" &&
125+
{this.isMultiSelect === false && this.style === "expanded" &&
126126
<ThemeProvider theme={theme} style={{ backgroundColor: "transparent" }}>
127127
<ChoiceGroup
128128
defaultSelectedKey={this.defaultValue}
@@ -136,7 +136,7 @@ export class FluentUIChoiceSetInput extends Input {
136136
</ThemeProvider>
137137
}
138138

139-
{this.isMultiSelect == true && this.style === "expanded" &&
139+
{this.isMultiSelect === true && this.style === "expanded" &&
140140
<Stack tokens={{ childrenGap: this.hostConfig.spacing.default }}>
141141
{this.choices.map((x, index) => {
142142
let defaultChecked = this.defaultSelectedValues.indexOf(x.value) > -1;
@@ -150,7 +150,7 @@ export class FluentUIChoiceSetInput extends Input {
150150
this.valueChanged();
151151
}}
152152
componentRef={(input) => {
153-
if (index == 0)
153+
if (index === 0)
154154
this.refControl = input;
155155
}}
156156
/>
@@ -849,7 +849,7 @@ export class FluentUIToggleInput extends Input {
849849
}
850850

851851
public get value(): string | undefined {
852-
if (this._value != null && this._value != undefined) {
852+
if (this._value !== null && this._value !== undefined) {
853853
return this._value ? this.valueOn : this.valueOff;
854854
} else {
855855
if (this.isRequired) {

0 commit comments

Comments
 (0)