Merge branch 'main' into dependabot/npm_and_yarn/samples/react-chatgpt-app/elliptic-6.5.7

This commit is contained in:
Hugo Bernier 2024-10-12 18:50:48 -07:00 committed by GitHub
commit f80dce2408
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 61834 additions and 115994 deletions

View File

@ -21563,7 +21563,7 @@
"MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities" "MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities"
], ],
"creationDateTime": "2023-02-03", "creationDateTime": "2023-02-03",
"updateDateTime": "2024-08-26", "updateDateTime": "2024-10-11",
"products": [ "products": [
"SharePoint" "SharePoint"
], ],
@ -21574,7 +21574,7 @@
}, },
{ {
"key": "SPFX-VERSION", "key": "SPFX-VERSION",
"value": "1.19.0" "value": "1.20.0"
} }
], ],
"thumbnails": [ "thumbnails": [

375
package-lock.json generated
View File

@ -1,6 +1,377 @@
{ {
"name": "sp-dev-fx-webparts", "name": "pnp-sp-dev-fx-webparts",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": {} "packages": {
"": {
"dependencies": {
"url": "^0.11.4"
}
},
"node_modules/call-bind": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
"license": "MIT",
"dependencies": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/define-data-property": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
"license": "MIT",
"dependencies": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"gopd": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/es-define-property": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
"license": "MIT",
"dependencies": {
"get-intrinsic": "^1.2.4"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-intrinsic": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"hasown": "^2.0.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
"license": "MIT",
"dependencies": {
"get-intrinsic": "^1.1.3"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-property-descriptors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
"license": "MIT",
"dependencies": {
"es-define-property": "^1.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-proto": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/object-inspect": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
"license": "MIT"
},
"node_modules/qs": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
"license": "BSD-3-Clause",
"dependencies": {
"side-channel": "^1.0.6"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"license": "MIT",
"dependencies": {
"define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/side-channel": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
"license": "MIT",
"dependencies": {
"call-bind": "^1.0.7",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.4",
"object-inspect": "^1.13.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/url": {
"version": "0.11.4",
"resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz",
"integrity": "sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==",
"license": "MIT",
"dependencies": {
"punycode": "^1.4.1",
"qs": "^6.12.3"
},
"engines": {
"node": ">= 0.4"
}
}
},
"dependencies": {
"call-bind": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
"requires": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.1"
}
},
"define-data-property": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
"requires": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"gopd": "^1.0.1"
}
},
"es-define-property": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
"requires": {
"get-intrinsic": "^1.2.4"
}
},
"es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="
},
"function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
},
"get-intrinsic": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
"requires": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"hasown": "^2.0.0"
}
},
"gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
"requires": {
"get-intrinsic": "^1.1.3"
}
},
"has-property-descriptors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
"requires": {
"es-define-property": "^1.0.0"
}
},
"has-proto": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q=="
},
"has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
},
"hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"requires": {
"function-bind": "^1.1.2"
}
},
"object-inspect": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g=="
},
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ=="
},
"qs": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
"requires": {
"side-channel": "^1.0.6"
}
},
"set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"requires": {
"define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.2"
}
},
"side-channel": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
"requires": {
"call-bind": "^1.0.7",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.4",
"object-inspect": "^1.13.1"
}
},
"url": {
"version": "0.11.4",
"resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz",
"integrity": "sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==",
"requires": {
"punycode": "^1.4.1",
"qs": "^6.12.3"
}
}
}
} }

