Skip to content

Commit

Permalink
upgrade-manage-list-subscriptions-to-SPFx-v1.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
NishkalankBezawada committed Oct 3, 2024
1 parent be18c54 commit 6121db8
Show file tree
Hide file tree
Showing 9 changed files with 13,586 additions and 36,027 deletions.
19 changes: 12 additions & 7 deletions samples/react-command-manage-list-subscriptions/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
//
// CONFIGURATION: By default, these are banned: String, Boolean, Number, Object, Symbol
'@typescript-eslint/ban-types': [
1,
0,
{
'extendDefaults': false,
'types': {
Expand Down Expand Up @@ -60,7 +60,7 @@ module.exports = {
//
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/explicit-function-return-type': [
1,
0,
{
'allowExpressions': true,
'allowTypedFunctionExpressions': true,
Expand All @@ -79,7 +79,7 @@ module.exports = {
// This rule should be suppressed only in very special cases such as JSON.stringify()
// where the type really can be anything. Even if the type is flexible, another type
// may be more appropriate such as "unknown", "{}", or "Record<k,V>".
'@typescript-eslint/no-explicit-any': 1,
'@typescript-eslint/no-explicit-any': 0,
// RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch()
// handler. Thus wherever a Promise arises, the code must either append a catch handler,
// or else return the object to a caller (who assumes this responsibility). Unterminated
Expand Down Expand Up @@ -158,6 +158,8 @@ module.exports = {
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios
'@typescript-eslint/no-empty-interface': 0,

'@typescript-eslint/no-unused-expressions': 0,
// RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake.
'accessor-pairs': 1,
// RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking.
Expand All @@ -168,7 +170,10 @@ module.exports = {
}
],
// RATIONALE: Catches code that is likely to be incorrect
'eqeqeq': 1,
'eqeqeq': 0,
// RATIONALE: Catches a common coding mistake.
'no-case-declarations': 0,

// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'for-direction': 1,
// RATIONALE: Catches a common coding mistake.
Expand Down Expand Up @@ -279,7 +284,7 @@ module.exports = {
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unsafe-finally': 2,
// RATIONALE: Catches a common coding mistake.
'no-unused-expressions': 1,
'no-unused-expressions': 0,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unused-labels': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
Expand All @@ -298,7 +303,7 @@ module.exports = {
'no-with': 2,
// RATIONALE: Makes logic easier to understand, since constants always have a known value
// @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js
'prefer-const': 1,
'prefer-const': 0,
// RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
'promise/param-names': 2,
// RATIONALE: Catches code that is likely to be incorrect
Expand All @@ -323,7 +328,7 @@ module.exports = {
// ====================================================================
'@microsoft/spfx/import-requires-chunk-name': 1,
'@microsoft/spfx/no-require-ensure': 2,
'@microsoft/spfx/pair-react-dom-render-unmount': 1
'@microsoft/spfx/pair-react-dom-render-unmount': 0
}
},
{
Expand Down
Binary file modified samples/react-command-manage-list-subscriptions/.nvmrc
Binary file not shown.
4 changes: 2 additions & 2 deletions samples/react-command-manage-list-subscriptions/.yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"nodeVersion": "16.18.1",
"sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.9.1"
"@microsoft/teams-js": "2.24.0"
},
"version": "1.17.4",
"version": "1.20.0",
"libraryName": "manage-subscriptions",
"libraryId": "3ecb6ee3-3823-4161-a58b-25ad978a165a",
"environment": "spo",
Expand Down
13 changes: 7 additions & 6 deletions samples/react-command-manage-list-subscriptions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Example use case - Since the webhook subscriptions are only valid to 180 days, a

## Compatibility

![SPFx 1.17.4](https://img.shields.io/badge/SPFx-1.17.4-green.svg)
![Node.js v16.13+](https://img.shields.io/badge/Node.js-v16.13+-green.svg)
![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
![Node.js v18.18.2](https://img.shields.io/badge/Node.js-v18.18.2-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")
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)

Tested using Node.js v16.13.0
Tested using Node.js v18.18.2

## Applies to

Expand All @@ -38,6 +38,7 @@ Tested using Node.js v16.13.0
Version|Date|Comments
-------|----|--------
1.0|September 12, 2023|Initial release
2.0|October 03, 2024|Initial release

## Minimal Path to Awesome

Expand All @@ -53,18 +54,18 @@ Version|Date|Comments

This extension illustrates the following concepts:

* Using **Office fabric UI react** components for the UI.
* Using **@fluentui/react** components for the UI.

## Debug URL for testing

Here's a debug querystring for testing this sample:

```url
?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&loadSPFX=true&customActions={"038b9697-9b22-4e42-8078-66ec93f546d0":{"location":"ClientSideExtension.ListViewcommand set.CommandBar","properties":{}}}
?debugManifestsFile=https://localhost:4321/temp/manifests.js&loadSPFX=true&customActions={"038b9697-9b22-4e42-8078-66ec93f546d0":{"location":"ClientSideExtension.ListViewCommandSet.CommandBar","properties":{"sampleTextOne":"One+item+is+selected+in+the+list","sampleTextTwo":"This+command+is+always+visible."}}}
```

Your URL will look similar to the following (replace with your domain and site address):

```url
https://yourtenant.sharepoint.com/sites/yoursite?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&loadSPFX=true&customActions={"038b9697-9b22-4e42-8078-66ec93f546d0":{"location":"ClientSideExtension.ListViewcommand set.CommandBar","properties":{}}}
https://yourtenant.sharepoint.com/sites/yoursite?debugManifestsFile=https://localhost:4321/temp/manifests.js&loadSPFX=true&customActions={"038b9697-9b22-4e42-8078-66ec93f546d0":{"location":"ClientSideExtension.ListViewCommandSet.CommandBar","properties":{"sampleTextOne":"One+item+is+selected+in+the+list","sampleTextTwo":"This+command+is+always+visible."}}}
```
6 changes: 6 additions & 0 deletions samples/react-command-manage-list-subscriptions/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ build.rig.getTasks = function () {
return result;
};

/* fast-serve */
const { addFastServe } = require("spfx-fast-serve-helpers");
addFastServe(build);
/* end of fast-serve */

build.initialize(require('gulp'));

Loading

0 comments on commit 6121db8

Please sign in to comment.