@pnp/cli-microsoft365-spfx-toolkit 1.5.0 → 1.7.0
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/dist/autocomplete.js +1 -1
- package/dist/chili/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.22.0.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.22.1.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002022_DEVDEP_typescript.js +14 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +3 -1
- package/dist/m365/spfx/commands/project/project-model/SassJson.js +3 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002001_DEVDEP_microsoft_sp_build_web.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002004_DEVDEP_gulp.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002007_DEVDEP_ajv.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002030_DEVDEP_microsoft_spfx_web_build_rig.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002031_DEVDEP_rushstack_heft.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002032_DEVDEP_typescript_eslint_parser.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_css_loader.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002035_DEVDEP_types_heft_jest.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010011_YORC_useGulp.js +45 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014003_CODE_launch.js +7 -44
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015010_FILE_gulpfile_js.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015011_FILE_tsconfig_json.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015014_FILE_config_rig_json.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015015_FILE_config_typescript_json.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021004_PKG_scripts_build.js +49 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021005_PKG_scripts_test.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021006_PKG_scripts_clean.js +49 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021007_PKG_scripts_start.js +49 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021008_PKG_scripts_eject_webpack.js +49 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021009_PKG_overrides_rushstack_heft.js +49 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023003_GITIGNORE_libdts.js +40 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023004_GITIGNORE_libcommonjs.js +40 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023005_GITIGNORE_libesm.js +40 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023006_GITIGNORE_jestoutput.js +40 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name.js +61 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount.js +61 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name.js +54 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount.js +54 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN026001_CFG_SASS_schema.js +44 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN026002_CFG_SASS_extends.js +44 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.22.0.js +168 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.22.1.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.4.js +42 -1
- package/dist/m365/spfx/commands/project/project-upgrade.js +3 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +58 -1
- package/dist/m365/spo/commands/page/page-get.js +21 -6
- package/dist/m365/spo/commands/page/page-remove.js +34 -14
- package/dist/request.js +2 -1
- package/dist/utils/stringUtil.js +7 -0
- package/npm-shrinkwrap.json +771 -517
- package/package.json +6 -6
package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021008_PKG_scripts_eject_webpack.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN021008_PKG_scripts_eject_webpack = void 0;
|
|
4
|
+
const JsonRule_1 = require("../../JsonRule");
|
|
5
|
+
class FN021008_PKG_scripts_eject_webpack extends JsonRule_1.JsonRule {
|
|
6
|
+
constructor(script) {
|
|
7
|
+
super();
|
|
8
|
+
this.script = script;
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN021008';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return 'package.json scripts.eject-webpack';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return 'Update package.json scripts.eject-webpack property';
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return `{
|
|
21
|
+
"scripts": {
|
|
22
|
+
"eject-webpack": "${this.script}"
|
|
23
|
+
}
|
|
24
|
+
}`;
|
|
25
|
+
}
|
|
26
|
+
get resolutionType() {
|
|
27
|
+
return 'json';
|
|
28
|
+
}
|
|
29
|
+
get severity() {
|
|
30
|
+
return 'Required';
|
|
31
|
+
}
|
|
32
|
+
get file() {
|
|
33
|
+
return './package.json';
|
|
34
|
+
}
|
|
35
|
+
visit(project, findings) {
|
|
36
|
+
if (!project.packageJson) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!project.packageJson.scripts ||
|
|
40
|
+
typeof project.packageJson.scripts !== 'object' ||
|
|
41
|
+
!project.packageJson.scripts['eject-webpack'] ||
|
|
42
|
+
project.packageJson.scripts['eject-webpack'] !== this.script) {
|
|
43
|
+
const node = this.getAstNodeFromFile(project.packageJson, 'scripts.eject-webpack');
|
|
44
|
+
this.addFindingWithPosition(findings, node);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.FN021008_PKG_scripts_eject_webpack = FN021008_PKG_scripts_eject_webpack;
|
|
49
|
+
//# sourceMappingURL=FN021008_PKG_scripts_eject_webpack.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN021009_PKG_overrides_rushstack_heft = void 0;
|
|
4
|
+
const JsonRule_1 = require("../../JsonRule");
|
|
5
|
+
class FN021009_PKG_overrides_rushstack_heft extends JsonRule_1.JsonRule {
|
|
6
|
+
constructor(version) {
|
|
7
|
+
super();
|
|
8
|
+
this.version = version;
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN021009';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return 'package.json overrides.@rushstack/heft';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return 'Update package.json overrides.@rushstack/heft property';
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return `{
|
|
21
|
+
"overrides": {
|
|
22
|
+
"@rushstack/heft": "${this.version}"
|
|
23
|
+
}
|
|
24
|
+
}`;
|
|
25
|
+
}
|
|
26
|
+
get resolutionType() {
|
|
27
|
+
return 'json';
|
|
28
|
+
}
|
|
29
|
+
get severity() {
|
|
30
|
+
return 'Required';
|
|
31
|
+
}
|
|
32
|
+
get file() {
|
|
33
|
+
return './package.json';
|
|
34
|
+
}
|
|
35
|
+
visit(project, findings) {
|
|
36
|
+
if (!project.packageJson) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!project.packageJson.overrides ||
|
|
40
|
+
typeof project.packageJson.overrides !== 'object' ||
|
|
41
|
+
!project.packageJson.overrides['@rushstack/heft'] ||
|
|
42
|
+
project.packageJson.overrides['@rushstack/heft'] !== this.version) {
|
|
43
|
+
const node = this.getAstNodeFromFile(project.packageJson, 'overrides.@rushstack/heft');
|
|
44
|
+
this.addFindingWithPosition(findings, node);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.FN021009_PKG_overrides_rushstack_heft = FN021009_PKG_overrides_rushstack_heft;
|
|
49
|
+
//# sourceMappingURL=FN021009_PKG_overrides_rushstack_heft.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN023003_GITIGNORE_libdts = void 0;
|
|
4
|
+
const Rule_1 = require("../../Rule");
|
|
5
|
+
class FN023003_GITIGNORE_libdts extends Rule_1.Rule {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
get id() {
|
|
10
|
+
return 'FN023003';
|
|
11
|
+
}
|
|
12
|
+
get title() {
|
|
13
|
+
return `.gitignore 'lib-dts' folder`;
|
|
14
|
+
}
|
|
15
|
+
get description() {
|
|
16
|
+
return `To .gitignore add the 'lib-dts' folder`;
|
|
17
|
+
}
|
|
18
|
+
get resolution() {
|
|
19
|
+
return `lib-dts`;
|
|
20
|
+
}
|
|
21
|
+
get resolutionType() {
|
|
22
|
+
return 'text';
|
|
23
|
+
}
|
|
24
|
+
get severity() {
|
|
25
|
+
return 'Required';
|
|
26
|
+
}
|
|
27
|
+
get file() {
|
|
28
|
+
return './.gitignore';
|
|
29
|
+
}
|
|
30
|
+
visit(project, findings) {
|
|
31
|
+
if (!project.gitignore) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!/^lib-dts$/m.test(project.gitignore.source)) {
|
|
35
|
+
this.addFinding(findings);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.FN023003_GITIGNORE_libdts = FN023003_GITIGNORE_libdts;
|
|
40
|
+
//# sourceMappingURL=FN023003_GITIGNORE_libdts.js.map
|
package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023004_GITIGNORE_libcommonjs.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN023004_GITIGNORE_libcommonjs = void 0;
|
|
4
|
+
const Rule_1 = require("../../Rule");
|
|
5
|
+
class FN023004_GITIGNORE_libcommonjs extends Rule_1.Rule {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
get id() {
|
|
10
|
+
return 'FN023004';
|
|
11
|
+
}
|
|
12
|
+
get title() {
|
|
13
|
+
return `.gitignore 'lib-commonjs' folder`;
|
|
14
|
+
}
|
|
15
|
+
get description() {
|
|
16
|
+
return `To .gitignore add the 'lib-commonjs' folder`;
|
|
17
|
+
}
|
|
18
|
+
get resolution() {
|
|
19
|
+
return `lib-commonjs`;
|
|
20
|
+
}
|
|
21
|
+
get resolutionType() {
|
|
22
|
+
return 'text';
|
|
23
|
+
}
|
|
24
|
+
get severity() {
|
|
25
|
+
return 'Required';
|
|
26
|
+
}
|
|
27
|
+
get file() {
|
|
28
|
+
return './.gitignore';
|
|
29
|
+
}
|
|
30
|
+
visit(project, findings) {
|
|
31
|
+
if (!project.gitignore) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!/^lib-commonjs$/m.test(project.gitignore.source)) {
|
|
35
|
+
this.addFinding(findings);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.FN023004_GITIGNORE_libcommonjs = FN023004_GITIGNORE_libcommonjs;
|
|
40
|
+
//# sourceMappingURL=FN023004_GITIGNORE_libcommonjs.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN023005_GITIGNORE_libesm = void 0;
|
|
4
|
+
const Rule_1 = require("../../Rule");
|
|
5
|
+
class FN023005_GITIGNORE_libesm extends Rule_1.Rule {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
get id() {
|
|
10
|
+
return 'FN023005';
|
|
11
|
+
}
|
|
12
|
+
get title() {
|
|
13
|
+
return `.gitignore 'lib-esm' folder`;
|
|
14
|
+
}
|
|
15
|
+
get description() {
|
|
16
|
+
return `To .gitignore add the 'lib-esm' folder`;
|
|
17
|
+
}
|
|
18
|
+
get resolution() {
|
|
19
|
+
return `lib-esm`;
|
|
20
|
+
}
|
|
21
|
+
get resolutionType() {
|
|
22
|
+
return 'text';
|
|
23
|
+
}
|
|
24
|
+
get severity() {
|
|
25
|
+
return 'Required';
|
|
26
|
+
}
|
|
27
|
+
get file() {
|
|
28
|
+
return './.gitignore';
|
|
29
|
+
}
|
|
30
|
+
visit(project, findings) {
|
|
31
|
+
if (!project.gitignore) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!/^lib-esm$/m.test(project.gitignore.source)) {
|
|
35
|
+
this.addFinding(findings);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.FN023005_GITIGNORE_libesm = FN023005_GITIGNORE_libesm;
|
|
40
|
+
//# sourceMappingURL=FN023005_GITIGNORE_libesm.js.map
|
package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023006_GITIGNORE_jestoutput.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN023006_GITIGNORE_jestoutput = void 0;
|
|
4
|
+
const Rule_1 = require("../../Rule");
|
|
5
|
+
class FN023006_GITIGNORE_jestoutput extends Rule_1.Rule {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
get id() {
|
|
10
|
+
return 'FN023006';
|
|
11
|
+
}
|
|
12
|
+
get title() {
|
|
13
|
+
return `.gitignore 'jest-output' folder`;
|
|
14
|
+
}
|
|
15
|
+
get description() {
|
|
16
|
+
return `To .gitignore add the 'jest-output' folder`;
|
|
17
|
+
}
|
|
18
|
+
get resolution() {
|
|
19
|
+
return `jest-output`;
|
|
20
|
+
}
|
|
21
|
+
get resolutionType() {
|
|
22
|
+
return 'text';
|
|
23
|
+
}
|
|
24
|
+
get severity() {
|
|
25
|
+
return 'Required';
|
|
26
|
+
}
|
|
27
|
+
get file() {
|
|
28
|
+
return './.gitignore';
|
|
29
|
+
}
|
|
30
|
+
visit(project, findings) {
|
|
31
|
+
if (!project.gitignore) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!/^jest-output$/m.test(project.gitignore.source)) {
|
|
35
|
+
this.addFinding(findings);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.FN023006_GITIGNORE_jestoutput = FN023006_GITIGNORE_jestoutput;
|
|
40
|
+
//# sourceMappingURL=FN023006_GITIGNORE_jestoutput.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name = void 0;
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const ts = require("typescript");
|
|
6
|
+
const TsRule_1 = require("./TsRule");
|
|
7
|
+
class FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name extends TsRule_1.TsRule {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
get id() {
|
|
12
|
+
return 'FN025002';
|
|
13
|
+
}
|
|
14
|
+
get title() {
|
|
15
|
+
return '.eslintrc.js override rule @rushstack/import-requires-chunk-name';
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return `Add override rule @rushstack/import-requires-chunk-name in .eslintrc.js`;
|
|
19
|
+
}
|
|
20
|
+
get resolution() {
|
|
21
|
+
return `// Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
|
|
22
|
+
'@rushstack/import-requires-chunk-name': 1,${os.EOL}`;
|
|
23
|
+
}
|
|
24
|
+
get resolutionType() {
|
|
25
|
+
return 'js';
|
|
26
|
+
}
|
|
27
|
+
get severity() {
|
|
28
|
+
return 'Required';
|
|
29
|
+
}
|
|
30
|
+
get file() {
|
|
31
|
+
return './.eslintrc.js';
|
|
32
|
+
}
|
|
33
|
+
visit(project, findings) {
|
|
34
|
+
if (!project.esLintRcJs) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const nodes = project.esLintRcJs.nodes;
|
|
38
|
+
if (!nodes) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const occurrences = [];
|
|
42
|
+
if (nodes
|
|
43
|
+
.filter(node => ts.isPropertyName(node))
|
|
44
|
+
.map(node => node)
|
|
45
|
+
.filter(i => i.getText() === `'@rushstack/import-requires-chunk-name'`).length !== 0) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const node = nodes
|
|
49
|
+
.map(node => node)
|
|
50
|
+
.find(i => i.text === 'rules');
|
|
51
|
+
if (!node) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
55
|
+
if (occurrences.length > 0) {
|
|
56
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name = FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name;
|
|
61
|
+
//# sourceMappingURL=FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount = void 0;
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const ts = require("typescript");
|
|
6
|
+
const TsRule_1 = require("./TsRule");
|
|
7
|
+
class FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount extends TsRule_1.TsRule {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
get id() {
|
|
12
|
+
return 'FN025003';
|
|
13
|
+
}
|
|
14
|
+
get title() {
|
|
15
|
+
return '.eslintrc.js override rule @rushstack/pair-react-dom-render-unmount';
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return `Add override rule @rushstack/pair-react-dom-render-unmount in .eslintrc.js`;
|
|
19
|
+
}
|
|
20
|
+
get resolution() {
|
|
21
|
+
return `// Ensure that React components rendered with ReactDOM.render() are unmounted with ReactDOM.unmountComponentAtNode(). https://www.npmjs.com/package/@rushstack/eslint-plugin
|
|
22
|
+
'@rushstack/pair-react-dom-render-unmount': 1,${os.EOL}`;
|
|
23
|
+
}
|
|
24
|
+
get resolutionType() {
|
|
25
|
+
return 'js';
|
|
26
|
+
}
|
|
27
|
+
get severity() {
|
|
28
|
+
return 'Required';
|
|
29
|
+
}
|
|
30
|
+
get file() {
|
|
31
|
+
return './.eslintrc.js';
|
|
32
|
+
}
|
|
33
|
+
visit(project, findings) {
|
|
34
|
+
if (!project.esLintRcJs) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const nodes = project.esLintRcJs.nodes;
|
|
38
|
+
if (!nodes) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const occurrences = [];
|
|
42
|
+
if (nodes
|
|
43
|
+
.filter(node => ts.isPropertyName(node))
|
|
44
|
+
.map(node => node)
|
|
45
|
+
.filter(i => i.getText() === `'@rushstack/pair-react-dom-render-unmount'`).length !== 0) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const node = nodes
|
|
49
|
+
.map(node => node)
|
|
50
|
+
.find(i => i.text === 'rules');
|
|
51
|
+
if (!node) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
55
|
+
if (occurrences.length > 0) {
|
|
56
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount = FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount;
|
|
61
|
+
//# sourceMappingURL=FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name = void 0;
|
|
4
|
+
const ts = require("typescript");
|
|
5
|
+
const TsRule_1 = require("./TsRule");
|
|
6
|
+
class FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name extends TsRule_1.TsRule {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN025004';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return '.eslintrc.js override rule @microsoft/spfx/import-requires-chunk-name';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return `Remove override rule @microsoft/spfx/import-requires-chunk-name in .eslintrc.js`;
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
get resolutionType() {
|
|
23
|
+
return 'js';
|
|
24
|
+
}
|
|
25
|
+
get severity() {
|
|
26
|
+
return 'Required';
|
|
27
|
+
}
|
|
28
|
+
get file() {
|
|
29
|
+
return './.eslintrc.js';
|
|
30
|
+
}
|
|
31
|
+
visit(project, findings) {
|
|
32
|
+
if (!project.esLintRcJs) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const nodes = project.esLintRcJs.nodes;
|
|
36
|
+
if (!nodes) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const occurrences = [];
|
|
40
|
+
const node = nodes
|
|
41
|
+
.filter(node => ts.isPropertyName(node))
|
|
42
|
+
.map(node => node)
|
|
43
|
+
.find(i => i.getText() === `'@microsoft/spfx/import-requires-chunk-name'`);
|
|
44
|
+
if (!node) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
48
|
+
if (occurrences.length > 0) {
|
|
49
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name = FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name;
|
|
54
|
+
//# sourceMappingURL=FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount = void 0;
|
|
4
|
+
const ts = require("typescript");
|
|
5
|
+
const TsRule_1 = require("./TsRule");
|
|
6
|
+
class FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount extends TsRule_1.TsRule {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN025005';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return '.eslintrc.js override rule @microsoft/spfx/pair-react-dom-render-unmount';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return `Remove override rule @microsoft/spfx/pair-react-dom-render-unmount in .eslintrc.js`;
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
get resolutionType() {
|
|
23
|
+
return 'js';
|
|
24
|
+
}
|
|
25
|
+
get severity() {
|
|
26
|
+
return 'Required';
|
|
27
|
+
}
|
|
28
|
+
get file() {
|
|
29
|
+
return './.eslintrc.js';
|
|
30
|
+
}
|
|
31
|
+
visit(project, findings) {
|
|
32
|
+
if (!project.esLintRcJs) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const nodes = project.esLintRcJs.nodes;
|
|
36
|
+
if (!nodes) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const occurrences = [];
|
|
40
|
+
const node = nodes
|
|
41
|
+
.filter(node => ts.isPropertyName(node))
|
|
42
|
+
.map(node => node)
|
|
43
|
+
.find(i => i.getText() === `'@microsoft/spfx/pair-react-dom-render-unmount'`);
|
|
44
|
+
if (!node) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.addOccurrence(this.resolution, project.esLintRcJs.path, project.path, node, occurrences);
|
|
48
|
+
if (occurrences.length > 0) {
|
|
49
|
+
this.addFindingWithOccurrences(occurrences, findings);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount = FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount;
|
|
54
|
+
//# sourceMappingURL=FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN026001_CFG_SASS_schema = void 0;
|
|
4
|
+
const JsonRule_1 = require("../../JsonRule");
|
|
5
|
+
class FN026001_CFG_SASS_schema extends JsonRule_1.JsonRule {
|
|
6
|
+
constructor(schema) {
|
|
7
|
+
super();
|
|
8
|
+
this.schema = schema;
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN026001';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return 'sass.json schema';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return `Update sass.json schema URL`;
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return `{
|
|
21
|
+
"$schema": "${this.schema}"
|
|
22
|
+
}`;
|
|
23
|
+
}
|
|
24
|
+
get resolutionType() {
|
|
25
|
+
return 'json';
|
|
26
|
+
}
|
|
27
|
+
get severity() {
|
|
28
|
+
return 'Required';
|
|
29
|
+
}
|
|
30
|
+
get file() {
|
|
31
|
+
return './config/sass.json';
|
|
32
|
+
}
|
|
33
|
+
visit(project, findings) {
|
|
34
|
+
if (!project.sassJson) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (project.sassJson.$schema !== this.schema) {
|
|
38
|
+
const node = this.getAstNodeFromFile(project.sassJson, '$schema');
|
|
39
|
+
this.addFindingWithPosition(findings, node);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.FN026001_CFG_SASS_schema = FN026001_CFG_SASS_schema;
|
|
44
|
+
//# sourceMappingURL=FN026001_CFG_SASS_schema.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN026002_CFG_SASS_extends = void 0;
|
|
4
|
+
const JsonRule_1 = require("../../JsonRule");
|
|
5
|
+
class FN026002_CFG_SASS_extends extends JsonRule_1.JsonRule {
|
|
6
|
+
constructor(_extends) {
|
|
7
|
+
super();
|
|
8
|
+
this._extends = _extends;
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN026002';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return 'sass.json extends';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return `Update sass.json extends property`;
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return `{
|
|
21
|
+
"extends": "${this._extends}"
|
|
22
|
+
}`;
|
|
23
|
+
}
|
|
24
|
+
get resolutionType() {
|
|
25
|
+
return 'json';
|
|
26
|
+
}
|
|
27
|
+
get severity() {
|
|
28
|
+
return 'Required';
|
|
29
|
+
}
|
|
30
|
+
get file() {
|
|
31
|
+
return './config/sass.json';
|
|
32
|
+
}
|
|
33
|
+
visit(project, findings) {
|
|
34
|
+
if (!project.sassJson) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (project.sassJson.extends !== this._extends) {
|
|
38
|
+
const node = this.getAstNodeFromFile(project.sassJson, 'extends');
|
|
39
|
+
this.addFindingWithPosition(findings, node);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.FN026002_CFG_SASS_extends = FN026002_CFG_SASS_extends;
|
|
44
|
+
//# sourceMappingURL=FN026002_CFG_SASS_extends.js.map
|