Skip to content

Commit da6bb7e

Browse files
committed
Updated to SPFx 1.20.0 in react-star-ratings
1 parent 4be6912 commit da6bb7e

19 files changed

+17049
-39539
lines changed

samples/react-star-ratings/.eslintrc.js

+2-40
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,6 @@ module.exports = {
2020
'@rushstack/security/no-unsafe-regexp': 1,
2121
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
2222
'@typescript-eslint/adjacent-overload-signatures': 1,
23-
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
24-
//
25-
// CONFIGURATION: By default, these are banned: String, Boolean, Number, Object, Symbol
26-
'@typescript-eslint/ban-types': [
27-
1,
28-
{
29-
'extendDefaults': false,
30-
'types': {
31-
'String': {
32-
'message': 'Use \'string\' instead',
33-
'fixWith': 'string'
34-
},
35-
'Boolean': {
36-
'message': 'Use \'boolean\' instead',
37-
'fixWith': 'boolean'
38-
},
39-
'Number': {
40-
'message': 'Use \'number\' instead',
41-
'fixWith': 'number'
42-
},
43-
'Object': {
44-
'message': 'Use \'object\' instead, or else define a proper TypeScript type:'
45-
},
46-
'Symbol': {
47-
'message': 'Use \'symbol\' instead',
48-
'fixWith': 'symbol'
49-
},
50-
'Function': {
51-
'message': 'The \'Function\' type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with \'new\'.\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.'
52-
}
53-
}
54-
}
55-
],
5623
// RATIONALE: Code is more readable when the type of every variable is immediately obvious.
5724
// Even if the compiler may be able to infer a type, this inference will be unavailable
5825
// to a person who is reviewing a GitHub diff. This rule makes writing code harder,
@@ -85,12 +52,7 @@ module.exports = {
8552
// or else return the object to a caller (who assumes this responsibility). Unterminated
8653
// promise chains are a serious issue. Besides causing errors to be silently ignored,
8754
// they can also cause a NodeJS process to terminate unexpectedly.
88-
'@typescript-eslint/no-floating-promises': [
89-
2,
90-
{
91-
"ignoreIIFE": true
92-
}
93-
],
55+
'@typescript-eslint/no-floating-promises': 2,
9456
// RATIONALE: Catches a common coding mistake.
9557
'@typescript-eslint/no-for-in-array': 2,
9658
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
@@ -354,4 +316,4 @@ module.exports = {
354316
rules: {}
355317
}
356318
]
357-
};
319+
};

samples/react-star-ratings/.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.18.0
1+
v18.20.6

samples/react-star-ratings/.yo-rc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"@microsoft/generator-sharepoint": {
33
"plusBeta": false,
44
"isCreatingSolution": true,
5-
"nodeVersion": "16.20.2",
5+
"nodeVersion": "18.20.5",
66
"sdksVersions": {
77
"@microsoft/microsoft-graph-client": "3.0.2",
8-
"@microsoft/teams-js": "2.12.0"
8+
"@microsoft/teams-js": "2.24.0"
99
},
10-
"version": "1.18.0",
10+
"version": "1.20.0",
1111
"libraryName": "ratings",
1212
"libraryId": "1fac5bb8-6a05-4c52-aee3-496f6921ac1a",
1313
"environment": "spo",

samples/react-star-ratings/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ This web part demonstrates *Star Ratings* capabilities to SharePoint News. The "
1313
| Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
1414
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
1515

16-
![SPFx 1.18.0](https://img.shields.io/badge/SPFx-1.18.0-green.svg)
17-
![Node.js v18 | v16](https://img.shields.io/badge/Node.js-v18%20%7C%20v16-green.svg)
16+
![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
17+
![Node.js v19 | v18](https://img.shields.io/badge/Node.js-v19%20%7C%20v18-green.svg)
1818
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
1919
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
2020
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
@@ -57,7 +57,8 @@ This web part demonstrates *Star Ratings* capabilities to SharePoint News. The "
5757

5858
Version|Date|Comments
5959
-------|----|--------
60-
1.4|November 9, 2023|Upgraded* to SPFx v1.18
60+
1.5|January 23, 2025|Upgraded to SPFx v1.20 and changed to React Fluent UI v9.
61+
1.4|November 9, 2023|Upgraded to SPFx v1.18
6162
1.3|April 27, 2022|Changed to show averages with stars instead of user ratings.
6263
1.2|March 28, 2022|Upgraded to SPFx v1.14
6364
1.1|January 12, 2022|Updated to retrieve values from API
Loading

samples/react-star-ratings/config/config.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
},
1414
"externals": {},
1515
"localizedResources": {
16-
"RatingsWebPartStrings": "lib/webparts/ratings/loc/{locale}.js"
16+
"RatingsWebPartStrings": "lib/webparts/ratings/loc/{locale}.js",
17+
"ControlStrings": "node_modules/@pnp/spfx-controls-react/lib/loc/{locale}.js"
1718
}
1819
}

samples/react-star-ratings/config/package-solution.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"solution": {
44
"name": "ratings",
55
"id": "1fac5bb8-6a05-4c52-aee3-496f6921ac1a",
6-
"version": "1.4.0.0",
6+
"version": "1.5.0.0",
77
"includeClientSideAssets": true,
88
"skipFeatureDeployment": true,
99
"isDomainIsolated": false,
@@ -30,7 +30,7 @@
3030
"title": "Ratings",
3131
"description": "The feature that activates elements of the ratings solution.",
3232
"id": "6f19fff7-a71c-47bd-a5d0-c1d6c147acae",
33-
"version": "1.4.0.0"
33+
"version": "1.5.0.0"
3434
}
3535
]
3636
},

0 commit comments

Comments
 (0)