diff --git a/frontend/package-lock.json b/frontend/package-lock.json index c035ec9e..c8482d35 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -43,6 +43,7 @@ "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0", "prettier": "^3.0.3", + "react-docgen-typescript": "^2.2.2", "react-styleguidist": "^13.1.1", "ts-loader": "^9.4.4", "webpack": "^5.88.2" @@ -21279,6 +21280,15 @@ "react-docgen": "^3.0.0 || ^4.0.0 || ^5.0.0-beta || ^5.0.0" } }, + "node_modules/react-docgen-typescript": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/react-docgen-typescript/-/react-docgen-typescript-2.2.2.tgz", + "integrity": "sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==", + "dev": true, + "peerDependencies": { + "typescript": ">= 4.3.x" + } + }, "node_modules/react-docgen/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", diff --git a/frontend/package.json b/frontend/package.json index eca91fdc..22c88ac1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -64,6 +64,7 @@ "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0", "prettier": "^3.0.3", + "react-docgen-typescript": "^2.2.2", "react-styleguidist": "^13.1.1", "ts-loader": "^9.4.4", "webpack": "^5.88.2" diff --git a/frontend/styleguide.config.js b/frontend/styleguide.config.js index f0ef2789..1776b7cb 100644 --- a/frontend/styleguide.config.js +++ b/frontend/styleguide.config.js @@ -1,4 +1,7 @@ module.exports = { + propsParser: require('react-docgen-typescript').withDefaultConfig({ + skipChildrenPropWithoutDoc: false, + }).parse, components: ['src/App.tsx', 'src/Components/**/*.{tsx,jsx,js,ts}'], ignore: [ '**/__tests__/**',