5
package.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"url": "^0.11.4"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,95 +1,64 @@
require('@rushstack/eslint-config/patch/modern-module-resolution'); require("@rushstack/eslint-config/patch/modern-module-resolution");
module.exports = { module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/default'], extends: ["@microsoft/eslint-config-spfx/lib/profiles/default"],
parserOptions: { tsconfigRootDir: __dirname }, parserOptions: { tsconfigRootDir: __dirname },
overrides: [ overrides: [
{ {
files: ['*.ts', '*.tsx'], files: ["*.ts", "*.tsx"],
parser: '@typescript-eslint/parser', parser: "@typescript-eslint/parser",
'parserOptions': { parserOptions: {
'project': './tsconfig.json', project: "./tsconfig.json",
'ecmaVersion': 2018, ecmaVersion: 2018,
'sourceType': 'module' sourceType: "module",
}, },
rules: { rules: {
// Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin // Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/no-new-null': 1, "@rushstack/no-new-null": 1,
// Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin // Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/hoist-jest-mock': 1, "@rushstack/hoist-jest-mock": 1,
// Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security // Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security
'@rushstack/security/no-unsafe-regexp': 1, "@rushstack/security/no-unsafe-regexp": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/adjacent-overload-signatures': 1, "@typescript-eslint/adjacent-overload-signatures": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // 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. // 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 // 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, // to a person who is reviewing a GitHub diff. This rule makes writing code harder,
// but writing code is a much less important activity than reading it. // but writing code is a much less important activity than reading it.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/explicit-function-return-type': [ "@typescript-eslint/explicit-function-return-type": [
1, 1,
{ {
'allowExpressions': true, allowExpressions: true,
'allowTypedFunctionExpressions': true, allowTypedFunctionExpressions: true,
'allowHigherOrderFunctions': false allowHigherOrderFunctions: false,
} },
], ],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: although this is a recommended rule, it is up to dev to select coding style. // Rationale to disable: although this is a recommended rule, it is up to dev to select coding style.
// Set to 1 (warning) or 2 (error) to enable. // Set to 1 (warning) or 2 (error) to enable.
'@typescript-eslint/explicit-member-accessibility': 0, "@typescript-eslint/explicit-member-accessibility": 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-array-constructor': 1, "@typescript-eslint/no-array-constructor": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// //
// RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript. // RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript.
// This rule should be suppressed only in very special cases such as JSON.stringify() // 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 // 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>". // may be more appropriate such as "unknown", "{}", or "Record<k,V>".
'@typescript-eslint/no-explicit-any': 1, "@typescript-eslint/no-explicit-any": 1,
// RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch() // 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, // 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 // 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, // promise chains are a serious issue. Besides causing errors to be silently ignored,
// they can also cause a NodeJS process to terminate unexpectedly. // they can also cause a NodeJS process to terminate unexpectedly.
'@typescript-eslint/no-floating-promises': 2, "@typescript-eslint/no-floating-promises": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'@typescript-eslint/no-for-in-array': 2, "@typescript-eslint/no-for-in-array": 2,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-misused-new': 2, "@typescript-eslint/no-misused-new": 2,
// RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks // RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks
// a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler // a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler
// optimizations. If you are declaring loose functions/variables, it's better to make them // optimizations. If you are declaring loose functions/variables, it's better to make them
@ -102,12 +71,12 @@ module.exports = {
// dependencies are tracked more conscientiously. // dependencies are tracked more conscientiously.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-namespace': [ "@typescript-eslint/no-namespace": [
1, 1,
{ {
'allowDeclarations': false, allowDeclarations: false,
'allowDefinitionFiles': false allowDefinitionFiles: false,
} },
], ],
// RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)" // RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)"
// that avoids the effort of declaring "title" as a field. This TypeScript feature makes // that avoids the effort of declaring "title" as a field. This TypeScript feature makes
@ -118,235 +87,232 @@ module.exports = {
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Set to 1 (warning) or 2 (error) to enable the rule // Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-parameter-properties': 0, "@typescript-eslint/no-parameter-properties": 0,
// RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code // RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code
// may impact performance. // may impact performance.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-unused-vars': [ "@typescript-eslint/no-unused-vars": [
1, 1,
{ {
'vars': 'all', vars: "all",
// Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code, // Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code,
// the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures // the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures
// that are overriding a base class method or implementing an interface. // that are overriding a base class method or implementing an interface.
'args': 'none' args: "none",
} },
], ],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-use-before-define': [ "@typescript-eslint/no-use-before-define": [
2, 2,
{ {
'functions': false, functions: false,
'classes': true, classes: true,
'variables': true, variables: true,
'enums': true, enums: true,
'typedefs': true typedefs: true,
} },
], ],
// Disallows require statements except in import statements. // Disallows require statements except in import statements.
// In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports. // In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports.
'@typescript-eslint/no-var-requires': 'error', "@typescript-eslint/no-var-requires": "error",
// RATIONALE: The "module" keyword is deprecated except when describing legacy libraries. // RATIONALE: The "module" keyword is deprecated except when describing legacy libraries.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/prefer-namespace-keyword': 1, "@typescript-eslint/prefer-namespace-keyword": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: it's up to developer to decide if he wants to add type annotations // Rationale to disable: it's up to developer to decide if he wants to add type annotations
// Set to 1 (warning) or 2 (error) to enable the rule // Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-inferrable-types': 0, "@typescript-eslint/no-inferrable-types": 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios // Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios
'@typescript-eslint/no-empty-interface': 0, "@typescript-eslint/no-empty-interface": 0,
// RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake. // RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake.
'accessor-pairs': 1, "accessor-pairs": 1,
// RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking. // RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking.
'dot-notation': [ "dot-notation": [
1, 1,
{ {
'allowPattern': '^_' allowPattern: "^_",
} },
], ],
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
'eqeqeq': 1, eqeqeq: 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'for-direction': 1, "for-direction": 1,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'guard-for-in': 2, "guard-for-in": 2,
// RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time // RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time
// to split up your code. // to split up your code.
'max-lines': ['warn', { max: 2000 }], "max-lines": ["warn", { max: 2000 }],
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-async-promise-executor': 2, "no-async-promise-executor": 2,
// RATIONALE: Deprecated language feature. // RATIONALE: Deprecated language feature.
'no-caller': 2, "no-caller": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-compare-neg-zero': 2, "no-compare-neg-zero": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-cond-assign': 2, "no-cond-assign": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-constant-condition': 1, "no-constant-condition": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-control-regex': 2, "no-control-regex": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-debugger': 1, "no-debugger": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-delete-var': 2, "no-delete-var": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-duplicate-case': 2, "no-duplicate-case": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty': 1, "no-empty": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-character-class': 2, "no-empty-character-class": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-pattern': 1, "no-empty-pattern": 1,
// RATIONALE: Eval is a security concern and a performance concern. // RATIONALE: Eval is a security concern and a performance concern.
'no-eval': 1, "no-eval": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-ex-assign': 2, "no-ex-assign": 2,
// RATIONALE: System types are global and should not be tampered with in a scalable code base. // RATIONALE: System types are global and should not be tampered with in a scalable code base.
// If two different libraries (or two versions of the same library) both try to modify // If two different libraries (or two versions of the same library) both try to modify
// a type, only one of them can win. Polyfills are acceptable because they implement // a type, only one of them can win. Polyfills are acceptable because they implement
// a standardized interoperable contract, but polyfills are generally coded in plain // a standardized interoperable contract, but polyfills are generally coded in plain
// JavaScript. // JavaScript.
'no-extend-native': 1, "no-extend-native": 1,
// Disallow unnecessary labels // Disallow unnecessary labels
'no-extra-label': 1, "no-extra-label": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-fallthrough': 2, "no-fallthrough": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-func-assign': 1, "no-func-assign": 1,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-implied-eval': 2, "no-implied-eval": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-invalid-regexp': 2, "no-invalid-regexp": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-label-var': 2, "no-label-var": 2,
// RATIONALE: Eliminates redundant code. // RATIONALE: Eliminates redundant code.
'no-lone-blocks': 1, "no-lone-blocks": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-misleading-character-class': 2, "no-misleading-character-class": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-multi-str': 2, "no-multi-str": 2,
// RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to // RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to
// a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()", // a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()",
// or else implies that the constructor is doing nontrivial computations, which is often // or else implies that the constructor is doing nontrivial computations, which is often
// a poor class design. // a poor class design.
'no-new': 1, "no-new": 1,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
'no-new-func': 2, "no-new-func": 2,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
'no-new-object': 2, "no-new-object": 2,
// RATIONALE: Obsolete notation. // RATIONALE: Obsolete notation.
'no-new-wrappers': 1, "no-new-wrappers": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-octal': 2, "no-octal": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
'no-octal-escape': 2, "no-octal-escape": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-regex-spaces': 2, "no-regex-spaces": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-return-assign': 2, "no-return-assign": 2,
// RATIONALE: Security risk. // RATIONALE: Security risk.
'no-script-url': 1, "no-script-url": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-self-assign': 2, "no-self-assign": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-self-compare': 2, "no-self-compare": 2,
// RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use // RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use
// commas to create compound expressions. In general code is more readable if each // commas to create compound expressions. In general code is more readable if each
// step is split onto a separate line. This also makes it easier to set breakpoints // step is split onto a separate line. This also makes it easier to set breakpoints
// in the debugger. // in the debugger.
'no-sequences': 1, "no-sequences": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-shadow-restricted-names': 2, "no-shadow-restricted-names": 2,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-sparse-arrays': 2, "no-sparse-arrays": 2,
// RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception, // RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception,
// such flexibility adds pointless complexity, by requiring every catch block to test // such flexibility adds pointless complexity, by requiring every catch block to test
// the type of the object that it receives. Whereas if catch blocks can always assume // the type of the object that it receives. Whereas if catch blocks can always assume
// that their object implements the "Error" contract, then the code is simpler, and // that their object implements the "Error" contract, then the code is simpler, and
// we generally get useful additional information like a call stack. // we generally get useful additional information like a call stack.
'no-throw-literal': 2, "no-throw-literal": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-unmodified-loop-condition': 1, "no-unmodified-loop-condition": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unsafe-finally': 2, "no-unsafe-finally": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-unused-expressions': 1, "no-unused-expressions": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unused-labels': 1, "no-unused-labels": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-useless-catch': 1, "no-useless-catch": 1,
// RATIONALE: Avoids a potential performance problem. // RATIONALE: Avoids a potential performance problem.
'no-useless-concat': 1, "no-useless-concat": 1,
// RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior. // RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior.
// Always use "let" or "const" instead. // Always use "let" or "const" instead.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'no-var': 2, "no-var": 2,
// RATIONALE: Generally not needed in modern code. // RATIONALE: Generally not needed in modern code.
'no-void': 1, "no-void": 1,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-with': 2, "no-with": 2,
// RATIONALE: Makes logic easier to understand, since constants always have a known value // RATIONALE: Makes logic easier to understand, since constants always have a known value
// @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js
'prefer-const': 1, "prefer-const": 1,
// RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused. // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
'promise/param-names': 2, "promise/param-names": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-atomic-updates': 2, "require-atomic-updates": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-yield': 1, "require-yield": 1,
// "Use strict" is redundant when using the TypeScript compiler. // "Use strict" is redundant when using the TypeScript compiler.
'strict': [ strict: [2, "never"],
2,
'never'
],
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'use-isnan': 2, "use-isnan": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
// Set to 1 (warning) or 2 (error) to enable. // Set to 1 (warning) or 2 (error) to enable.
// Rationale to disable: !!{} // Rationale to disable: !!{}
'no-extra-boolean-cast': 0, "no-extra-boolean-cast": 0,
// ==================================================================== // ====================================================================
// @microsoft/eslint-plugin-spfx // @microsoft/eslint-plugin-spfx
// ==================================================================== // ====================================================================
'@microsoft/spfx/import-requires-chunk-name': 1, "@microsoft/spfx/import-requires-chunk-name": 1,
'@microsoft/spfx/no-require-ensure': 2, "@microsoft/spfx/no-require-ensure": 2,
'@microsoft/spfx/pair-react-dom-render-unmount': 1 "@microsoft/spfx/pair-react-dom-render-unmount": 1,
} },
}, },
{ {
// For unit tests, we can be a little bit less strict. The settings below revise the // For unit tests, we can be a little bit less strict. The settings below revise the
// defaults specified in the extended configurations, as well as above. // defaults specified in the extended configurations, as well as above.
files: [ files: [
// Test files // Test files
'*.test.ts', "*.test.ts",
'*.test.tsx', "*.test.tsx",
'*.spec.ts', "*.spec.ts",
'*.spec.tsx', "*.spec.tsx",
// Facebook convention // Facebook convention
'**/__mocks__/*.ts', "**/__mocks__/*.ts",
'**/__mocks__/*.tsx', "**/__mocks__/*.tsx",
'**/__tests__/*.ts', "**/__tests__/*.ts",
'**/__tests__/*.tsx', "**/__tests__/*.tsx",
// Microsoft convention // Microsoft convention
'**/test/*.ts', "**/test/*.ts",
'**/test/*.tsx' "**/test/*.tsx",
],
rules: {},
},
], ],
rules: {}
}
]
}; };

View File

@ -5,9 +5,9 @@
"nodeVersion": "16.16.0", "nodeVersion": "16.16.0",
"sdksVersions": { "sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2", "@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.12.2" "@microsoft/teams-js": "2.24.0"
}, },
"version": "1.19.0", "version": "1.20.0",
"libraryName": "holidays-calendar", "libraryName": "holidays-calendar",
"libraryId": "c85f1137-142e-4570-b3c9-3cdc47580452", "libraryId": "c85f1137-142e-4570-b3c9-3cdc47580452",
"environment": "spo", "environment": "spo",

View File

