@pnp/cli-microsoft365 11.1.0 → 11.2.0-beta.7eeb404
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devproxy/api-specs/sharepoint.yaml +38 -15
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/commands/docs.js +5 -0
- package/dist/m365/entra/commands/multitenant/multitenant-add.js +10 -28
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.22.0-beta.1.js → doctor-1.22.0-rc.0.js} +3 -3
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_css_loader.js +10 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js +10 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002035_DEVDEP_types_heft_jest.js +10 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021014_PKG_scripts_test_only.js +45 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021015_PKG_scripts_trust_dev_cert.js +45 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021016_PKG_scripts_untrust_dev_cert.js +45 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name.js +50 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount.js +50 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.22.0-beta.1.js → upgrade-1.22.0-rc.0.js} +56 -141
- package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +4 -0
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +8 -2
- package/dist/m365/spo/commands/commandset/commandset-add.js +4 -0
- package/dist/m365/spo/commands/commandset/commandset-set.js +8 -1
- package/dist/m365/spo/commands/site/site-versionpolicy-get.js +69 -0
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/channel/channel-add.js +13 -33
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-get.mdx +20 -1
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-list.mdx +22 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +3 -0
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +3 -0
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +3 -0
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +3 -0
- package/docs/docs/cmd/spo/site/site-versionpolicy-get.mdx +97 -0
- package/npm-shrinkwrap.json +1356 -663
- package/package.json +18 -18
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_jest_junit.js +0 -10
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015012_FILE_config_heft_json.js +0 -10
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015013_FILE_config_jest_config_json.js +0 -10
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { cli } from '../../cli/cli.js';
|
|
2
|
+
import { globalOptionsZod } from '../../Command.js';
|
|
2
3
|
import { settingsNames } from '../../settingsNames.js';
|
|
3
4
|
import { app } from '../../utils/app.js';
|
|
4
5
|
import { browserUtil } from '../../utils/browserUtil.js';
|
|
5
6
|
import AnonymousCommand from '../base/AnonymousCommand.js';
|
|
6
7
|
import commands from './commands.js';
|
|
8
|
+
const options = globalOptionsZod.strict();
|
|
7
9
|
class DocsCommand extends AnonymousCommand {
|
|
8
10
|
get name() {
|
|
9
11
|
return commands.DOCS;
|
|
@@ -11,6 +13,9 @@ class DocsCommand extends AnonymousCommand {
|
|
|
11
13
|
get description() {
|
|
12
14
|
return 'Returns the CLI for Microsoft 365 docs webpage URL';
|
|
13
15
|
}
|
|
16
|
+
get schema() {
|
|
17
|
+
return options;
|
|
18
|
+
}
|
|
14
19
|
async commandAction(logger) {
|
|
15
20
|
await logger.log(app.packageJson().homepage);
|
|
16
21
|
if (cli.getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false) === false) {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _EntraMultitenantAddCommand_instances, _EntraMultitenantAddCommand_initTelemetry, _EntraMultitenantAddCommand_initOptions, _EntraMultitenantAddCommand_initTypes;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
6
|
+
import { zod } from '../../../../utils/zod.js';
|
|
7
|
+
const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
displayName: zod.alias('n', z.string()),
|
|
10
|
+
description: zod.alias('d', z.string().optional())
|
|
11
|
+
}).strict();
|
|
10
12
|
class EntraMultitenantAddCommand extends GraphCommand {
|
|
11
13
|
get name() {
|
|
12
14
|
return commands.MULTITENANT_ADD;
|
|
@@ -14,12 +16,8 @@ class EntraMultitenantAddCommand extends GraphCommand {
|
|
|
14
16
|
get description() {
|
|
15
17
|
return 'Creates a new multitenant organization';
|
|
16
18
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_EntraMultitenantAddCommand_instances.add(this);
|
|
20
|
-
__classPrivateFieldGet(this, _EntraMultitenantAddCommand_instances, "m", _EntraMultitenantAddCommand_initTelemetry).call(this);
|
|
21
|
-
__classPrivateFieldGet(this, _EntraMultitenantAddCommand_instances, "m", _EntraMultitenantAddCommand_initOptions).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraMultitenantAddCommand_instances, "m", _EntraMultitenantAddCommand_initTypes).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
23
21
|
}
|
|
24
22
|
async commandAction(logger, args) {
|
|
25
23
|
if (this.verbose) {
|
|
@@ -45,21 +43,5 @@ class EntraMultitenantAddCommand extends GraphCommand {
|
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
|
-
_EntraMultitenantAddCommand_instances = new WeakSet(), _EntraMultitenantAddCommand_initTelemetry = function _EntraMultitenantAddCommand_initTelemetry() {
|
|
49
|
-
this.telemetry.push((args) => {
|
|
50
|
-
Object.assign(this.telemetryProperties, {
|
|
51
|
-
displayName: typeof args.options.displayName !== 'undefined',
|
|
52
|
-
description: typeof args.options.description !== 'undefined'
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}, _EntraMultitenantAddCommand_initOptions = function _EntraMultitenantAddCommand_initOptions() {
|
|
56
|
-
this.options.unshift({
|
|
57
|
-
option: '-n, --displayName <displayName>'
|
|
58
|
-
}, {
|
|
59
|
-
option: '-d, --description [description]'
|
|
60
|
-
});
|
|
61
|
-
}, _EntraMultitenantAddCommand_initTypes = function _EntraMultitenantAddCommand_initTypes() {
|
|
62
|
-
this.types.string.push('displayName', 'description');
|
|
63
|
-
};
|
|
64
46
|
export default new EntraMultitenantAddCommand();
|
|
65
47
|
//# sourceMappingURL=multitenant-add.js.map
|
|
@@ -14,8 +14,8 @@ export default [
|
|
|
14
14
|
new FN002013_DEVDEP_types_webpack_env('~1.15.2'),
|
|
15
15
|
new FN002015_DEVDEP_types_react('17'),
|
|
16
16
|
new FN002016_DEVDEP_types_react_dom('17'),
|
|
17
|
-
new FN002021_DEVDEP_rushstack_eslint_config('4.
|
|
18
|
-
new FN002022_DEVDEP_typescript('5.
|
|
17
|
+
new FN002021_DEVDEP_rushstack_eslint_config('4.5.2'),
|
|
18
|
+
new FN002022_DEVDEP_typescript('~5.8.0'),
|
|
19
19
|
new FN021001_PKG_spfx_deps_versions_match_project_version(true)
|
|
20
20
|
];
|
|
21
|
-
//# sourceMappingURL=doctor-1.22.0-
|
|
21
|
+
//# sourceMappingURL=doctor-1.22.0-rc.0.js.map
|
|
@@ -74,7 +74,7 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
|
|
|
74
74
|
'1.20.0',
|
|
75
75
|
'1.21.0',
|
|
76
76
|
'1.21.1',
|
|
77
|
-
'1.22.0-
|
|
77
|
+
'1.22.0-rc.0'
|
|
78
78
|
];
|
|
79
79
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
|
|
80
80
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DependencyRule } from "./DependencyRule.js";
|
|
2
2
|
export class FN001034_DEP_microsoft_sp_adaptive_card_extension_base extends DependencyRule {
|
|
3
3
|
constructor(packageVersion) {
|
|
4
|
-
super('@microsoft/sp-adaptive-card-extension-base', packageVersion, false,
|
|
4
|
+
super('@microsoft/sp-adaptive-card-extension-base', packageVersion, false, true);
|
|
5
5
|
}
|
|
6
6
|
get id() {
|
|
7
7
|
return 'FN001034';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DependencyRule } from "./DependencyRule.js";
|
|
2
|
+
export class FN002033_DEVDEP_css_loader extends DependencyRule {
|
|
3
|
+
constructor(packageVersion) {
|
|
4
|
+
super('css-loader', packageVersion, true);
|
|
5
|
+
}
|
|
6
|
+
get id() {
|
|
7
|
+
return 'FN002033';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=FN002033_DEVDEP_css_loader.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DependencyRule } from "./DependencyRule.js";
|
|
2
|
+
export class FN002034_DEVDEP_microsoft_spfx_heft_plugins extends DependencyRule {
|
|
3
|
+
constructor(packageVersion) {
|
|
4
|
+
super('@microsoft/spfx-heft-plugins', packageVersion, true);
|
|
5
|
+
}
|
|
6
|
+
get id() {
|
|
7
|
+
return 'FN002034';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=FN002034_DEVDEP_microsoft_spfx_heft_plugins.js.map
|
package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002035_DEVDEP_types_heft_jest.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DependencyRule } from "./DependencyRule.js";
|
|
2
|
+
export class FN002035_DEVDEP_types_heft_jest extends DependencyRule {
|
|
3
|
+
constructor(packageVersion) {
|
|
4
|
+
super('@types/heft-jest', packageVersion, true);
|
|
5
|
+
}
|
|
6
|
+
get id() {
|
|
7
|
+
return 'FN002035';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=FN002035_DEVDEP_types_heft_jest.js.map
|
package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021014_PKG_scripts_test_only.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { JsonRule } from "../../JsonRule.js";
|
|
2
|
+
export class FN021014_PKG_scripts_test_only extends JsonRule {
|
|
3
|
+
constructor(script) {
|
|
4
|
+
super();
|
|
5
|
+
this.script = script;
|
|
6
|
+
}
|
|
7
|
+
get id() {
|
|
8
|
+
return 'FN021014';
|
|
9
|
+
}
|
|
10
|
+
get title() {
|
|
11
|
+
return 'package.json scripts.test-only';
|
|
12
|
+
}
|
|
13
|
+
get description() {
|
|
14
|
+
return 'Add package.json scripts.test-only property';
|
|
15
|
+
}
|
|
16
|
+
get resolution() {
|
|
17
|
+
return `{
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test-only": "${this.script}"
|
|
20
|
+
}
|
|
21
|
+
}`;
|
|
22
|
+
}
|
|
23
|
+
get resolutionType() {
|
|
24
|
+
return 'json';
|
|
25
|
+
}
|
|
26
|
+
get severity() {
|
|
27
|
+
return 'Required';
|
|
28
|
+
}
|
|
29
|
+
get file() {
|
|
30
|
+
return './package.json';
|
|
31
|
+
}
|
|
32
|
+
visit(project, findings) {
|
|
33
|
+
if (!project.packageJson) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!project.packageJson.scripts ||
|
|
37
|
+
typeof project.packageJson.scripts !== 'object' ||
|
|
38
|
+
!project.packageJson.scripts['test-only'] ||
|
|
39
|
+
project.packageJson.scripts['test-only'] !== this.script) {
|
|
40
|
+
const node = this.getAstNodeFromFile(project.packageJson, 'scripts.test-only');
|
|
41
|
+
this.addFindingWithPosition(findings, node);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=FN021014_PKG_scripts_test_only.js.map
|
package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021015_PKG_scripts_trust_dev_cert.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { JsonRule } from "../../JsonRule.js";
|
|
2
|
+
export class FN021015_PKG_scripts_trust_dev_cert extends JsonRule {
|
|
3
|
+
constructor(script) {
|
|
4
|
+
super();
|
|
5
|
+
this.script = script;
|
|
6
|
+
}
|
|
7
|
+
get id() {
|
|
8
|
+
return 'FN021015';
|
|
9
|
+
}
|
|
10
|
+
get title() {
|
|
11
|
+
return 'package.json scripts.trust-dev-cert';
|
|
12
|
+
}
|
|
13
|
+
get description() {
|
|
14
|
+
return 'Add package.json scripts.trust-dev-cert property';
|
|
15
|
+
}
|
|
16
|
+
get resolution() {
|
|
17
|
+
return `{
|
|
18
|
+
"scripts": {
|
|
19
|
+
"trust-dev-cert": "${this.script}"
|
|
20
|
+
}
|
|
21
|
+
}`;
|
|
22
|
+
}
|
|
23
|
+
get resolutionType() {
|
|
24
|
+
return 'json';
|
|
25
|
+
}
|
|
26
|
+
get severity() {
|
|
27
|
+
return 'Required';
|
|
28
|
+
}
|
|
29
|
+
get file() {
|
|
30
|
+
return './package.json';
|
|
31
|
+
}
|
|
32
|
+
visit(project, findings) {
|
|
33
|
+
if (!project.packageJson) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!project.packageJson.scripts ||
|
|
37
|
+
typeof project.packageJson.scripts !== 'object' ||
|
|
38
|
+
!project.packageJson.scripts['trust-dev-cert'] ||
|
|
39
|
+
project.packageJson.scripts['trust-dev-cert'] !== this.script) {
|
|
40
|
+
const node = this.getAstNodeFromFile(project.packageJson, 'scripts.trust-dev-cert');
|
|
41
|
+
this.addFindingWithPosition(findings, node);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=FN021015_PKG_scripts_trust_dev_cert.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { JsonRule } from "../../JsonRule.js";
|
|
2
|
+
export class FN021016_PKG_scripts_untrust_dev_cert extends JsonRule {
|
|
3
|
+
constructor(script) {
|
|
4
|
+
super();
|
|
5
|
+
this.script = script;
|
|
6
|
+
}
|
|
7
|
+
get id() {
|
|
8
|
+
return 'FN021016';
|
|
9
|
+
}
|
|
10
|
+
get title() {
|
|
11
|
+
return 'package.json scripts.untrust-dev-cert';
|
|
12
|
+
}
|
|
13
|
+
get description() {
|
|
14
|
+
return 'Add package.json scripts.untrust-dev-cert property';
|
|
15
|
+
}
|
|
16
|
+
get resolution() {
|
|
17
|
+
return `{
|
|
18
|
+
"scripts": {
|
|
19
|
+
"untrust-dev-cert": "${this.script}"
|
|
20
|
+
}
|
|
21
|
+
}`;
|
|
22
|
+
}
|
|
23
|
+
get resolutionType() {
|
|
24
|
+
return 'json';
|
|
25
|
+
}
|
|
26
|
+
get severity() {
|
|
27
|
+
return 'Required';
|
|
28
|
+
}
|
|
29
|
+
get file() {
|
|
30
|
+
return './package.json';
|
|
31
|
+
}
|
|
32
|
+
visit(project, findings) {
|
|
33
|
+
if (!project.packageJson) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!project.packageJson.scripts ||
|
|
37
|
+
typeof project.packageJson.scripts !== 'object' ||
|
|
38
|
+
!project.packageJson.scripts['untrust-dev-cert'] ||
|
|
39
|
+
project.packageJson.scripts['untrust-dev-cert'] !== this.script) {
|
|
40
|
+
const node = this.getAstNodeFromFile(project.packageJson, 'scripts.untrust-dev-cert');
|
|
41
|
+
this.addFindingWithPosition(findings, node);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=FN021016_PKG_scripts_untrust_dev_cert.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import os from 'os';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
import { TsRule } from './TsRule.js';
|
|
4
|
+
export class FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name extends TsRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
get id() {
|
|
9
|
+
return 'FN025002';
|
|
10
|
+
}
|
|
11
|
+
get title() {
|
|
12
|
+
return '.eslintrc.js override rule @rushstack/import-requires-chunk-name';
|
|
13
|
+
}
|
|
14
|
+
get description() {
|
|
15
|
+
return `Add override rule @rushstack/import-requires-chunk-name in .eslintrc.js`;
|
|
16
|
+
}
|
|
17
|
+
get resolution() {
|
|
18
|
+
return `// Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
|
|
19
|
+
'@rushstack/import-requires-chunk-name': 1,${os.EOL}`;
|
|
20
|
+
}
|
|
21
|
+
get resolutionType() {
|
|
22
|
+
return 'js';
|
|
23
|
+
}
|
|
24
|
+
get severity() {
|
|
25
|
+
return 'Required';
|
|
26
|
+
}
|
|
27
|
+
get file() {
|
|
28
|
+
return './.eslintrc.js';
|
|
29
|
+
}
|
|
30
|
+
visit(project, findings) {
|
|
31
|
+
if (!project.esLintRcJs) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const nodes = project.esLintRcJs.nodes;
|
|
35
|
+
if (!nodes) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const occurrences = [];
|
|
39
|
+
if (nodes
|
|
40
|
+
.filter(node => ts.isPropertyName(node))
|
|
41
|
+
.map(node => node)
|
|
42
|
+
.filter(i => i.getText() === `'@rushstack/import-requires-chunk-name'`).length !== 0) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const node = nodes
|
|
46
|
+
.map(node => node)
|
|
47
|
+
.find(i => i.text === 'rules');
|
|
48
|
+
if (!node) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
52
|
+
if (occurrences.length > 0) {
|
|
53
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import os from 'os';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
import { TsRule } from './TsRule.js';
|
|
4
|
+
export class FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount extends TsRule {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
get id() {
|
|
9
|
+
return 'FN025003';
|
|
10
|
+
}
|
|
11
|
+
get title() {
|
|
12
|
+
return '.eslintrc.js override rule @rushstack/pair-react-dom-render-unmount';
|
|
13
|
+
}
|
|
14
|
+
get description() {
|
|
15
|
+
return `Add override rule @rushstack/pair-react-dom-render-unmount in .eslintrc.js`;
|
|
16
|
+
}
|
|
17
|
+
get resolution() {
|
|
18
|
+
return `// Ensure that React components rendered with ReactDOM.render() are unmounted with ReactDOM.unmountComponentAtNode(). https://www.npmjs.com/package/@rushstack/eslint-plugin
|
|
19
|
+
'@rushstack/pair-react-dom-render-unmount': 1,${os.EOL}`;
|
|
20
|
+
}
|
|
21
|
+
get resolutionType() {
|
|
22
|
+
return 'js';
|
|
23
|
+
}
|
|
24
|
+
get severity() {
|
|
25
|
+
return 'Required';
|
|
26
|
+
}
|
|
27
|
+
get file() {
|
|
28
|
+
return './.eslintrc.js';
|
|
29
|
+
}
|
|
30
|
+
visit(project, findings) {
|
|
31
|
+
if (!project.esLintRcJs) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const nodes = project.esLintRcJs.nodes;
|
|
35
|
+
if (!nodes) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const occurrences = [];
|
|
39
|
+
if (nodes
|
|
40
|
+
.filter(node => ts.isPropertyName(node))
|
|
41
|
+
.map(node => node)
|
|
42
|
+
.filter(i => i.getText() === `'@rushstack/pair-react-dom-render-unmount'`).length !== 0) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const node = nodes
|
|
46
|
+
.map(node => node)
|
|
47
|
+
.find(i => i.text === 'rules');
|
|
48
|
+
if (!node) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
52
|
+
if (occurrences.length > 0) {
|
|
53
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import { TsRule } from './TsRule.js';
|
|
3
|
+
export class FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name extends TsRule {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
}
|
|
7
|
+
get id() {
|
|
8
|
+
return 'FN025004';
|
|
9
|
+
}
|
|
10
|
+
get title() {
|
|
11
|
+
return '.eslintrc.js override rule @microsoft/spfx/import-requires-chunk-name';
|
|
12
|
+
}
|
|
13
|
+
get description() {
|
|
14
|
+
return `Remove override rule @microsoft/spfx/import-requires-chunk-name in .eslintrc.js`;
|
|
15
|
+
}
|
|
16
|
+
get resolution() {
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
19
|
+
get resolutionType() {
|
|
20
|
+
return 'js';
|
|
21
|
+
}
|
|
22
|
+
get severity() {
|
|
23
|
+
return 'Required';
|
|
24
|
+
}
|
|
25
|
+
get file() {
|
|
26
|
+
return './.eslintrc.js';
|
|
27
|
+
}
|
|
28
|
+
visit(project, findings) {
|
|
29
|
+
if (!project.esLintRcJs) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const nodes = project.esLintRcJs.nodes;
|
|
33
|
+
if (!nodes) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const occurrences = [];
|
|
37
|
+
const node = nodes
|
|
38
|
+
.filter(node => ts.isPropertyName(node))
|
|
39
|
+
.map(node => node)
|
|
40
|
+
.find(i => i.getText() === `'@microsoft/spfx/import-requires-chunk-name'`);
|
|
41
|
+
if (!node) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
45
|
+
if (occurrences.length > 0) {
|
|
46
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import { TsRule } from './TsRule.js';
|
|
3
|
+
export class FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount extends TsRule {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
}
|
|
7
|
+
get id() {
|
|
8
|
+
return 'FN025005';
|
|
9
|
+
}
|
|
10
|
+
get title() {
|
|
11
|
+
return '.eslintrc.js override rule @microsoft/spfx/pair-react-dom-render-unmount';
|
|
12
|
+
}
|
|
13
|
+
get description() {
|
|
14
|
+
return `Remove override rule @microsoft/spfx/pair-react-dom-render-unmount in .eslintrc.js`;
|
|
15
|
+
}
|
|
16
|
+
get resolution() {
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
19
|
+
get resolutionType() {
|
|
20
|
+
return 'js';
|
|
21
|
+
}
|
|
22
|
+
get severity() {
|
|
23
|
+
return 'Required';
|
|
24
|
+
}
|
|
25
|
+
get file() {
|
|
26
|
+
return './.eslintrc.js';
|
|
27
|
+
}
|
|
28
|
+
visit(project, findings) {
|
|
29
|
+
if (!project.esLintRcJs) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const nodes = project.esLintRcJs.nodes;
|
|
33
|
+
if (!nodes) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const occurrences = [];
|
|
37
|
+
const node = nodes
|
|
38
|
+
.filter(node => ts.isPropertyName(node))
|
|
39
|
+
.map(node => node)
|
|
40
|
+
.find(i => i.getText() === `'@microsoft/spfx/pair-react-dom-render-unmount'`);
|
|
41
|
+
if (!node) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
45
|
+
if (occurrences.length > 0) {
|
|
46
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount.js.map
|