diff --git a/.projen/deps.json b/.projen/deps.json index ff6921ddd..1d0bd1727 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -40,6 +40,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "nx", "type": "build" diff --git a/.projenrc.ts b/.projenrc.ts index 185561dc9..d7ce8aac0 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -29,12 +29,15 @@ function configureProject(x: A): A { '@cdklabs/eslint-plugin', 'eslint-plugin-import', 'eslint-plugin-jest', + "eslint-plugin-jsdoc", ); x.eslint?.addPlugins( '@typescript-eslint', + 'import', '@cdklabs', '@stylistic', 'jest', + 'jsdoc', ); x.eslint?.addExtends( 'plugin:jest/recommended', @@ -130,7 +133,6 @@ const repo = configureProject( eslintOptions: { dirs: ['lib'], devdirs: ['test'], - }, workflowNodeVersion: 'lts/*', diff --git a/package.json b/package.json index 029fded31..6e3484264 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "constructs": "^10.0.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "nx": "^20.4.5", "prettier": "^2.8", "projen": "^0.91.12", diff --git a/packages/@aws-cdk/cdk-build-tools/.eslintrc.json b/packages/@aws-cdk/cdk-build-tools/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/@aws-cdk/cdk-build-tools/.eslintrc.json +++ b/packages/@aws-cdk/cdk-build-tools/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/cdk-build-tools/.projen/deps.json b/packages/@aws-cdk/cdk-build-tools/.projen/deps.json index 6a478e733..b4c31b846 100644 --- a/packages/@aws-cdk/cdk-build-tools/.projen/deps.json +++ b/packages/@aws-cdk/cdk-build-tools/.projen/deps.json @@ -53,6 +53,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/cdk-build-tools/.projen/tasks.json b/packages/@aws-cdk/cdk-build-tools/.projen/tasks.json index 4d1e5a298..788e6077d 100644 --- a/packages/@aws-cdk/cdk-build-tools/.projen/tasks.json +++ b/packages/@aws-cdk/cdk-build-tools/.projen/tasks.json @@ -37,7 +37,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,ts-jest" } ] }, diff --git a/packages/@aws-cdk/cdk-build-tools/package.json b/packages/@aws-cdk/cdk-build-tools/package.json index 4a2df01af..4a216db30 100644 --- a/packages/@aws-cdk/cdk-build-tools/package.json +++ b/packages/@aws-cdk/cdk-build-tools/package.json @@ -53,6 +53,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json b/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json +++ b/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.projen/deps.json b/packages/@aws-cdk/cdk-cli-wrapper/.projen/deps.json index f7a817fac..78023756e 100644 --- a/packages/@aws-cdk/cdk-cli-wrapper/.projen/deps.json +++ b/packages/@aws-cdk/cdk-cli-wrapper/.projen/deps.json @@ -60,6 +60,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json b/packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json index a9f4be0d0..f5f11d08d 100644 --- a/packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json +++ b/packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json @@ -37,7 +37,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@aws-cdk/integ-runner,@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,aws-cdk-lib,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@aws-cdk/integ-runner,@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,aws-cdk-lib,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,ts-jest" } ] }, diff --git a/packages/@aws-cdk/cdk-cli-wrapper/package.json b/packages/@aws-cdk/cdk-cli-wrapper/package.json index 9cb8a39b6..8b28e986c 100644 --- a/packages/@aws-cdk/cdk-cli-wrapper/package.json +++ b/packages/@aws-cdk/cdk-cli-wrapper/package.json @@ -46,6 +46,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/cli-lib-alpha/.eslintrc.json b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.json index 0d81153b4..59081278a 100644 --- a/packages/@aws-cdk/cli-lib-alpha/.eslintrc.json +++ b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -136,6 +137,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -154,6 +158,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -208,6 +215,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -229,6 +273,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/cli-lib-alpha/.projen/deps.json b/packages/@aws-cdk/cli-lib-alpha/.projen/deps.json index 9dd249849..c0393ca2c 100644 --- a/packages/@aws-cdk/cli-lib-alpha/.projen/deps.json +++ b/packages/@aws-cdk/cli-lib-alpha/.projen/deps.json @@ -61,6 +61,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json b/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json index 5a0b6e877..2ad251abc 100644 --- a/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json +++ b/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json @@ -52,7 +52,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,aws-cdk-lib,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,jsii-diff,jsii-pacmak,license-checker,projen,ts-jest" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,aws-cdk-lib,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,jsii-diff,jsii-pacmak,license-checker,projen,ts-jest" } ] }, diff --git a/packages/@aws-cdk/cli-lib-alpha/package.json b/packages/@aws-cdk/cli-lib-alpha/package.json index d59ead3d8..0d40c6267 100644 --- a/packages/@aws-cdk/cli-lib-alpha/package.json +++ b/packages/@aws-cdk/cli-lib-alpha/package.json @@ -54,6 +54,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/cli-plugin-contract/.eslintrc.json b/packages/@aws-cdk/cli-plugin-contract/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/@aws-cdk/cli-plugin-contract/.eslintrc.json +++ b/packages/@aws-cdk/cli-plugin-contract/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/cli-plugin-contract/.projen/deps.json b/packages/@aws-cdk/cli-plugin-contract/.projen/deps.json index 09b756639..9471986fb 100644 --- a/packages/@aws-cdk/cli-plugin-contract/.projen/deps.json +++ b/packages/@aws-cdk/cli-plugin-contract/.projen/deps.json @@ -48,6 +48,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json b/packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json index 56b74c8bb..08eeb555c 100644 --- a/packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json +++ b/packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json @@ -37,7 +37,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,ts-jest" } ] }, diff --git a/packages/@aws-cdk/cli-plugin-contract/package.json b/packages/@aws-cdk/cli-plugin-contract/package.json index 053cb49f2..9204949bf 100644 --- a/packages/@aws-cdk/cli-plugin-contract/package.json +++ b/packages/@aws-cdk/cli-plugin-contract/package.json @@ -42,6 +42,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json b/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json +++ b/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/cloud-assembly-schema/.projen/deps.json b/packages/@aws-cdk/cloud-assembly-schema/.projen/deps.json index c983c7e98..fffedbe99 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/.projen/deps.json +++ b/packages/@aws-cdk/cloud-assembly-schema/.projen/deps.json @@ -57,6 +57,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json b/packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json index 4728e3314..99d5d5580 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json +++ b/packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json @@ -52,7 +52,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/semver,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,jsii-diff,jsii-pacmak,license-checker,mock-fs,projen,ts-jest,tsx,typescript-json-schema,semver" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/semver,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,jsii-diff,jsii-pacmak,license-checker,mock-fs,projen,ts-jest,tsx,typescript-json-schema,semver" } ] }, diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 69c54be97..32bef224a 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -52,6 +52,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/integ-tests.test.ts b/packages/@aws-cdk/cloud-assembly-schema/test/integ-tests.test.ts index a5ccae429..3baefc89d 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/test/integ-tests.test.ts +++ b/packages/@aws-cdk/cloud-assembly-schema/test/integ-tests.test.ts @@ -27,7 +27,7 @@ describe('Integration test', () => { notificationArns: ['arn1', 'arn2'], execute: true, parameters: { - MYPARAM: 'Value', + 'MYPARAM': 'Value', 'Stack1:OtherParam': 'OtherValue', }, usePreviousParameters: true, diff --git a/packages/@aws-cdk/cloudformation-diff/.eslintrc.json b/packages/@aws-cdk/cloudformation-diff/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/@aws-cdk/cloudformation-diff/.eslintrc.json +++ b/packages/@aws-cdk/cloudformation-diff/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/cloudformation-diff/.projen/deps.json b/packages/@aws-cdk/cloudformation-diff/.projen/deps.json index b5798efd4..486d0e425 100644 --- a/packages/@aws-cdk/cloudformation-diff/.projen/deps.json +++ b/packages/@aws-cdk/cloudformation-diff/.projen/deps.json @@ -57,6 +57,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/cloudformation-diff/.projen/tasks.json b/packages/@aws-cdk/cloudformation-diff/.projen/tasks.json index 36a826ef0..4293eb3c1 100644 --- a/packages/@aws-cdk/cloudformation-diff/.projen/tasks.json +++ b/packages/@aws-cdk/cloudformation-diff/.projen/tasks.json @@ -52,7 +52,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@aws-sdk/client-cloudformation,@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,fast-check,jest,license-checker,projen,ts-jest,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,diff,fast-deep-equal" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@aws-sdk/client-cloudformation,@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,fast-check,jest,license-checker,projen,ts-jest,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,diff,fast-deep-equal" } ] }, diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 79779c0b5..20f58a878 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -45,6 +45,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "fast-check": "^3.23.2", "jest": "^29.7.0", diff --git a/packages/@aws-cdk/node-bundle/.eslintrc.json b/packages/@aws-cdk/node-bundle/.eslintrc.json index 9ca97e328..fffe010da 100644 --- a/packages/@aws-cdk/node-bundle/.eslintrc.json +++ b/packages/@aws-cdk/node-bundle/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/node-bundle/.projen/deps.json b/packages/@aws-cdk/node-bundle/.projen/deps.json index 9170c7c56..b4a3b1ed0 100644 --- a/packages/@aws-cdk/node-bundle/.projen/deps.json +++ b/packages/@aws-cdk/node-bundle/.projen/deps.json @@ -61,6 +61,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/node-bundle/.projen/tasks.json b/packages/@aws-cdk/node-bundle/.projen/tasks.json index 4ef448780..e9853b5c6 100644 --- a/packages/@aws-cdk/node-bundle/.projen/tasks.json +++ b/packages/@aws-cdk/node-bundle/.projen/tasks.json @@ -37,7 +37,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/license-checker,@types/madge,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,standard-version,ts-jest,esbuild,license-checker,madge,shlex,yargs" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/license-checker,@types/madge,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,standard-version,ts-jest,esbuild,license-checker,madge,shlex,yargs" } ] }, diff --git a/packages/@aws-cdk/node-bundle/package.json b/packages/@aws-cdk/node-bundle/package.json index a0a971ae6..35321fc1f 100644 --- a/packages/@aws-cdk/node-bundle/package.json +++ b/packages/@aws-cdk/node-bundle/package.json @@ -48,6 +48,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/node-bundle/src/api/_attributions.ts b/packages/@aws-cdk/node-bundle/src/api/_attributions.ts index 06a9d0f4a..2e00e9590 100644 --- a/packages/@aws-cdk/node-bundle/src/api/_attributions.ts +++ b/packages/@aws-cdk/node-bundle/src/api/_attributions.ts @@ -48,7 +48,6 @@ export interface AttributionsProps { * `Attributions` represents an attributions file containing third-party license information. */ export class Attributions { - private readonly packageDir: string; private readonly packageName: string; private readonly dependencies: Package[]; @@ -79,7 +78,6 @@ export class Attributions { * This method never throws. The Caller is responsible for inspecting the report returned and act accordinagly. */ public validate(): ViolationsReport { - const violations: Violation[] = []; const relNoticePath = path.relative(this.packageDir, this.filePath); @@ -124,7 +122,6 @@ export class Attributions { } private render(attributions: Map): string { - const content = []; if (attributions.size > 0) { @@ -152,11 +149,9 @@ export class Attributions { // endings, so we standardize to LF. .map(l => l.replace(/\r\n/g, '\n')) .join('\n'); - } private generateAttributions(): Map { - if (this.dependencies.length === 0) { return new Map(); } @@ -216,7 +211,6 @@ export class Attributions { return attributions; } - } /** diff --git a/packages/@aws-cdk/node-bundle/src/api/bundle.ts b/packages/@aws-cdk/node-bundle/src/api/bundle.ts index 0dae2c9f9..364160757 100644 --- a/packages/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/packages/@aws-cdk/node-bundle/src/api/bundle.ts @@ -176,7 +176,6 @@ export interface Externals { * Bundle class to validate and pack nodejs bundles. */ export class Bundle { - private readonly manifest: any; private readonly noticePath: string; @@ -239,7 +238,6 @@ export class Bundle { * returned report and act accordingly. */ public validate(options: BundleValidateOptions = {}): ViolationsReport { - const fix = options.fix ?? false; // first validate @@ -270,7 +268,6 @@ export class Bundle { * Returns the temp directory location. */ public write(): string { - const target = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-write-')); // we definitely don't need these directories in the package @@ -302,7 +299,6 @@ export class Bundle { * Returns the location of the tarball. */ public pack(options: BundlePackOptions = {}): string { - const target = options.target ?? this.packageDir; const report = this.validate(); @@ -324,7 +320,6 @@ export class Bundle { console.log('Writing bundle'); const bundleDir = this.write(); try { - if (this.test) { const command = `${path.join(bundleDir, this.test)}`; console.log(`Running sanity test: ${command}`); @@ -385,7 +380,6 @@ export class Bundle { } private findExternalDependencyVersion(name: string): string { - const versions = new Set(); // external dependencies will not exist in the dependencies list @@ -418,7 +412,6 @@ export class Bundle { } private closestPackagePath(fdp: string): string { - if (fs.existsSync(path.join(fdp, 'package.json'))) { return fdp; } @@ -437,7 +430,6 @@ export class Bundle { } private esbuild(): esbuild.BuildResult { - const bundle = esbuild.buildSync({ entryPoints: this.entryPoints, bundle: true, @@ -506,7 +498,6 @@ export class Bundle { } private addExternals(manifest: any) { - // external dependencies should be specified as runtime dependencies for (const external of this.externals.dependencies ?? []) { const version = this.findExternalDependencyVersion(external); @@ -520,7 +511,6 @@ export class Bundle { manifest.optionalDependencies = manifest.optionalDependencies ?? {}; manifest.optionalDependencies[external] = version; } - } private removeDependencies(manifest: any) { @@ -551,7 +541,6 @@ export class Bundle { } function longestCommonParent(paths: string[]) { - function _longestCommonParent(p1: string, p2: string): string { const dirs1 = p1.split(path.sep); const dirs2 = p2.split(path.sep); diff --git a/packages/@aws-cdk/node-bundle/src/api/index.ts b/packages/@aws-cdk/node-bundle/src/api/index.ts index 716f23273..79f467a33 100644 --- a/packages/@aws-cdk/node-bundle/src/api/index.ts +++ b/packages/@aws-cdk/node-bundle/src/api/index.ts @@ -1,2 +1,2 @@ export * from './bundle'; -export * from './violation'; \ No newline at end of file +export * from './violation'; diff --git a/packages/@aws-cdk/node-bundle/src/api/violation.ts b/packages/@aws-cdk/node-bundle/src/api/violation.ts index c03bceb1b..a791b7fd6 100644 --- a/packages/@aws-cdk/node-bundle/src/api/violation.ts +++ b/packages/@aws-cdk/node-bundle/src/api/violation.ts @@ -63,7 +63,6 @@ export interface Violation { * Report encapsulating a list of violations. */ export class ViolationsReport { - constructor(private readonly _violations: Violation[]) {} /** @@ -92,5 +91,4 @@ export class ViolationsReport { } return summary.join('\n'); } - } diff --git a/packages/@aws-cdk/node-bundle/src/index.ts b/packages/@aws-cdk/node-bundle/src/index.ts index 308f5ae15..b1c13e734 100644 --- a/packages/@aws-cdk/node-bundle/src/index.ts +++ b/packages/@aws-cdk/node-bundle/src/index.ts @@ -1 +1 @@ -export * from './api'; \ No newline at end of file +export * from './api'; diff --git a/packages/@aws-cdk/node-bundle/test/_package.ts b/packages/@aws-cdk/node-bundle/test/_package.ts index e2bdca839..6739a20cc 100644 --- a/packages/@aws-cdk/node-bundle/test/_package.ts +++ b/packages/@aws-cdk/node-bundle/test/_package.ts @@ -34,7 +34,6 @@ export interface PackageOptions { * Generate packages for test scenarios. */ export class Package { - /** * Create a package. */ @@ -47,7 +46,7 @@ export class Package { if (options.licenses?.length === 1) { manifest.license = options.licenses[0]; - }; + } if (options.licenses && options.licenses.length > 1) { manifest.licenses = options.licenses!.map(l => ({ type: l })); @@ -159,5 +158,4 @@ export class Package { } fs.removeSync(this.dir); } - -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/node-bundle/test/api/bundle.test.ts b/packages/@aws-cdk/node-bundle/test/api/bundle.test.ts index 2221aaa3e..704aab6a7 100644 --- a/packages/@aws-cdk/node-bundle/test/api/bundle.test.ts +++ b/packages/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -4,7 +4,6 @@ import { Bundle } from '../../src'; import { Package } from '../_package'; test('validate', () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'], circular: true }); const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['INVALID'] }); const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0', 'MIT'] }); @@ -31,7 +30,6 @@ test('validate', () => { }); test('write', () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); @@ -58,11 +56,9 @@ test('write', () => { const manifest = fs.readJSONSync(path.join(bundleDir, 'package.json')); expect(manifest.dependencies).toEqual({}); - }); test('pack', () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); @@ -95,11 +91,9 @@ test('pack', () => { const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); expect(fs.existsSync(tarball)).toBeTruthy(); - }); test('validate and fix', () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); @@ -125,11 +119,9 @@ test('validate and fix', () => { bundle.pack(); const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); expect(fs.existsSync(tarball)).toBeTruthy(); - }); test('write ignores only .git and node_modules directories', () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); @@ -153,5 +145,4 @@ test('write ignores only .git and node_modules directories', () => { expect(fs.existsSync(path.join(bundleDir, '.gitignore'))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'node_modules_file'))).toBeTruthy(); - }); diff --git a/packages/@aws-cdk/node-bundle/test/cli.test.ts b/packages/@aws-cdk/node-bundle/test/cli.test.ts index 940ecb672..5e0405783 100644 --- a/packages/@aws-cdk/node-bundle/test/cli.test.ts +++ b/packages/@aws-cdk/node-bundle/test/cli.test.ts @@ -5,7 +5,6 @@ import { Package } from './_package'; import { cliMain } from '../src/cli-main'; test('validate', async () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'], circular: true }); const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['INVALID'] }); const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0', 'MIT'] }); @@ -32,11 +31,9 @@ test('validate', async () => { ]); expect(violations).toEqual(expected); } - }); test('write', async () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); @@ -63,11 +60,9 @@ test('write', async () => { const manifest = fs.readJSONSync(path.join(bundleDir, 'package.json')); expect(manifest.dependencies).toEqual({}); - }); test('validate and fix', async () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); @@ -97,11 +92,9 @@ test('validate and fix', async () => { await run(['pack']); const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); expect(fs.existsSync(tarball)).toBeTruthy(); - }); test('pack', async () => { - const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); @@ -134,7 +127,6 @@ test('pack', async () => { const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); expect(fs.existsSync(tarball)).toBeTruthy(); - }); async function runCliMain(cwd: string, command: string[]): Promise { @@ -155,4 +147,4 @@ async function runCliMain(cwd: string, command: string[]): Promise { process.chdir(curdir); spy.mockRestore(); } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/toolkit-lib/.eslintrc.json b/packages/@aws-cdk/toolkit-lib/.eslintrc.json index 7306062cb..e87248629 100644 --- a/packages/@aws-cdk/toolkit-lib/.eslintrc.json +++ b/packages/@aws-cdk/toolkit-lib/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -136,6 +137,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -154,6 +158,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -208,6 +215,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -229,6 +273,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/toolkit-lib/.projen/deps.json b/packages/@aws-cdk/toolkit-lib/.projen/deps.json index eb9fa267b..b1a0db809 100644 --- a/packages/@aws-cdk/toolkit-lib/.projen/deps.json +++ b/packages/@aws-cdk/toolkit-lib/.projen/deps.json @@ -80,6 +80,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/toolkit-lib/.projen/tasks.json b/packages/@aws-cdk/toolkit-lib/.projen/tasks.json index fe4b09f6c..4563432b0 100644 --- a/packages/@aws-cdk/toolkit-lib/.projen/tasks.json +++ b/packages/@aws-cdk/toolkit-lib/.projen/tasks.json @@ -37,7 +37,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@smithy/types,@stylistic/eslint-plugin,@types/fs-extra,@types/jest,@types/split2,aws-cdk-lib,aws-sdk-client-mock,esbuild,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest,typedoc,@aws-cdk/cx-api,@aws-cdk/region-info,@jsii/check-node,@smithy/middleware-endpoint,@smithy/node-http-handler,@smithy/property-provider,@smithy/shared-ini-file-loader,@smithy/util-retry,@smithy/util-stream,@smithy/util-waiter,archiver,cdk-from-cfn,glob,json-diff,minimatch,promptly,proxy-agent,semver,split2,uuid" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@smithy/types,@stylistic/eslint-plugin,@types/fs-extra,@types/jest,@types/split2,aws-cdk-lib,aws-sdk-client-mock,esbuild,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,ts-jest,typedoc,@aws-cdk/cx-api,@aws-cdk/region-info,@jsii/check-node,@smithy/middleware-endpoint,@smithy/node-http-handler,@smithy/property-provider,@smithy/shared-ini-file-loader,@smithy/util-retry,@smithy/util-stream,@smithy/util-waiter,archiver,cdk-from-cfn,glob,json-diff,minimatch,promptly,proxy-agent,semver,split2,uuid" } ] }, diff --git a/packages/@aws-cdk/toolkit-lib/package.json b/packages/@aws-cdk/toolkit-lib/package.json index c46212566..5567c0334 100644 --- a/packages/@aws-cdk/toolkit-lib/package.json +++ b/packages/@aws-cdk/toolkit-lib/package.json @@ -52,6 +52,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/user-input-gen/.eslintrc.json b/packages/@aws-cdk/user-input-gen/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/@aws-cdk/user-input-gen/.eslintrc.json +++ b/packages/@aws-cdk/user-input-gen/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/user-input-gen/.projen/deps.json b/packages/@aws-cdk/user-input-gen/.projen/deps.json index 8ed47175a..507226458 100644 --- a/packages/@aws-cdk/user-input-gen/.projen/deps.json +++ b/packages/@aws-cdk/user-input-gen/.projen/deps.json @@ -65,6 +65,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/user-input-gen/.projen/tasks.json b/packages/@aws-cdk/user-input-gen/.projen/tasks.json index d92f28942..662224a82 100644 --- a/packages/@aws-cdk/user-input-gen/.projen/tasks.json +++ b/packages/@aws-cdk/user-input-gen/.projen/tasks.json @@ -37,7 +37,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/lodash.clonedeep,@types/semver,@types/yarnpkg__lockfile,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest,@cdklabs/typewriter,lodash.clonedeep" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/lodash.clonedeep,@types/semver,@types/yarnpkg__lockfile,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,ts-jest,@cdklabs/typewriter,lodash.clonedeep" } ] }, diff --git a/packages/@aws-cdk/user-input-gen/package.json b/packages/@aws-cdk/user-input-gen/package.json index d5ee1ef3d..ef5677dd0 100644 --- a/packages/@aws-cdk/user-input-gen/package.json +++ b/packages/@aws-cdk/user-input-gen/package.json @@ -46,6 +46,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/@aws-cdk/yarn-cling/.eslintrc.json b/packages/@aws-cdk/yarn-cling/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/@aws-cdk/yarn-cling/.eslintrc.json +++ b/packages/@aws-cdk/yarn-cling/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/@aws-cdk/yarn-cling/.projen/deps.json b/packages/@aws-cdk/yarn-cling/.projen/deps.json index 6c89bc121..e574343dc 100644 --- a/packages/@aws-cdk/yarn-cling/.projen/deps.json +++ b/packages/@aws-cdk/yarn-cling/.projen/deps.json @@ -56,6 +56,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/@aws-cdk/yarn-cling/.projen/tasks.json b/packages/@aws-cdk/yarn-cling/.projen/tasks.json index 9a9dd5bb2..8f750aec0 100644 --- a/packages/@aws-cdk/yarn-cling/.projen/tasks.json +++ b/packages/@aws-cdk/yarn-cling/.projen/tasks.json @@ -37,7 +37,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/semver,@types/yarnpkg__lockfile,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest,@yarnpkg/lockfile,semver" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/semver,@types/yarnpkg__lockfile,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,ts-jest,@yarnpkg/lockfile,semver" } ] }, diff --git a/packages/@aws-cdk/yarn-cling/lib/index.ts b/packages/@aws-cdk/yarn-cling/lib/index.ts index d78faf57c..c65d36a68 100644 --- a/packages/@aws-cdk/yarn-cling/lib/index.ts +++ b/packages/@aws-cdk/yarn-cling/lib/index.ts @@ -250,7 +250,6 @@ export function checkRequiredVersions(root: PackageLock | PackageLockPackage) { function recurse(entry: PackageLock | PackageLockPackage, parentChain: PackageLockEntry[]) { // On the root, 'requires' is the value 'true', for God knows what reason. Don't care about those. if (typeof entry.requires === 'object') { - // For every 'requires' dependency, find the version it actually got resolved to and compare. for (const [name, range] of Object.entries(entry.requires)) { const resolvedPackage = findResolved(name, [entry, ...parentChain]); diff --git a/packages/@aws-cdk/yarn-cling/package.json b/packages/@aws-cdk/yarn-cling/package.json index 1901b0d6a..a36a69638 100644 --- a/packages/@aws-cdk/yarn-cling/package.json +++ b/packages/@aws-cdk/yarn-cling/package.json @@ -47,6 +47,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/packages/aws-cdk/.eslintrc.json b/packages/aws-cdk/.eslintrc.json index 514e784f5..1bb022e6f 100644 --- a/packages/aws-cdk/.eslintrc.json +++ b/packages/aws-cdk/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -137,6 +138,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -155,6 +159,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -209,6 +216,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -230,6 +274,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/aws-cdk/.projen/deps.json b/packages/aws-cdk/.projen/deps.json index 101bac142..4730d65b5 100644 --- a/packages/aws-cdk/.projen/deps.json +++ b/packages/aws-cdk/.projen/deps.json @@ -127,6 +127,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/aws-cdk/.projen/tasks.json b/packages/aws-cdk/.projen/tasks.json index 045d05bbb..49151b887 100644 --- a/packages/aws-cdk/.projen/tasks.json +++ b/packages/aws-cdk/.projen/tasks.json @@ -52,7 +52,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@octokit/rest,@stylistic/eslint-plugin,@types/archiver,@types/glob,@types/jest,@types/mockery,@types/promptly,@types/semver,@types/sinon,@types/source-map-support,@types/uuid,aws-cdk-lib,axios,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,fast-check,jest,jest-environment-node,jest-mock,license-checker,madge,make-runnable,nock,projen,sinon,ts-jest,ts-mock-imports,xml-js,@aws-cdk/cx-api,@aws-cdk/region-info,@aws-sdk/middleware-endpoint,@aws-sdk/util-retry,@aws-sdk/util-waiter,@jsii/check-node,@smithy/middleware-endpoint,@smithy/property-provider,@smithy/shared-ini-file-loader,@smithy/types,@smithy/util-retry,@smithy/util-stream,@smithy/util-waiter,archiver,glob,json-diff,minimatch,promptly,proxy-agent,semver,source-map-support,table,uuid" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@octokit/rest,@stylistic/eslint-plugin,@types/archiver,@types/glob,@types/jest,@types/mockery,@types/promptly,@types/semver,@types/sinon,@types/source-map-support,@types/uuid,aws-cdk-lib,axios,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,fast-check,jest,jest-environment-node,jest-mock,license-checker,madge,make-runnable,nock,projen,sinon,ts-jest,ts-mock-imports,xml-js,@aws-cdk/cx-api,@aws-cdk/region-info,@aws-sdk/middleware-endpoint,@aws-sdk/util-retry,@aws-sdk/util-waiter,@jsii/check-node,@smithy/middleware-endpoint,@smithy/property-provider,@smithy/shared-ini-file-loader,@smithy/types,@smithy/util-retry,@smithy/util-stream,@smithy/util-waiter,archiver,glob,json-diff,minimatch,promptly,proxy-agent,semver,source-map-support,table,uuid" } ] }, diff --git a/packages/aws-cdk/lib/api/aws-auth/account-cache.ts b/packages/aws-cdk/lib/api/aws-auth/account-cache.ts index aea859646..0e5500924 100644 --- a/packages/aws-cdk/lib/api/aws-auth/account-cache.ts +++ b/packages/aws-cdk/lib/api/aws-auth/account-cache.ts @@ -35,9 +35,6 @@ export class AccountAccessKeyCache { * const accountId = cache.fetch(accessKey, async () => { * return await fetchAccountIdFromSomewhere(accessKey); * }); - * - * @param accessKeyId - * @param resolver */ public async fetch(accessKeyId: string, resolver: () => Promise) { // try to get account ID based on this access key ID from disk. diff --git a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts index fd6f255d0..4c83aaee5 100644 --- a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts +++ b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts @@ -193,7 +193,6 @@ async function getRegionFromIni(profile: string): Promise { ?? getRegionFromIniFile(profile, sharedFiles.configFile) ?? getRegionFromIniFile('default', sharedFiles.credentialsFile) ?? getRegionFromIniFile('default', sharedFiles.configFile); - } function getRegionFromIniFile(profile: string, data?: any) { diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts b/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts index e40250511..380e44aef 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts @@ -281,7 +281,7 @@ export class Bootstrapper { } catch (e: any) { // https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicy.html#API_GetPolicy_Errors if (e.name === 'NoSuchEntity') { - //noop, proceed with creating the policy + // noop, proceed with creating the policy } else { throw e; } diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts index 70dc4ae01..8a40daf56 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts @@ -140,7 +140,6 @@ export class CloudAssembly { patterns: string[], extend: ExtendedStackSelection = ExtendedStackSelection.None, ): StackCollection { - const matchingPattern = (pattern: string) => (stack: cxapi.CloudFormationStackArtifact) => minimatch(stack.hierarchicalId, pattern); const matchedStacks = flatten(patterns.map(pattern => stacks.filter(matchingPattern(pattern)))); diff --git a/packages/aws-cdk/lib/api/deployments/assets.ts b/packages/aws-cdk/lib/api/deployments/assets.ts index ecc24d74d..2dc542dcf 100644 --- a/packages/aws-cdk/lib/api/deployments/assets.ts +++ b/packages/aws-cdk/lib/api/deployments/assets.ts @@ -91,7 +91,6 @@ async function prepareFileAsset( toolkitInfo: ToolkitInfo, packaging: cxschema.FileAssetPackaging, ): Promise> { - const extension = packaging === cxschema.FileAssetPackaging.ZIP_DIRECTORY ? '.zip' : path.extname(asset.path); const baseName = `${asset.sourceHash}${extension}`; // Simplify key: assets/abcdef/abcdef.zip is kinda silly and unnecessary, so if they're the same just pick one component. @@ -120,7 +119,6 @@ async function prepareDockerImageAsset( asset: cxschema.ContainerImageAssetMetadataEntry, assetManifest: AssetManifestBuilder, envResources: EnvironmentResources): Promise> { - // Pre-1.21.0, repositoryName can be specified by the user or can be left out, in which case we make // a per-asset repository which will get adopted and cleaned up along with the stack. // Post-1.21.0, repositoryName will always be specified and it will be a shared repository between diff --git a/packages/aws-cdk/lib/api/deployments/deployments.ts b/packages/aws-cdk/lib/api/deployments/deployments.ts index 284591a04..ca8a33e62 100644 --- a/packages/aws-cdk/lib/api/deployments/deployments.ts +++ b/packages/aws-cdk/lib/api/deployments/deployments.ts @@ -169,8 +169,8 @@ export interface DeployStackOptions { readonly hotswap?: HotswapMode; /** - * Properties that configure hotswap behavior - */ + * Properties that configure hotswap behavior + */ readonly hotswapPropertyOverrides?: HotswapPropertyOverrides; /** diff --git a/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts b/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts index 417d4ae67..a338d996a 100644 --- a/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts +++ b/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts @@ -381,7 +381,7 @@ export class EvaluateCloudFormationTemplate { if (foundResource.ResourceType == 'AWS::CloudFormation::Stack' && attribute?.startsWith('Outputs.')) { const dependantStack = this.findNestedStack(logicalId, this.nestedStacks); if (!dependantStack || !dependantStack.physicalName) { - //this is a newly created nested stack and cannot be hotswapped + // this is a newly created nested stack and cannot be hotswapped return undefined; } const evaluateCfnTemplate = await this.createNestedEvaluateCloudFormationTemplate( diff --git a/packages/aws-cdk/lib/api/hotswap/appsync-mapping-templates.ts b/packages/aws-cdk/lib/api/hotswap/appsync-mapping-templates.ts index 3218bc5fc..b6be17cbf 100644 --- a/packages/aws-cdk/lib/api/hotswap/appsync-mapping-templates.ts +++ b/packages/aws-cdk/lib/api/hotswap/appsync-mapping-templates.ts @@ -147,7 +147,7 @@ export async function isHotswappableAppSyncChange( throw new ToolkitError(schemaCreationResponse.details ?? 'Schema creation has failed.'); } } else { - //isApiKey + // isApiKey if (!sdkRequestObject.id) { // ApiKeyId is optional in CFN but required in SDK. Grab the KeyId from physicalArn if not available as part of CFN template const arnParts = physicalName?.split('/'); diff --git a/packages/aws-cdk/lib/api/hotswap/common.ts b/packages/aws-cdk/lib/api/hotswap/common.ts index 4012c119d..1314cdb1f 100644 --- a/packages/aws-cdk/lib/api/hotswap/common.ts +++ b/packages/aws-cdk/lib/api/hotswap/common.ts @@ -139,7 +139,7 @@ export class EcsHotswapProperties { /** * Check if any hotswap properties are defined * @returns true if all properties are undefined, false otherwise - */ + */ public isEmpty(): boolean { return this.minimumHealthyPercent === 0 && this.maximumHealthyPercent === undefined; } diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts index ff3018aff..c358e4329 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts @@ -139,7 +139,6 @@ export class StackEventPoller { if (nextToken === undefined) { finished = true; } - } } catch (e: any) { if (!(e.name === 'ValidationError' && formatErrorMessage(e) === `Stack [${this.props.stackName}] does not exist`)) { diff --git a/packages/aws-cdk/lib/cli/cdk-toolkit.ts b/packages/aws-cdk/lib/cli/cdk-toolkit.ts index 11d5f016d..8d9be4ae1 100644 --- a/packages/aws-cdk/lib/cli/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cli/cdk-toolkit.ts @@ -1010,7 +1010,7 @@ export class CdkToolkit { confirm: options.confirm ?? true, }); await gc.garbageCollect(); - }; + } } private async defineEnvironments(userEnvironmentSpecs: string[]): Promise { diff --git a/packages/aws-cdk/lib/cli/cli.ts b/packages/aws-cdk/lib/cli/cli.ts index 6c63278b1..98bc9a2a1 100644 --- a/packages/aws-cdk/lib/cli/cli.ts +++ b/packages/aws-cdk/lib/cli/cli.ts @@ -171,7 +171,6 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise 0) { - matches.forEach((match) => { context.unset(match); }); diff --git a/packages/aws-cdk/lib/context-providers/index.ts b/packages/aws-cdk/lib/context-providers/index.ts index 1e111fa55..f385aa505 100644 --- a/packages/aws-cdk/lib/context-providers/index.ts +++ b/packages/aws-cdk/lib/context-providers/index.ts @@ -30,7 +30,6 @@ export async function provideContextValues( missingValues: cxschema.MissingContext[], context: Context, sdk: SdkProvider) { - for (const missingContext of missingValues) { const key = missingContext.key; diff --git a/packages/aws-cdk/lib/init-hooks.ts b/packages/aws-cdk/lib/init-hooks.ts index b3f1c4ec4..14e2c4c09 100644 --- a/packages/aws-cdk/lib/init-hooks.ts +++ b/packages/aws-cdk/lib/init-hooks.ts @@ -76,7 +76,6 @@ export async function invokeBuiltinHooks(target: HookTarget, context: HookContex case 'typescript': // See above, but for 'package.json'. await context.substitutePlaceholdersIn('package.json'); - } } @@ -89,4 +88,4 @@ async function dotnetAddProject(targetDirectory: string, context: HookContext, e } catch (e: any) { throw new ToolkitError(`Could not add project ${pname}.${ext} to solution ${pname}.sln. ${formatErrorMessage(e)}`); } -}; +} diff --git a/packages/aws-cdk/lib/notices.ts b/packages/aws-cdk/lib/notices.ts index 50481beaf..281da9281 100644 --- a/packages/aws-cdk/lib/notices.ts +++ b/packages/aws-cdk/lib/notices.ts @@ -108,13 +108,11 @@ export class NoticesFilter { return [new FilteredNotice(notice)]; }); - } private static findForFrameworkVersion(data: Notice[], outDir: string): FilteredNotice[] { const tree = loadTreeFromDir(outDir); return flatMap(data, notice => { - // A match happens when: // // 1. The version of the node matches the version in the notice, interpreted @@ -158,7 +156,6 @@ export class NoticesFilter { } const affected = bootstrappedEnvironments.filter(i => { - const semverBootstrapVersion = semver.coerce(i.bootstrapStackVersion); if (!semverBootstrapVersion) { // we don't throw because notices should never crash the cli. @@ -167,7 +164,6 @@ export class NoticesFilter { } return semver.satisfies(semverBootstrapVersion, affectedRange); - }); if (affected.length === 0) { @@ -355,7 +351,6 @@ export class FilteredNotice { } public format(): string { - const componentsValue = this.notice.components.map(c => `${c.name}: ${c.version}`).join(', '); return this.resolveDynamicValues([ `${this.notice.issueNumber}\t${this.notice.title}`, diff --git a/packages/aws-cdk/lib/util/version-range.ts b/packages/aws-cdk/lib/util/version-range.ts index 28d471805..333031049 100644 --- a/packages/aws-cdk/lib/util/version-range.ts +++ b/packages/aws-cdk/lib/util/version-range.ts @@ -35,5 +35,4 @@ export function rangeFromSemver(ver: string, targetType: RangeType) { throw new ToolkitError(`unsupported range syntax - ${prefixPart}`); } } - } diff --git a/packages/aws-cdk/lib/util/work-graph-types.ts b/packages/aws-cdk/lib/util/work-graph-types.ts index 751ff84a3..89fc46528 100644 --- a/packages/aws-cdk/lib/util/work-graph-types.ts +++ b/packages/aws-cdk/lib/util/work-graph-types.ts @@ -8,7 +8,7 @@ export enum DeploymentState { COMPLETED = 'completed', FAILED = 'failed', SKIPPED = 'skipped', -}; +} export type WorkNode = StackNode | AssetBuildNode | AssetPublishNode; diff --git a/packages/aws-cdk/lib/util/work-graph.ts b/packages/aws-cdk/lib/util/work-graph.ts index 05f06dbd0..020889303 100644 --- a/packages/aws-cdk/lib/util/work-graph.ts +++ b/packages/aws-cdk/lib/util/work-graph.ts @@ -227,7 +227,6 @@ export class WorkGraph { } return ret; } - } /** diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index c1c6e7ae6..dffd3127b 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -65,6 +65,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "fast-check": "^3.23.2", "jest": "^29.7.0", diff --git a/packages/cdk-assets/.eslintrc.json b/packages/cdk-assets/.eslintrc.json index 9cc7d335b..bd279d486 100644 --- a/packages/cdk-assets/.eslintrc.json +++ b/packages/cdk-assets/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/cdk-assets/.projen/deps.json b/packages/cdk-assets/.projen/deps.json index a9c819002..467d0413d 100644 --- a/packages/cdk-assets/.projen/deps.json +++ b/packages/cdk-assets/.projen/deps.json @@ -91,6 +91,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/cdk-assets/.projen/tasks.json b/packages/cdk-assets/.projen/tasks.json index 1193fa406..d59c9b662 100644 --- a/packages/cdk-assets/.projen/tasks.json +++ b/packages/cdk-assets/.projen/tasks.json @@ -54,7 +54,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@smithy/types,@smithy/util-stream,@stylistic/eslint-plugin,@types/archiver,@types/glob,@types/jest,@types/yargs,aws-sdk-client-mock,aws-sdk-client-mock-jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,fs-extra,graceful-fs,jest,jszip,license-checker,projen,ts-jest,@aws-cdk/cx-api,@aws-sdk/credential-providers,@aws-sdk/lib-storage,@smithy/config-resolver,@smithy/node-config-provider,archiver,glob,yargs" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@smithy/types,@smithy/util-stream,@stylistic/eslint-plugin,@types/archiver,@types/glob,@types/jest,@types/yargs,aws-sdk-client-mock,aws-sdk-client-mock-jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,fs-extra,graceful-fs,jest,jszip,license-checker,projen,ts-jest,@aws-cdk/cx-api,@aws-sdk/credential-providers,@aws-sdk/lib-storage,@smithy/config-resolver,@smithy/node-config-provider,archiver,glob,yargs" } ] }, diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index a487078d1..8b5e6ba66 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -58,6 +58,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "fs-extra": "^11.3.0", "graceful-fs": "^4.2.11", diff --git a/packages/cdk/.eslintrc.json b/packages/cdk/.eslintrc.json index 2fcfd7db4..bb1114eb1 100644 --- a/packages/cdk/.eslintrc.json +++ b/packages/cdk/.eslintrc.json @@ -10,7 +10,8 @@ "import", "@cdklabs", "@stylistic", - "jest" + "jest", + "jsdoc" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -139,6 +140,9 @@ "@cdklabs/promiseall-no-unbounded-parallelism": [ "error" ], + "no-throw-literal": [ + "error" + ], "@stylistic/indent": [ "error", 2 @@ -157,6 +161,9 @@ "error", "always-multiline" ], + "@stylistic/no-extra-semi": [ + "error" + ], "comma-spacing": [ "error", { @@ -211,6 +218,43 @@ "multi-line", "consistent" ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], "no-restricted-imports": [ "error", { @@ -232,6 +276,10 @@ "error", "always" ], + "quote-props": [ + "error", + "consistent-as-needed" + ], "max-len": [ "error", { diff --git a/packages/cdk/.projen/deps.json b/packages/cdk/.projen/deps.json index 028eda459..b1e35e83e 100644 --- a/packages/cdk/.projen/deps.json +++ b/packages/cdk/.projen/deps.json @@ -53,6 +53,10 @@ "name": "eslint-plugin-jest", "type": "build" }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, { "name": "eslint-plugin-prettier", "type": "build" diff --git a/packages/cdk/.projen/tasks.json b/packages/cdk/.projen/tasks.json index cbf0a9495..57e5674b0 100644 --- a/packages/cdk/.projen/tasks.json +++ b/packages/cdk/.projen/tasks.json @@ -52,7 +52,7 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,license-checker,projen,ts-jest" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,license-checker,projen,ts-jest" } ] }, diff --git a/packages/cdk/package.json b/packages/cdk/package.json index 1a8595b88..c6c833c06 100644 --- a/packages/cdk/package.json +++ b/packages/cdk/package.json @@ -47,6 +47,7 @@ "eslint-import-resolver-typescript": "^3.8.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "jest-junit": "^16", diff --git a/projenrc/eslint.ts b/projenrc/eslint.ts index b867733f2..4d85c1ec2 100644 --- a/projenrc/eslint.ts +++ b/projenrc/eslint.ts @@ -5,6 +5,9 @@ export const ESLINT_RULES = { '@cdklabs/no-invalid-path': [ 'error' ], '@cdklabs/promiseall-no-unbounded-parallelism': [ 'error' ], + // Error handling + 'no-throw-literal': [ 'error' ], + // Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');` '@typescript-eslint/no-require-imports': ['error'], '@stylistic/indent': ['error', 2], @@ -13,6 +16,7 @@ export const ESLINT_RULES = { 'quotes': ['error', 'single', { avoidEscape: true }], '@stylistic/member-delimiter-style': ['error'], // require semicolon delimiter '@stylistic/comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8 + '@stylistic/no-extra-semi': ['error'], // no extra semicolons 'comma-spacing': ['error', { before: false, after: true }], // space after, no space before 'no-multi-spaces': ['error', { ignoreEOLComments: false }], // no multi spaces 'array-bracket-spacing': ['error', 'never'], // [1, 2, 3] @@ -24,6 +28,15 @@ export const ESLINT_RULES = { 'brace-style': ['error', '1tbs', { allowSingleLine: true }], // enforce one true brace style 'space-before-blocks': 'error', // require space before blocks 'curly': ['error', 'multi-line', 'consistent'], // require curly braces for multiline control statements + 'eol-last': ['error', 'always'], // require a newline a the end of files + '@stylistic/spaced-comment': ['error', 'always', { 'exceptions': ['/', '*'], 'markers': ['/'] }], // require a whitespace at the beginninng of each comment + '@stylistic/padded-blocks': ['error', { 'classes': 'never', 'blocks': 'never', 'switches': 'never'}], + + // JSDoc + 'jsdoc/require-param-description': ['error'], + 'jsdoc/require-property-description': ['error'], + 'jsdoc/require-returns-description': ['error'], + 'jsdoc/check-alignment': ['error'], // Require all imported dependencies are actually declared in package.json 'import/no-extraneous-dependencies': [ @@ -73,7 +86,7 @@ export const ESLINT_RULES = { 'semi': ['error', 'always'], // Don't unnecessarily quote properties - // 'quote-props': ['error', 'consistent-as-needed'], + 'quote-props': ['error', 'consistent-as-needed'], // No multiple empty lines 'no-multiple-empty-lines': ['error', { 'max': 1 }], @@ -105,9 +118,6 @@ export const ESLINT_RULES = { // Must use foo.bar instead of foo['bar'] if possible 'dot-notation': ['error'], - // Must use 'import' statements (disabled because it doesn't add a lot over no-require-imports) - // '@typescript-eslint/no-var-requires': ['error'], - // Are you sure | is not a typo for || ? 'no-bitwise': ['error'], diff --git a/yarn.lock b/yarn.lock index 8830cffe4..abfd71840 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2288,6 +2288,15 @@ dependencies: tslib "^2.4.0" +"@es-joy/jsdoccomment@~0.49.0": + version "0.49.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz#e5ec1eda837c802eca67d3b29e577197f14ba1db" + integrity sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q== + dependencies: + comment-parser "1.4.1" + esquery "^1.6.0" + jsdoc-type-pratt-parser "~4.1.0" + "@esbuild/aix-ppc64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" @@ -4538,6 +4547,11 @@ archiver@^7.0.1: tar-stream "^3.0.0" zip-stream "^6.0.1" +are-docs-informative@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/are-docs-informative/-/are-docs-informative-0.0.2.tgz#387f0e93f5d45280373d387a59d34c96db321963" + integrity sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig== + arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -5215,6 +5229,11 @@ comment-json@4.2.2: has-own-prop "^2.0.0" repeat-string "^1.6.1" +comment-parser@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.1.tgz#bdafead37961ac079be11eb7ec65c4d021eaf9cc" + integrity sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg== + commit-and-tag-version@^12: version "12.5.0" resolved "https://registry.yarnpkg.com/commit-and-tag-version/-/commit-and-tag-version-12.5.0.tgz#fcfd5db2d70c76cb1f40defb44b8c8d687af273b" @@ -5700,7 +5719,7 @@ dateformat@^3.0.0, dateformat@^3.0.3: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.7: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.6, debug@^4.3.7: version "4.4.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== @@ -6133,6 +6152,11 @@ es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-module-lexer@^1.5.3: + version "1.6.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.6.0.tgz#da49f587fd9e68ee2404fe4e256c0c7d3a81be21" + integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ== + es-object-atoms@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" @@ -6324,6 +6348,23 @@ eslint-plugin-jest@^28.11.0: dependencies: "@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0" +eslint-plugin-jsdoc@^50.6.3: + version "50.6.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.3.tgz#668dc4d32e823c84ede7310cffbf70c9d370d291" + integrity sha512-NxbJyt1M5zffPcYZ8Nb53/8nnbIScmiLAMdoe0/FAszwb7lcSiX3iYBTsuF7RV84dZZJC8r3NghomrUXsmWvxQ== + dependencies: + "@es-joy/jsdoccomment" "~0.49.0" + are-docs-informative "^0.0.2" + comment-parser "1.4.1" + debug "^4.3.6" + escape-string-regexp "^4.0.0" + espree "^10.1.0" + esquery "^1.6.0" + parse-imports "^2.1.1" + semver "^7.6.3" + spdx-expression-parse "^4.0.0" + synckit "^0.9.1" + eslint-plugin-prettier@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.3.tgz#c4af01691a6fa9905207f0fbba0d7bea0902cce5" @@ -6390,7 +6431,7 @@ eslint@^9: natural-compare "^1.4.0" optionator "^0.9.3" -espree@^10.0.1, espree@^10.3.0: +espree@^10.0.1, espree@^10.1.0, espree@^10.3.0: version "10.3.0" resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== @@ -6404,7 +6445,7 @@ esprima@^4.0.0, esprima@^4.0.1: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.5.0: +esquery@^1.5.0, esquery@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== @@ -7996,6 +8037,11 @@ jsbn@1.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== +jsdoc-type-pratt-parser@~4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz#ff6b4a3f339c34a6c188cbf50a16087858d22113" + integrity sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg== + jsdom@^25.0.0: version "25.0.1" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-25.0.1.tgz#536ec685c288fc8a5773a65f82d8b44badcc73ef" @@ -9106,6 +9152,14 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-imports@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/parse-imports/-/parse-imports-2.2.1.tgz#0a6e8b5316beb5c9905f50eb2bbb8c64a4805642" + integrity sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ== + dependencies: + es-module-lexer "^1.5.3" + slashes "^3.0.12" + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -9960,6 +10014,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slashes@^3.0.12: + version "3.0.12" + resolved "https://registry.yarnpkg.com/slashes/-/slashes-3.0.12.tgz#3d664c877ad542dc1509eaf2c50f38d483a6435a" + integrity sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA== + slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" @@ -10061,6 +10120,14 @@ spdx-expression-parse@^3.0.0: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" +spdx-expression-parse@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz#a23af9f3132115465dac215c099303e4ceac5794" + integrity sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + spdx-license-ids@^3.0.0: version "3.0.21" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz#6d6e980c9df2b6fc905343a3b2d702a6239536c3"