@ -26,7 +26,7 @@ ACE card extension provides below functionalities
This sample is optimally compatible with the following environment configuration: This sample is optimally compatible with the following environment configuration:
![SPFx 1.19.0](https://img.shields.io/badge/SPFx-1.19.0-green.svg) ![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
![Node.js v18 | v18](https://img.shields.io/badge/Node.js-v18%20%7C%20v16-green.svg) ![Node.js v18 | v18](https://img.shields.io/badge/Node.js-v18%20%7C%20v16-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-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 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
@ -60,6 +60,7 @@ For more information about SPFx compatibility, please refer to <https://aka.ms/s
| 1.0 | January 29, 2021 | Initial release | | 1.0 | January 29, 2021 | Initial release |
| 1.1 | November 30, 2023 | Upgraded to SPFx 1.18.2 | | 1.1 | November 30, 2023 | Upgraded to SPFx 1.18.2 |
| 1.2 | August 26, 2024 | Upgraded to SPFx 1.19.0 | | 1.2 | August 26, 2024 | Upgraded to SPFx 1.19.0 |
| 1.3 | October 11, 2024 | Upgraded to SPFx 1.20.0 |
## Minimal Path to Awesome ## Minimal Path to Awesome

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "holidays-calendar", "name": "holidays-calendar",
"version": "1.2", "version": "1.3",
"private": true, "private": true,
"engines": { "engines": {
"node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0" "node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0"
@ -16,12 +16,12 @@
"@fluentui/react": "8.106.4", "@fluentui/react": "8.106.4",
"@fluentui/react-components": "^9.54.13", "@fluentui/react-components": "^9.54.13",
"@microsoft/generator-sharepoint": "^1.19.0", "@microsoft/generator-sharepoint": "^1.19.0",
"@microsoft/sp-adaptive-card-extension-base": "1.19.0", "@microsoft/sp-adaptive-card-extension-base": "1.20.0",
"@microsoft/sp-core-library": "1.19.0", "@microsoft/sp-core-library": "1.20.0",
"@microsoft/sp-lodash-subset": "1.19.0", "@microsoft/sp-lodash-subset": "1.20.0",
"@microsoft/sp-office-ui-fabric-core": "1.19.0", "@microsoft/sp-office-ui-fabric-core": "1.20.0",
"@microsoft/sp-property-pane": "1.19.0", "@microsoft/sp-property-pane": "1.20.0",
"@microsoft/sp-webpart-base": "1.19.0", "@microsoft/sp-webpart-base": "1.20.0",
"@pnp/core": "^3.10.0", "@pnp/core": "^3.10.0",
"@pnp/graph": "^3.10.0", "@pnp/graph": "^3.10.0",
"@pnp/logging": "^3.10.0", "@pnp/logging": "^3.10.0",
@ -35,21 +35,21 @@
"yarn": "^1.22.21" "yarn": "^1.22.21"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/eslint-config-spfx": "1.20.1", "@microsoft/eslint-config-spfx": "1.20.2",
"@microsoft/eslint-plugin-spfx": "1.20.1", "@microsoft/eslint-plugin-spfx": "1.20.2",
"@microsoft/microsoft-graph-types": "^2.40.0", "@microsoft/microsoft-graph-types": "^2.40.0",
"@microsoft/rush-stack-compiler-4.7": "0.1.0", "@microsoft/rush-stack-compiler-4.7": "0.1.0",
"@microsoft/sp-build-web": "1.20.1", "@microsoft/sp-build-web": "1.20.2",
"@microsoft/sp-module-interfaces": "1.20.1", "@microsoft/sp-module-interfaces": "1.20.2",
"@rushstack/eslint-config": "2.5.1", "@rushstack/eslint-config": "4.0.1",
"@types/react": "17.0.45", "@types/react": "17.0.45",
"@types/react-dom": "17.0.17", "@types/react-dom": "17.0.17",
"@types/webpack-env": "~1.15.2", "@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"eslint": "8.7.0", "eslint": "8.57.0",
"eslint-plugin-react-hooks": "4.3.0", "eslint-plugin-react-hooks": "4.3.0",
"gulp": "4.0.2", "gulp": "4.0.2",
"spfx-fast-serve-helpers": "^1.19.3", "spfx-fast-serve-helpers": "1.20.1",
"typescript": "4.7.4" "typescript": "4.7.4"
} }
} }

View File

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import { HolidaysListColumns, HolidaysListSelectColumns } from "../constants/constant"; import { HolidaysListColumns, HolidaysListSelectColumns, ListName } from "../constants/constant";
import { ListName } from "../constants/constant";
import { GraphService } from "./GraphService"; import { GraphService } from "./GraphService";
import { SPService } from "./SPService"; import { SPService } from "./SPService";
@ -10,8 +10,8 @@ import { IEmployeeInfo } from "../../webparts/holidaysCalendar/interfaces/IHolid
import { IHolidayItem, IHoliday } from "../interfaces/HolidaysCalendar"; import { IHolidayItem, IHoliday } from "../interfaces/HolidaysCalendar";
export class HolidaysCalendarService { export class HolidaysCalendarService {
private spService: SPService; private readonly spService: SPService;
private graphService: GraphService; private readonly graphService: GraphService;
constructor(spService: SPService, graphService: GraphService) { constructor(spService: SPService, graphService: GraphService) {
this.spService = spService; this.spService = spService;
this.graphService = graphService; this.graphService = graphService;
@ -83,6 +83,7 @@ export class HolidaysCalendarService {
}); });
return Promise.resolve(holidays); return Promise.resolve(holidays);
} catch (ex) { } catch (ex) {
console.log(ex);
return Promise.reject(holidays); return Promise.reject(holidays);
} }
}; };
@ -122,6 +123,7 @@ export class HolidaysCalendarService {
await this.graphService.createEvent(eventDetail); await this.graphService.createEvent(eventDetail);
return Promise.resolve(true); return Promise.resolve(true);
} catch (ex) { } catch (ex) {
console.log(ex);
return Promise.reject(false); return Promise.reject(false);
} }
}; };

View File

