Skip to content

Commit

Permalink
Updated to SPFx 1.20.0 in react-star-ratings
Browse files Browse the repository at this point in the history
  • Loading branch information
karamem0 committed Jan 23, 2025
1 parent 4be6912 commit da6bb7e
Show file tree
Hide file tree
Showing 19 changed files with 17,049 additions and 39,539 deletions.
42 changes: 2 additions & 40 deletions samples/react-star-ratings/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,6 @@ module.exports = {
'@rushstack/security/no-unsafe-regexp': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/adjacent-overload-signatures': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
//
// CONFIGURATION: By default, these are banned: String, Boolean, Number, Object, Symbol
'@typescript-eslint/ban-types': [
1,
{
'extendDefaults': false,
'types': {
'String': {
'message': 'Use \'string\' instead',
'fixWith': 'string'
},
'Boolean': {
'message': 'Use \'boolean\' instead',
'fixWith': 'boolean'
},
'Number': {
'message': 'Use \'number\' instead',
'fixWith': 'number'
},
'Object': {
'message': 'Use \'object\' instead, or else define a proper TypeScript type:'
},
'Symbol': {
'message': 'Use \'symbol\' instead',
'fixWith': 'symbol'
},
'Function': {
'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.'
}
}
}
],
// RATIONALE: Code is more readable when the type of every variable is immediately obvious.
// Even if the compiler may be able to infer a type, this inference will be unavailable
// to a person who is reviewing a GitHub diff. This rule makes writing code harder,
Expand Down Expand Up @@ -85,12 +52,7 @@ module.exports = {
// or else return the object to a caller (who assumes this responsibility). Unterminated
// promise chains are a serious issue. Besides causing errors to be silently ignored,
// they can also cause a NodeJS process to terminate unexpectedly.
'@typescript-eslint/no-floating-promises': [
2,
{
"ignoreIIFE": true
}
],
'@typescript-eslint/no-floating-promises': 2,
// RATIONALE: Catches a common coding mistake.
'@typescript-eslint/no-for-in-array': 2,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
Expand Down Expand Up @@ -354,4 +316,4 @@ module.exports = {
rules: {}
}
]
};
};
2 changes: 1 addition & 1 deletion samples/react-star-ratings/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.18.0
v18.20.6
6 changes: 3 additions & 3 deletions samples/react-star-ratings/.yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"@microsoft/generator-sharepoint": {
"plusBeta": false,
"isCreatingSolution": true,
"nodeVersion": "16.20.2",
"nodeVersion": "18.20.5",
"sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.12.0"
"@microsoft/teams-js": "2.24.0"
},
"version": "1.18.0",
"version": "1.20.0",
"libraryName": "ratings",
"libraryId": "1fac5bb8-6a05-4c52-aee3-496f6921ac1a",
"environment": "spo",
Expand Down
7 changes: 4 additions & 3 deletions samples/react-star-ratings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ This web part demonstrates *Star Ratings* capabilities to SharePoint News. The "
| 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.|
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |

![SPFx 1.18.0](https://img.shields.io/badge/SPFx-1.18.0-green.svg)
![Node.js v18 | v16](https://img.shields.io/badge/Node.js-v18%20%7C%20v16-green.svg)
![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
![Node.js v19 | v18](https://img.shields.io/badge/Node.js-v19%20%7C%20v18-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
![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")
![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")
Expand Down Expand Up @@ -57,7 +57,8 @@ This web part demonstrates *Star Ratings* capabilities to SharePoint News. The "

Version|Date|Comments
-------|----|--------
1.4|November 9, 2023|Upgraded* to SPFx v1.18
1.5|January 23, 2025|Upgraded to SPFx v1.20 and changed to React Fluent UI v9.
1.4|November 9, 2023|Upgraded to SPFx v1.18
1.3|April 27, 2022|Changed to show averages with stars instead of user ratings.
1.2|March 28, 2022|Upgraded to SPFx v1.14
1.1|January 12, 2022|Updated to retrieve values from API
Expand Down
Binary file modified samples/react-star-ratings/assets/react-star-ratings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion samples/react-star-ratings/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"externals": {},
"localizedResources": {
"RatingsWebPartStrings": "lib/webparts/ratings/loc/{locale}.js"
"RatingsWebPartStrings": "lib/webparts/ratings/loc/{locale}.js",
"ControlStrings": "node_modules/@pnp/spfx-controls-react/lib/loc/{locale}.js"
}
}
4 changes: 2 additions & 2 deletions samples/react-star-ratings/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "ratings",
"id": "1fac5bb8-6a05-4c52-aee3-496f6921ac1a",
"version": "1.4.0.0",
"version": "1.5.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
Expand All @@ -30,7 +30,7 @@
"title": "Ratings",
"description": "The feature that activates elements of the ratings solution.",
"id": "6f19fff7-a71c-47bd-a5d0-c1d6c147acae",
"version": "1.4.0.0"
"version": "1.5.0.0"
}
]
},
Expand Down
Loading

0 comments on commit da6bb7e

Please sign in to comment.