@ -2,10 +2,9 @@ import * as React from "react";
import { IHolidaysCalendarState } from "../interfaces/IHolidaysCalendarState"; import { IHolidaysCalendarState } from "../interfaces/IHolidaysCalendarState";
import { HolidaysCalendarService } from "../../../common/services/HolidaysCalendarService"; import { HolidaysCalendarService } from "../../../common/services/HolidaysCalendarService";
import HolidaysList from "./HolidaysList/HolidaysList"; import HolidaysList from "./HolidaysList/HolidaysList";
import { Alert } from "@fluentui/react-components/unstable";
import { IHolidaysCalendarProps } from "./IHolidaysCalendarProps"; import { IHolidaysCalendarProps } from "./IHolidaysCalendarProps";
import { FluentProvider, webLightTheme } from "@fluentui/react-components"; import { Button, FluentProvider, MessageBar, MessageBarActions, MessageBarBody, webLightTheme } from "@fluentui/react-components";
import { DismissCircleRegular } from "@fluentui/react-icons"; import { DismissRegular } from "@fluentui/react-icons";
import csvDownload from "json-to-csv-export"; import csvDownload from "json-to-csv-export";
const HolidaysCalendar = (props: IHolidaysCalendarProps): JSX.Element => { const HolidaysCalendar = (props: IHolidaysCalendarProps): JSX.Element => {
const [service] = React.useState<HolidaysCalendarService>(new HolidaysCalendarService(props.spService, props.graphService)); const [service] = React.useState<HolidaysCalendarService>(new HolidaysCalendarService(props.spService, props.graphService));
@ -27,6 +26,7 @@ const HolidaysCalendar = (props: IHolidaysCalendarProps): JSX.Element => {
await service.addLeaveInCalendar(state.employeeInfo, selectedItem[0]); await service.addLeaveInCalendar(state.employeeInfo, selectedItem[0]);
setState((prevState: IHolidaysCalendarState) => ({ ...prevState, message: { show: true, intent: "success" } })); setState((prevState: IHolidaysCalendarState) => ({ ...prevState, message: { show: true, intent: "success" } }));
} catch (ex) { } catch (ex) {
console.log(ex);
setState((prevState: IHolidaysCalendarState) => ({ ...prevState, message: { show: true, intent: "error" } })); setState((prevState: IHolidaysCalendarState) => ({ ...prevState, message: { show: true, intent: "error" } }));
} }
}; };
@ -52,12 +52,14 @@ const HolidaysCalendar = (props: IHolidaysCalendarProps): JSX.Element => {
})(); })();
}, []); }, []);
return ( return (
<>
<FluentProvider theme={webLightTheme}> <FluentProvider theme={webLightTheme}>
{state.message.show && ( {state.message.show && (
<Alert intent={state.message.intent} action={{ icon: <DismissCircleRegular aria-label="dismiss message" onClick={handleDismissClick} /> }}> <MessageBar intent={state.message.intent}>
{state.message.intent === "success" ? "Holiday added in calendar" : "Some error occurred"} <MessageBarBody>{state.message.intent === "success" ? "Holiday added in calendar" : "Some error occurred"}</MessageBarBody>
</Alert> <MessageBarActions
containerAction={<Button aria-label="dismiss" appearance="transparent" icon={<DismissRegular />} onClick={handleDismissClick} />}
></MessageBarActions>
</MessageBar>
)} )}
{state.holidayListItems.length > 0 && ( {state.holidayListItems.length > 0 && (
<HolidaysList <HolidaysList
@ -70,7 +72,6 @@ const HolidaysCalendar = (props: IHolidaysCalendarProps): JSX.Element => {
/> />
)} )}
</FluentProvider> </FluentProvider>
</>
); );
}; };

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ Contains SPFx web part & Azure Function with below functionalities
This sample is optimally compatible with the following environment configuration: This sample is optimally compatible with the following environment configuration:
![SPFx 1.19.0](https://img.shields.io/badge/SPFx-1.19.0-green.svg) ![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
![Node.js v18 | v16](https://img.shields.io/badge/Node.js-v18%20%7C%20v16-green.svg) ![Node.js v18 | v16](https://img.shields.io/badge/Node.js-v18%20%7C%20v16-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-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 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
@ -110,6 +110,7 @@ Steps to follow:
| 1.0 | February 15, 2023 | Initial release | | 1.0 | February 15, 2023 | Initial release |
| 2.0 | February 10, 2024 | Implementation using Azure Function | | 2.0 | February 10, 2024 | Implementation using Azure Function |
| 3.0 | September 05, 2024 | Bug fix and SPFx version upgrade | | 3.0 | September 05, 2024 | Bug fix and SPFx version upgrade |
| 3.1 | October 05, 2024 | SPFx version upgrade |
## Minimal Path to Awesome ## Minimal Path to Awesome

View File

@ -1,95 +1,63 @@
require('@rushstack/eslint-config/patch/modern-module-resolution'); require("@rushstack/eslint-config/patch/modern-module-resolution");
module.exports = { module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'], extends: ["@microsoft/eslint-config-spfx/lib/profiles/react"],
parserOptions: { tsconfigRootDir: __dirname }, parserOptions: { tsconfigRootDir: __dirname },
overrides: [ overrides: [
{ {
files: ['*.ts', '*.tsx'], files: ["*.ts", "*.tsx"],
parser: '@typescript-eslint/parser', parser: "@typescript-eslint/parser",
'parserOptions': { parserOptions: {
'project': './tsconfig.json', project: "./tsconfig.json",
'ecmaVersion': 2018, ecmaVersion: 2018,
'sourceType': 'module' sourceType: "module",
}, },
rules: { rules: {
// Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin // Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/no-new-null': 1, "@rushstack/no-new-null": 1,
// Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin // Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/hoist-jest-mock': 1, "@rushstack/hoist-jest-mock": 1,
// Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security // Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security
'@rushstack/security/no-unsafe-regexp': 1, "@rushstack/security/no-unsafe-regexp": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/adjacent-overload-signatures': 1, "@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. // 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 // 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, // to a person who is reviewing a GitHub diff. This rule makes writing code harder,
// but writing code is a much less important activity than reading it. // but writing code is a much less important activity than reading it.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/explicit-function-return-type': [ "@typescript-eslint/explicit-function-return-type": [
1, 1,
{ {
'allowExpressions': true, allowExpressions: true,
'allowTypedFunctionExpressions': true, allowTypedFunctionExpressions: true,
'allowHigherOrderFunctions': false allowHigherOrderFunctions: false,
} },
], ],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: although this is a recommended rule, it is up to dev to select coding style. // Rationale to disable: although this is a recommended rule, it is up to dev to select coding style.
// Set to 1 (warning) or 2 (error) to enable. // Set to 1 (warning) or 2 (error) to enable.
'@typescript-eslint/explicit-member-accessibility': 0, "@typescript-eslint/explicit-member-accessibility": 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-array-constructor': 1, "@typescript-eslint/no-array-constructor": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// //
// RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript. // RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript.
// This rule should be suppressed only in very special cases such as JSON.stringify() // 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 // 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>". // may be more appropriate such as "unknown", "{}", or "Record<k,V>".
'@typescript-eslint/no-explicit-any': 1, "@typescript-eslint/no-explicit-any": 1,
// RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch() // 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, // 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 // 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, // promise chains are a serious issue. Besides causing errors to be silently ignored,
// they can also cause a NodeJS process to terminate unexpectedly. // they can also cause a NodeJS process to terminate unexpectedly.
'@typescript-eslint/no-floating-promises': 2, "@typescript-eslint/no-floating-promises": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'@typescript-eslint/no-for-in-array': 2, "@typescript-eslint/no-for-in-array": 2,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-misused-new': 2, "@typescript-eslint/no-misused-new": 2,
// RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks // RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks
// a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler // a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler
// optimizations. If you are declaring loose functions/variables, it's better to make them // optimizations. If you are declaring loose functions/variables, it's better to make them
@ -102,12 +70,12 @@ module.exports = {
// dependencies are tracked more conscientiously. // dependencies are tracked more conscientiously.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-namespace': [ "@typescript-eslint/no-namespace": [
1, 1,
{ {
'allowDeclarations': false, allowDeclarations: false,
'allowDefinitionFiles': false allowDefinitionFiles: false,
} },
], ],
// RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)" // RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)"
// that avoids the effort of declaring "title" as a field. This TypeScript feature makes // that avoids the effort of declaring "title" as a field. This TypeScript feature makes
@ -118,235 +86,232 @@ module.exports = {
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Set to 1 (warning) or 2 (error) to enable the rule // Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-parameter-properties': 0, "@typescript-eslint/no-parameter-properties": 0,
// RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code // RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code
// may impact performance. // may impact performance.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-unused-vars': [ "@typescript-eslint/no-unused-vars": [
1, 1,
{ {
'vars': 'all', vars: "all",
// Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code, // Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code,
// the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures // the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures
// that are overriding a base class method or implementing an interface. // that are overriding a base class method or implementing an interface.
'args': 'none' args: "none",
} },
], ],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-use-before-define': [ "@typescript-eslint/no-use-before-define": [
2, 2,
{ {
'functions': false, functions: false,
'classes': true, classes: true,
'variables': true, variables: true,
'enums': true, enums: true,
'typedefs': true typedefs: true,
} },
], ],
// Disallows require statements except in import statements. // Disallows require statements except in import statements.
// In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports. // In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports.
'@typescript-eslint/no-var-requires': 'error', "@typescript-eslint/no-var-requires": "error",
// RATIONALE: The "module" keyword is deprecated except when describing legacy libraries. // RATIONALE: The "module" keyword is deprecated except when describing legacy libraries.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/prefer-namespace-keyword': 1, "@typescript-eslint/prefer-namespace-keyword": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: it's up to developer to decide if he wants to add type annotations // Rationale to disable: it's up to developer to decide if he wants to add type annotations
// Set to 1 (warning) or 2 (error) to enable the rule // Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-inferrable-types': 0, "@typescript-eslint/no-inferrable-types": 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios // Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios
'@typescript-eslint/no-empty-interface': 0, "@typescript-eslint/no-empty-interface": 0,
// RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake. // RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake.
'accessor-pairs': 1, "accessor-pairs": 1,
// RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking. // RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking.
'dot-notation': [ "dot-notation": [
1, 1,
{ {
'allowPattern': '^_' allowPattern: "^_",
} },
], ],
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
'eqeqeq': 1, eqeqeq: 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'for-direction': 1, "for-direction": 1,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'guard-for-in': 2, "guard-for-in": 2,
// RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time // RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time
// to split up your code. // to split up your code.
'max-lines': ['warn', { max: 2000 }], "max-lines": ["warn", { max: 2000 }],
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-async-promise-executor': 2, "no-async-promise-executor": 2,
// RATIONALE: Deprecated language feature. // RATIONALE: Deprecated language feature.
'no-caller': 2, "no-caller": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-compare-neg-zero': 2, "no-compare-neg-zero": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-cond-assign': 2, "no-cond-assign": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-constant-condition': 1, "no-constant-condition": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-control-regex': 2, "no-control-regex": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-debugger': 1, "no-debugger": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-delete-var': 2, "no-delete-var": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-duplicate-case': 2, "no-duplicate-case": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty': 1, "no-empty": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-character-class': 2, "no-empty-character-class": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-pattern': 1, "no-empty-pattern": 1,
// RATIONALE: Eval is a security concern and a performance concern. // RATIONALE: Eval is a security concern and a performance concern.
'no-eval': 1, "no-eval": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-ex-assign': 2, "no-ex-assign": 2,
// RATIONALE: System types are global and should not be tampered with in a scalable code base. // RATIONALE: System types are global and should not be tampered with in a scalable code base.
// If two different libraries (or two versions of the same library) both try to modify // If two different libraries (or two versions of the same library) both try to modify
// a type, only one of them can win. Polyfills are acceptable because they implement // a type, only one of them can win. Polyfills are acceptable because they implement
// a standardized interoperable contract, but polyfills are generally coded in plain // a standardized interoperable contract, but polyfills are generally coded in plain
// JavaScript. // JavaScript.
'no-extend-native': 1, "no-extend-native": 1,
// Disallow unnecessary labels // Disallow unnecessary labels
'no-extra-label': 1, "no-extra-label": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-fallthrough': 2, "no-fallthrough": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-func-assign': 1, "no-func-assign": 1,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-implied-eval': 2, "no-implied-eval": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-invalid-regexp': 2, "no-invalid-regexp": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-label-var': 2, "no-label-var": 2,
// RATIONALE: Eliminates redundant code. // RATIONALE: Eliminates redundant code.
'no-lone-blocks': 1, "no-lone-blocks": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-misleading-character-class': 2, "no-misleading-character-class": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-multi-str': 2, "no-multi-str": 2,
// RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to // RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to
// a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()", // a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()",
// or else implies that the constructor is doing nontrivial computations, which is often // or else implies that the constructor is doing nontrivial computations, which is often
// a poor class design. // a poor class design.
'no-new': 1, "no-new": 1,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
'no-new-func': 2, "no-new-func": 2,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
'no-new-object': 2, "no-new-object": 2,
// RATIONALE: Obsolete notation. // RATIONALE: Obsolete notation.
'no-new-wrappers': 1, "no-new-wrappers": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-octal': 2, "no-octal": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
'no-octal-escape': 2, "no-octal-escape": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-regex-spaces': 2, "no-regex-spaces": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-return-assign': 2, "no-return-assign": 2,
// RATIONALE: Security risk. // RATIONALE: Security risk.
'no-script-url': 1, "no-script-url": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-self-assign': 2, "no-self-assign": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-self-compare': 2, "no-self-compare": 2,
// RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use // RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use
// commas to create compound expressions. In general code is more readable if each // commas to create compound expressions. In general code is more readable if each
// step is split onto a separate line. This also makes it easier to set breakpoints // step is split onto a separate line. This also makes it easier to set breakpoints
// in the debugger. // in the debugger.
'no-sequences': 1, "no-sequences": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-shadow-restricted-names': 2, "no-shadow-restricted-names": 2,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-sparse-arrays': 2, "no-sparse-arrays": 2,
// RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception, // RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception,
// such flexibility adds pointless complexity, by requiring every catch block to test // such flexibility adds pointless complexity, by requiring every catch block to test
// the type of the object that it receives. Whereas if catch blocks can always assume // the type of the object that it receives. Whereas if catch blocks can always assume
// that their object implements the "Error" contract, then the code is simpler, and // that their object implements the "Error" contract, then the code is simpler, and
// we generally get useful additional information like a call stack. // we generally get useful additional information like a call stack.
'no-throw-literal': 2, "no-throw-literal": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-unmodified-loop-condition': 1, "no-unmodified-loop-condition": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unsafe-finally': 2, "no-unsafe-finally": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-unused-expressions': 1, "no-unused-expressions": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unused-labels': 1, "no-unused-labels": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-useless-catch': 1, "no-useless-catch": 1,
// RATIONALE: Avoids a potential performance problem. // RATIONALE: Avoids a potential performance problem.
'no-useless-concat': 1, "no-useless-concat": 1,
// RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior. // RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior.
// Always use "let" or "const" instead. // Always use "let" or "const" instead.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'no-var': 2, "no-var": 2,
// RATIONALE: Generally not needed in modern code. // RATIONALE: Generally not needed in modern code.
'no-void': 1, "no-void": 1,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-with': 2, "no-with": 2,
// RATIONALE: Makes logic easier to understand, since constants always have a known value // RATIONALE: Makes logic easier to understand, since constants always have a known value
// @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js
'prefer-const': 1, "prefer-const": 1,
// RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused. // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
'promise/param-names': 2, "promise/param-names": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-atomic-updates': 2, "require-atomic-updates": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-yield': 1, "require-yield": 1,
// "Use strict" is redundant when using the TypeScript compiler. // "Use strict" is redundant when using the TypeScript compiler.
'strict': [ strict: [2, "never"],
2,
'never'
],
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'use-isnan': 2, "use-isnan": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
// Set to 1 (warning) or 2 (error) to enable. // Set to 1 (warning) or 2 (error) to enable.
// Rationale to disable: !!{} // Rationale to disable: !!{}
'no-extra-boolean-cast': 0, "no-extra-boolean-cast": 0,
// ==================================================================== // ====================================================================
// @microsoft/eslint-plugin-spfx // @microsoft/eslint-plugin-spfx
// ==================================================================== // ====================================================================
'@microsoft/spfx/import-requires-chunk-name': 1, "@microsoft/spfx/import-requires-chunk-name": 1,
'@microsoft/spfx/no-require-ensure': 2, "@microsoft/spfx/no-require-ensure": 2,
'@microsoft/spfx/pair-react-dom-render-unmount': 1 "@microsoft/spfx/pair-react-dom-render-unmount": 1,
} },
}, },
{ {
// For unit tests, we can be a little bit less strict. The settings below revise the // For unit tests, we can be a little bit less strict. The settings below revise the
// defaults specified in the extended configurations, as well as above. // defaults specified in the extended configurations, as well as above.
files: [ files: [
// Test files // Test files
'*.test.ts', "*.test.ts",
'*.test.tsx', "*.test.tsx",
'*.spec.ts', "*.spec.ts",
'*.spec.tsx', "*.spec.tsx",
// Facebook convention // Facebook convention
'**/__mocks__/*.ts', "**/__mocks__/*.ts",
'**/__mocks__/*.tsx', "**/__mocks__/*.tsx",
'**/__tests__/*.ts', "**/__tests__/*.ts",
'**/__tests__/*.tsx', "**/__tests__/*.tsx",
// Microsoft convention // Microsoft convention
'**/test/*.ts', "**/test/*.ts",
'**/test/*.tsx' "**/test/*.tsx",
],
rules: {},
},
], ],
rules: {}
}
]
}; };

File diff suppressed because it is too large Load Diff

View File

@ -15,33 +15,32 @@
"dependencies": { "dependencies": {
"@fluentui/react": "8.106.4", "@fluentui/react": "8.106.4",
"@microsoft/microsoft-graph-types": "^2.25.0", "@microsoft/microsoft-graph-types": "^2.25.0",
"@microsoft/sp-adaptive-card-extension-base": "1.19.0", "@microsoft/sp-adaptive-card-extension-base": "1.20.0",
"@microsoft/sp-core-library": "1.19.0", "@microsoft/sp-core-library": "1.20.0",
"@microsoft/sp-lodash-subset": "1.19.0", "@microsoft/sp-lodash-subset": "1.20.0",
"@microsoft/sp-office-ui-fabric-core": "1.19.0", "@microsoft/sp-office-ui-fabric-core": "1.20.0",
"@microsoft/sp-property-pane": "1.19.0", "@microsoft/sp-property-pane": "1.20.0",
"@microsoft/sp-webpart-base": "1.19.0", "@microsoft/sp-webpart-base": "1.20.0",
"moment": "^2.29.4", "moment": "^2.29.4",
"react": "17.0.1", "react": "17.0.1",
"react-dom": "17.0.1", "react-dom": "17.0.1",
"tslib": "2.3.1" "tslib": "2.3.1"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/eslint-config-spfx": "1.20.1", "@microsoft/eslint-config-spfx": "1.20.2",
"@microsoft/eslint-plugin-spfx": "1.20.1", "@microsoft/eslint-plugin-spfx": "1.20.2",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/rush-stack-compiler-4.7": "0.1.0", "@microsoft/rush-stack-compiler-4.7": "0.1.0",
"@microsoft/sp-build-web": "1.20.1", "@microsoft/sp-build-web": "1.20.2",
"@microsoft/sp-module-interfaces": "1.20.1", "@microsoft/sp-module-interfaces": "1.20.2",
"@rushstack/eslint-config": "2.5.1", "@rushstack/eslint-config": "4.0.1",
"@types/react": "17.0.45", "@types/react": "17.0.45",
"@types/react-dom": "17.0.17", "@types/react-dom": "17.0.17",
"@types/webpack-env": "~1.15.2", "@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"eslint": "8.7.0", "eslint": "8.57.0",
"eslint-plugin-react-hooks": "4.3.0", "eslint-plugin-react-hooks": "4.3.0",
"gulp": "4.0.2", "gulp": "4.0.2",
"spfx-fast-serve-helpers": "~1.19.3", "spfx-fast-serve-helpers": "~1.20.1",
"typescript": "4.7.4" "typescript": "4.7.4"
} }
} }

View File

@ -46,6 +46,7 @@ export class M365HealthService {
try { try {
return await response.clone().json(); return await response.clone().json();
} catch (error) { } catch (error) {
console.log(error);
return await response.text(); return await response.text();
} }
} else { } else {

View File

@ -1,6 +1,6 @@
{ {
"name": "SPFx 1.19.0", "name": "SPFx 1.20.0",
"image": "docker.io/m365pnp/spfx:1.19.0", "image": "docker.io/m365pnp/spfx:1.20.0",
"customizations": { "customizations": {
"vscode": { "vscode": {
"extensions": [ "extensions": [

View File

@ -1,95 +1,63 @@
require('@rushstack/eslint-config/patch/modern-module-resolution'); require("@rushstack/eslint-config/patch/modern-module-resolution");
module.exports = { module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/default'], extends: ["@microsoft/eslint-config-spfx/lib/profiles/default"],
parserOptions: { tsconfigRootDir: __dirname }, parserOptions: { tsconfigRootDir: __dirname },
overrides: [ overrides: [
{ {
files: ['*.ts', '*.tsx'], files: ["*.ts", "*.tsx"],
parser: '@typescript-eslint/parser', parser: "@typescript-eslint/parser",
'parserOptions': { parserOptions: {
'project': './tsconfig.json', project: "./tsconfig.json",
'ecmaVersion': 2018, ecmaVersion: 2018,
'sourceType': 'module' sourceType: "module",
}, },
rules: { rules: {
// Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin // Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/no-new-null': 1, "@rushstack/no-new-null": 1,
// Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin // Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/hoist-jest-mock': 1, "@rushstack/hoist-jest-mock": 1,
// Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security // Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security
'@rushstack/security/no-unsafe-regexp': 1, "@rushstack/security/no-unsafe-regexp": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/adjacent-overload-signatures': 1, "@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. // 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 // 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, // to a person who is reviewing a GitHub diff. This rule makes writing code harder,
// but writing code is a much less important activity than reading it. // but writing code is a much less important activity than reading it.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/explicit-function-return-type': [ "@typescript-eslint/explicit-function-return-type": [
1, 1,
{ {
'allowExpressions': true, allowExpressions: true,
'allowTypedFunctionExpressions': true, allowTypedFunctionExpressions: true,
'allowHigherOrderFunctions': false allowHigherOrderFunctions: false,
} },
], ],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: although this is a recommended rule, it is up to dev to select coding style. // Rationale to disable: although this is a recommended rule, it is up to dev to select coding style.
// Set to 1 (warning) or 2 (error) to enable. // Set to 1 (warning) or 2 (error) to enable.
'@typescript-eslint/explicit-member-accessibility': 0, "@typescript-eslint/explicit-member-accessibility": 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-array-constructor': 1, "@typescript-eslint/no-array-constructor": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// //
// RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript. // RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript.
// This rule should be suppressed only in very special cases such as JSON.stringify() // 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 // 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>". // may be more appropriate such as "unknown", "{}", or "Record<k,V>".
'@typescript-eslint/no-explicit-any': 1, "@typescript-eslint/no-explicit-any": 1,
// RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch() // 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, // 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 // 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, // promise chains are a serious issue. Besides causing errors to be silently ignored,
// they can also cause a NodeJS process to terminate unexpectedly. // they can also cause a NodeJS process to terminate unexpectedly.
'@typescript-eslint/no-floating-promises': 2, "@typescript-eslint/no-floating-promises": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'@typescript-eslint/no-for-in-array': 2, "@typescript-eslint/no-for-in-array": 2,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-misused-new': 2, "@typescript-eslint/no-misused-new": 2,
// RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks // RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks
// a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler // a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler
// optimizations. If you are declaring loose functions/variables, it's better to make them // optimizations. If you are declaring loose functions/variables, it's better to make them
@ -102,12 +70,12 @@ module.exports = {
// dependencies are tracked more conscientiously. // dependencies are tracked more conscientiously.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-namespace': [ "@typescript-eslint/no-namespace": [
1, 1,
{ {
'allowDeclarations': false, allowDeclarations: false,
'allowDefinitionFiles': false allowDefinitionFiles: false,
} },
], ],
// RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)" // RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)"
// that avoids the effort of declaring "title" as a field. This TypeScript feature makes // that avoids the effort of declaring "title" as a field. This TypeScript feature makes
@ -118,235 +86,232 @@ module.exports = {
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Set to 1 (warning) or 2 (error) to enable the rule // Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-parameter-properties': 0, "@typescript-eslint/no-parameter-properties": 0,
// RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code // RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code
// may impact performance. // may impact performance.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-unused-vars': [ "@typescript-eslint/no-unused-vars": [
1, 1,
{ {
'vars': 'all', vars: "all",
// Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code, // Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code,
// the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures // the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures
// that are overriding a base class method or implementing an interface. // that are overriding a base class method or implementing an interface.
'args': 'none' args: "none",
} },
], ],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-use-before-define': [ "@typescript-eslint/no-use-before-define": [
2, 2,
{ {
'functions': false, functions: false,
'classes': true, classes: true,
'variables': true, variables: true,
'enums': true, enums: true,
'typedefs': true typedefs: true,
} },
], ],
// Disallows require statements except in import statements. // Disallows require statements except in import statements.
// In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports. // In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports.
'@typescript-eslint/no-var-requires': 'error', "@typescript-eslint/no-var-requires": "error",
// RATIONALE: The "module" keyword is deprecated except when describing legacy libraries. // RATIONALE: The "module" keyword is deprecated except when describing legacy libraries.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/prefer-namespace-keyword': 1, "@typescript-eslint/prefer-namespace-keyword": 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: it's up to developer to decide if he wants to add type annotations // Rationale to disable: it's up to developer to decide if he wants to add type annotations
// Set to 1 (warning) or 2 (error) to enable the rule // Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-inferrable-types': 0, "@typescript-eslint/no-inferrable-types": 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios // Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios
'@typescript-eslint/no-empty-interface': 0, "@typescript-eslint/no-empty-interface": 0,
// RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake. // RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake.
'accessor-pairs': 1, "accessor-pairs": 1,
// RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking. // RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking.
'dot-notation': [ "dot-notation": [
1, 1,
{ {
'allowPattern': '^_' allowPattern: "^_",
} },
], ],
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
'eqeqeq': 1, eqeqeq: 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'for-direction': 1, "for-direction": 1,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'guard-for-in': 2, "guard-for-in": 2,
// RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time // RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time
// to split up your code. // to split up your code.
'max-lines': ['warn', { max: 2000 }], "max-lines": ["warn", { max: 2000 }],
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-async-promise-executor': 2, "no-async-promise-executor": 2,
// RATIONALE: Deprecated language feature. // RATIONALE: Deprecated language feature.
'no-caller': 2, "no-caller": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-compare-neg-zero': 2, "no-compare-neg-zero": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-cond-assign': 2, "no-cond-assign": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-constant-condition': 1, "no-constant-condition": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-control-regex': 2, "no-control-regex": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-debugger': 1, "no-debugger": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-delete-var': 2, "no-delete-var": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-duplicate-case': 2, "no-duplicate-case": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty': 1, "no-empty": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-character-class': 2, "no-empty-character-class": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-pattern': 1, "no-empty-pattern": 1,
// RATIONALE: Eval is a security concern and a performance concern. // RATIONALE: Eval is a security concern and a performance concern.
'no-eval': 1, "no-eval": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-ex-assign': 2, "no-ex-assign": 2,
// RATIONALE: System types are global and should not be tampered with in a scalable code base. // RATIONALE: System types are global and should not be tampered with in a scalable code base.
// If two different libraries (or two versions of the same library) both try to modify // If two different libraries (or two versions of the same library) both try to modify
// a type, only one of them can win. Polyfills are acceptable because they implement // a type, only one of them can win. Polyfills are acceptable because they implement
// a standardized interoperable contract, but polyfills are generally coded in plain // a standardized interoperable contract, but polyfills are generally coded in plain
// JavaScript. // JavaScript.
'no-extend-native': 1, "no-extend-native": 1,
// Disallow unnecessary labels // Disallow unnecessary labels
'no-extra-label': 1, "no-extra-label": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-fallthrough': 2, "no-fallthrough": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-func-assign': 1, "no-func-assign": 1,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-implied-eval': 2, "no-implied-eval": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-invalid-regexp': 2, "no-invalid-regexp": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-label-var': 2, "no-label-var": 2,
// RATIONALE: Eliminates redundant code. // RATIONALE: Eliminates redundant code.
'no-lone-blocks': 1, "no-lone-blocks": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-misleading-character-class': 2, "no-misleading-character-class": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-multi-str': 2, "no-multi-str": 2,
// RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to // RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to
// a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()", // a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()",
// or else implies that the constructor is doing nontrivial computations, which is often // or else implies that the constructor is doing nontrivial computations, which is often
// a poor class design. // a poor class design.
'no-new': 1, "no-new": 1,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
'no-new-func': 2, "no-new-func": 2,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
'no-new-object': 2, "no-new-object": 2,
// RATIONALE: Obsolete notation. // RATIONALE: Obsolete notation.
'no-new-wrappers': 1, "no-new-wrappers": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-octal': 2, "no-octal": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
'no-octal-escape': 2, "no-octal-escape": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-regex-spaces': 2, "no-regex-spaces": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-return-assign': 2, "no-return-assign": 2,
// RATIONALE: Security risk. // RATIONALE: Security risk.
'no-script-url': 1, "no-script-url": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-self-assign': 2, "no-self-assign": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-self-compare': 2, "no-self-compare": 2,
// RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use // RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use
// commas to create compound expressions. In general code is more readable if each // commas to create compound expressions. In general code is more readable if each
// step is split onto a separate line. This also makes it easier to set breakpoints // step is split onto a separate line. This also makes it easier to set breakpoints
// in the debugger. // in the debugger.
'no-sequences': 1, "no-sequences": 1,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-shadow-restricted-names': 2, "no-shadow-restricted-names": 2,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-sparse-arrays': 2, "no-sparse-arrays": 2,
// RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception, // RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception,
// such flexibility adds pointless complexity, by requiring every catch block to test // such flexibility adds pointless complexity, by requiring every catch block to test
// the type of the object that it receives. Whereas if catch blocks can always assume // the type of the object that it receives. Whereas if catch blocks can always assume
// that their object implements the "Error" contract, then the code is simpler, and // that their object implements the "Error" contract, then the code is simpler, and
// we generally get useful additional information like a call stack. // we generally get useful additional information like a call stack.
'no-throw-literal': 2, "no-throw-literal": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-unmodified-loop-condition': 1, "no-unmodified-loop-condition": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unsafe-finally': 2, "no-unsafe-finally": 2,
// RATIONALE: Catches a common coding mistake. // RATIONALE: Catches a common coding mistake.
'no-unused-expressions': 1, "no-unused-expressions": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unused-labels': 1, "no-unused-labels": 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-useless-catch': 1, "no-useless-catch": 1,
// RATIONALE: Avoids a potential performance problem. // RATIONALE: Avoids a potential performance problem.
'no-useless-concat': 1, "no-useless-concat": 1,
// RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior. // RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior.
// Always use "let" or "const" instead. // Always use "let" or "const" instead.
// //
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'no-var': 2, "no-var": 2,
// RATIONALE: Generally not needed in modern code. // RATIONALE: Generally not needed in modern code.
'no-void': 1, "no-void": 1,
// RATIONALE: Obsolete language feature that is deprecated. // RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-with': 2, "no-with": 2,
// RATIONALE: Makes logic easier to understand, since constants always have a known value // RATIONALE: Makes logic easier to understand, since constants always have a known value
// @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js
'prefer-const': 1, "prefer-const": 1,
// RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused. // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
'promise/param-names': 2, "promise/param-names": 2,
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-atomic-updates': 2, "require-atomic-updates": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-yield': 1, "require-yield": 1,
// "Use strict" is redundant when using the TypeScript compiler. // "Use strict" is redundant when using the TypeScript compiler.
'strict': [ strict: [2, "never"],
2,
'never'
],
// RATIONALE: Catches code that is likely to be incorrect // RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
'use-isnan': 2, "use-isnan": 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js // STANDARDIZED BY: eslint\conf\eslint-recommended.js
// Set to 1 (warning) or 2 (error) to enable. // Set to 1 (warning) or 2 (error) to enable.
// Rationale to disable: !!{} // Rationale to disable: !!{}
'no-extra-boolean-cast': 0, "no-extra-boolean-cast": 0,
// ==================================================================== // ====================================================================
// @microsoft/eslint-plugin-spfx // @microsoft/eslint-plugin-spfx
// ==================================================================== // ====================================================================
'@microsoft/spfx/import-requires-chunk-name': 1, "@microsoft/spfx/import-requires-chunk-name": 1,
'@microsoft/spfx/no-require-ensure': 2, "@microsoft/spfx/no-require-ensure": 2,
'@microsoft/spfx/pair-react-dom-render-unmount': 1 "@microsoft/spfx/pair-react-dom-render-unmount": 1,
} },
}, },
{ {
// For unit tests, we can be a little bit less strict. The settings below revise the // For unit tests, we can be a little bit less strict. The settings below revise the
// defaults specified in the extended configurations, as well as above. // defaults specified in the extended configurations, as well as above.
files: [ files: [
// Test files // Test files
'*.test.ts', "*.test.ts",
'*.test.tsx', "*.test.tsx",
'*.spec.ts', "*.spec.ts",
'*.spec.tsx', "*.spec.tsx",
// Facebook convention // Facebook convention
'**/__mocks__/*.ts', "**/__mocks__/*.ts",
'**/__mocks__/*.tsx', "**/__mocks__/*.tsx",
'**/__tests__/*.ts', "**/__tests__/*.ts",
'**/__tests__/*.tsx', "**/__tests__/*.tsx",
// Microsoft convention // Microsoft convention
'**/test/*.ts', "**/test/*.ts",
'**/test/*.tsx' "**/test/*.tsx",
],
rules: {},
},
], ],
rules: {}
}
]
}; };

View File

@ -5,9 +5,9 @@
"nodeVersion": "16.16.0", "nodeVersion": "16.16.0",
"sdksVersions": { "sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2", "@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.12.0" "@microsoft/teams-js": "2.24.0"
}, },
"version": "1.19.0", "version": "1.20.0",
"libraryName": "react-my-one-drive-info", "libraryName": "react-my-one-drive-info",
"libraryId": "a07f3777-40b2-413e-b024-23234e5142e3", "libraryId": "a07f3777-40b2-413e-b024-23234e5142e3",
"environment": "spo", "environment": "spo",

View File

@ -14,17 +14,17 @@ MyOneDriveInfo solution contains Adaptive card extension for Viva connection wit
## Compatibility ## Compatibility
| :warning: Important | | :warning: Important |
|:---------------------------| | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Every SPFx version is optimally compatible with specific versions of Node.js. In order to be able to build this sample, you need to 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. | | Every SPFx version is optimally compatible with specific versions of Node.js. In order to be able to build this sample, you need to 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. | | Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
This sample is optimally compatible with the following environment configuration: This sample is optimally compatible with the following environment configuration:
![SPFx 1.19.0](https://img.shields.io/badge/SPFx-1.19.0-green.svg) ![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
![Node.js v18](https://img.shields.io/badge/Node.js-v18-green.svg) ![Node.js v18](https://img.shields.io/badge/Node.js-v18-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-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 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") ![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") ![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) ![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) ![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)
@ -45,9 +45,10 @@ For more information about SPFx compatibility, please refer to <https://aka.ms/s
## Version history ## Version history
| Version | Date | Comments | | Version | Date | Comments |
| ------- | ---------------- | --------------- | | ------- | ---------------- | ----------------------------------------------------------------- |
| 1.1 | January 24, 2021 | Initial Release | | 1.1 | January 24, 2021 | Initial Release |
| 1.2 | August 26, 2024 | Upgraded to SPFx 1.19.0 and @fluentui/react-components to 9.54.13 | | 1.2 | August 26, 2024 | Upgraded to SPFx 1.19.0 and @fluentui/react-components to 9.54.13 |
| 1.3 | October 11, 2024 | Upgraded to SPFx 1.20.0 |
## Minimal Path to Awesome ## Minimal Path to Awesome
@ -91,6 +92,6 @@ Finally, if you have an idea for improvement, [make a suggestion](https://github
## Disclaimer ## Disclaimer
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** **THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-my-onedrive-info" /> <img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-my-onedrive-info" />

View File

@ -10,7 +10,7 @@
"MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities" "MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities"
], ],
"creationDateTime": "2023-02-03", "creationDateTime": "2023-02-03",
"updateDateTime": "2024-08-26", "updateDateTime": "2024-10-11",
"products": [ "products": [
"SharePoint" "SharePoint"
], ],
@ -21,7 +21,7 @@
}, },
{ {
"key": "SPFX-VERSION", "key": "SPFX-VERSION",
"value": "1.19.0" "value": "1.20.0"
} }
], ],
"thumbnails": [ "thumbnails": [

File diff suppressed because it is too large Load Diff

View File

@ -13,25 +13,24 @@
"serve": "gulp bundle --custom-serve --max_old_space_size=4096 && fast-serve" "serve": "gulp bundle --custom-serve --max_old_space_size=4096 && fast-serve"
}, },
"dependencies": { "dependencies": {
"@microsoft/sp-adaptive-card-extension-base": "1.19.0", "@microsoft/sp-adaptive-card-extension-base": "1.20.0",
"@microsoft/sp-core-library": "1.19.0", "@microsoft/sp-core-library": "1.20.0",
"@microsoft/sp-property-pane": "1.19.0", "@microsoft/sp-property-pane": "1.20.0",
"tslib": "2.3.1" "tslib": "2.3.1"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/eslint-config-spfx": "1.20.1", "@microsoft/eslint-config-spfx": "1.20.2",
"@microsoft/eslint-plugin-spfx": "1.20.1", "@microsoft/eslint-plugin-spfx": "1.20.2",
"@microsoft/microsoft-graph-types": "^2.25.0", "@microsoft/microsoft-graph-types": "^2.25.0",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/rush-stack-compiler-4.7": "0.1.0", "@microsoft/rush-stack-compiler-4.7": "0.1.0",
"@microsoft/sp-build-web": "1.20.1", "@microsoft/sp-build-web": "1.20.2",
"@microsoft/sp-module-interfaces": "1.20.1", "@microsoft/sp-module-interfaces": "1.20.2",
"@rushstack/eslint-config": "2.5.1", "@rushstack/eslint-config": "4.0.1",
"@types/webpack-env": "~1.15.2", "@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"eslint": "8.7.0", "eslint": "8.57.0",
"gulp": "4.0.2", "gulp": "4.0.2",
"spfx-fast-serve-helpers": "~1.16.0", "spfx-fast-serve-helpers": "~1.20.1",
"typescript": "4.7.4" "typescript": "4.7.4"
} }
} }

View File

@ -20049,9 +20049,9 @@
"dev": true "dev": true
}, },
"node_modules/fast-xml-parser": { "node_modules/fast-xml-parser": {
"version": "4.3.5", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.5.tgz", "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz",
"integrity": "sha512-sWvP1Pl8H03B8oFJpFR3HE31HUfwtX7Rlf9BNsvdpujD4n7WMhfmu8h9wOV2u+c1k0ZilTADhPqypzx2J690ZQ==", "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",

View File

@ -1,7 +1,7 @@
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer // For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
{ {
"name": "SPFx 1.18.2", "name": "SPFx 1.20.0",
"image": "docker.io/m365pnp/spfx:1.18.2", "image": "docker.io/m365pnp/spfx:1.20.0",
// Set *default* container specific settings.json values on container create. // Set *default* container specific settings.json values on container create.
"settings": {}, "settings": {},
// Add the IDs of extensions you want installed when the container is created. // Add the IDs of extensions you want installed when the container is created.

View File

@ -20,39 +20,6 @@ module.exports = {
'@rushstack/security/no-unsafe-regexp': 1, '@rushstack/security/no-unsafe-regexp': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/adjacent-overload-signatures': 1, '@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. // 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 // 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, // to a person who is reviewing a GitHub diff. This rule makes writing code harder,

View File

@ -1 +1 @@
v18.18.0 v18.19.1

View File

@ -2,16 +2,16 @@
"@microsoft/generator-sharepoint": { "@microsoft/generator-sharepoint": {
"isCreatingSolution": true, "isCreatingSolution": true,
"environment": "spo", "environment": "spo",
"version": "1.18.2", "version": "1.20.0",
"libraryName": "react-pages-hierarchy", "libraryName": "react-pages-hierarchy",
"libraryId": "89758fb6-85e2-4e2b-ac88-4f4e7e5f60cb", "libraryId": "89758fb6-85e2-4e2b-ac88-4f4e7e5f60cb",
"packageManager": "npm", "packageManager": "npm",
"isDomainIsolated": false, "isDomainIsolated": false,
"componentType": "webpart", "componentType": "webpart",
"sdkVersions": { "sdkVersions": {
"@microsoft/teams-js": "2.12.0", "@microsoft/teams-js": "2.24.0",
"@microsoft/microsoft-graph-client": "3.0.2" "@microsoft/microsoft-graph-client": "3.0.2"
}, },
"nodeVersion": "18.19.0" "nodeVersion": "18.19.1"
} }
} }

View File

@ -15,7 +15,7 @@ This web part allows users to create a faux page hierarchy in their pages librar
| 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.| | 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. | |Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
![SPFx 1.18.2](https://img.shields.io/badge/SPFx-1.18.2.0-green.svg) ![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0.0-green.svg)
![Node.js v18](https://img.shields.io/badge/Node.js-v18-green.svg) ![Node.js v18](https://img.shields.io/badge/Node.js-v18-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-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) ![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg)
@ -40,6 +40,7 @@ This web part allows users to create a faux page hierarchy in their pages librar
* [Nick Brown](https://github.com/techienickb) * [Nick Brown](https://github.com/techienickb)
* [SlowRobot](https://github.com/SlowRobot) * [SlowRobot](https://github.com/SlowRobot)
* [ruslan-s](https://github.com/ruslan-s) * [ruslan-s](https://github.com/ruslan-s)
* [Tobias Maestrini](https://github.com/tmaestrini)
## Version history ## Version history
@ -52,6 +53,7 @@ Version|Date|Comments
1.5|March 29, 2023|Added support for non-English SitePages library paths 1.5|March 29, 2023|Added support for non-English SitePages library paths
1.6|May 11,2023|Uses treeFrom/expandTo web part properties 1.6|May 11,2023|Uses treeFrom/expandTo web part properties
1.7|January 08|Updated to SPFX 1.18.2 + Node 18 1.7|January 08|Updated to SPFX 1.18.2 + Node 18
1.8|October 13, 2024|Updated to SPFX 1.20.0
## Minimal path to awesome ## Minimal path to awesome

View File

@ -9,7 +9,7 @@
"This web part allows users to create a faux page hierarchy in their pages library and use it for page-to-page navigation." "This web part allows users to create a faux page hierarchy in their pages library and use it for page-to-page navigation."
], ],
"creationDateTime": "2020-04-30", "creationDateTime": "2020-04-30",
"updateDateTime": "2024-01-11", "updateDateTime": "2024-10-12",
"products": [ "products": [
"SharePoint" "SharePoint"
], ],
@ -20,7 +20,7 @@
}, },
{ {
"key": "SPFX-VERSION", "key": "SPFX-VERSION",
"value": "1.18.2" "value": "1.20.0"
}, },
{ {
"key": "SPFX-SUPPORTSTHEMEVARIANTS", "key": "SPFX-SUPPORTSTHEMEVARIANTS",
@ -58,6 +58,11 @@
"gitHubAccount": "SlowRobot", "gitHubAccount": "SlowRobot",
"name": "SlowRobot", "name": "SlowRobot",
"pictureUrl": "https://github.com/SlowRobot.png" "pictureUrl": "https://github.com/SlowRobot.png"
},
{
"gitHubAccount": "tmaestrini",
"name": "Tobias Maestrini",
"pictureUrl": "https://github.com/tmaestrini.png"
} }
], ],
"references": [ "references": [

View File

@ -4,7 +4,7 @@
"name": "react-pages-hierarchy", "name": "react-pages-hierarchy",
"id": "89758fb6-85e2-4e2b-ac88-4f4e7e5f60cb", "id": "89758fb6-85e2-4e2b-ac88-4f4e7e5f60cb",
"title": "Pages Hierarchy", "title": "Pages Hierarchy",
"version": "1.0.7.0", "version": "1.8.0.0",
"includeClientSideAssets": true, "includeClientSideAssets": true,
"isDomainIsolated": false, "isDomainIsolated": false,
"developer": { "developer": {
@ -12,7 +12,7 @@
"privacyUrl": "", "privacyUrl": "",
"termsOfUseUrl": "", "termsOfUseUrl": "",
"websiteUrl": "https://github.com/bogeorge", "websiteUrl": "https://github.com/bogeorge",
"mpnId": "Undefined-1.18.2" "mpnId": "Undefined-1.20.0"
}, },
"metadata": { "metadata": {
"shortDescription": { "shortDescription": {

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "react-pages-hierarchy", "name": "react-pages-hierarchy",
"version": "1.0.2", "version": "1.8.0",
"private": true, "private": true,
"main": "lib/index.js", "main": "lib/index.js",
"engines": { "engines": {
@ -12,36 +12,38 @@
"test": "gulp test" "test": "gulp test"
}, },
"dependencies": { "dependencies": {
"@fluentui/react": "8.85.1",
"@microsoft/sp-adaptive-card-extension-base": "1.20.0",
"@microsoft/sp-component-base": "1.20.0",
"@microsoft/sp-core-library": "1.20.0",
"@microsoft/sp-lodash-subset": "1.20.0",
"@microsoft/sp-office-ui-fabric-core": "1.20.0",
"@microsoft/sp-property-pane": "1.20.0",
"@microsoft/sp-webpart-base": "1.20.0",
"@pnp/sp": "^3.21.0", "@pnp/sp": "^3.21.0",
"@pnp/spfx-controls-react": "^3.16.1", "@pnp/spfx-controls-react": "^3.16.1",
"@pnp/spfx-property-controls": "^3.15.1", "@pnp/spfx-property-controls": "^3.15.1",
"@fluentui/react": "8.85.1",
"@microsoft/sp-component-base": "1.18.2",
"@microsoft/sp-core-library": "1.18.2",
"@microsoft/sp-lodash-subset": "1.18.2",
"@microsoft/sp-office-ui-fabric-core": "1.18.2",
"@microsoft/sp-property-pane": "1.18.2",
"@microsoft/sp-webpart-base": "1.18.2",
"react": "17.0.1", "react": "17.0.1",
"react-dom": "17.0.1", "react-dom": "17.0.1",
"react-resize-detector": "^9.1.1", "react-resize-detector": "^9.1.1",
"tslib": "2.3.1" "tslib": "2.3.1",
"url": "^0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/eslint-config-spfx": "1.18.2", "@microsoft/eslint-config-spfx": "1.20.2",
"@microsoft/eslint-plugin-spfx": "1.18.2", "@microsoft/eslint-plugin-spfx": "1.20.2",
"@microsoft/rush-stack-compiler-4.7": "0.1.0", "@microsoft/rush-stack-compiler-4.7": "0.1.0",
"@microsoft/sp-build-web": "1.18.2", "@microsoft/sp-build-web": "1.20.2",
"@microsoft/sp-module-interfaces": "1.18.2", "@microsoft/sp-module-interfaces": "1.20.2",
"@rushstack/eslint-config": "2.5.1", "@rushstack/eslint-config": "4.0.1",
"@types/react": "17.0.45", "@types/react": "17.0.45",
"@types/react-dom": "17.0.17", "@types/react-dom": "17.0.17",
"@types/webpack-env": "~1.15.2", "@types/webpack-env": "~1.15.2",
"run-sequence": "^2.2.1",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"eslint": "8.7.0", "eslint": "8.57.0",
"eslint-plugin-react-hooks": "4.3.0", "eslint-plugin-react-hooks": "4.3.0",
"gulp": "4.0.2", "gulp": "4.0.2",
"run-sequence": "^2.2.1",
"typescript": "4.7.4" "typescript": "4.7.4"
} }
} }

View File

@ -5,7 +5,6 @@ import { IFetchOptions } from '@pnp/common';
import { FilterParser } from './filterParser'; import { FilterParser } from './filterParser';
import { MockListFactory } from './mocklistfactory'; import { MockListFactory } from './mocklistfactory';
import { parse } from 'url'; import { parse } from 'url';
// import * as FileSaver from 'file-saver';
import { LogHelper, ListTitles } from '@src/utilities'; import { LogHelper, ListTitles } from '@src/utilities';
export class MockResponse { export class MockResponse {