react-scanner icon indicating copy to clipboard operation
react-scanner copied to clipboard

Lack of documentation on how to use 'components' config

Open coolcorexix opened this issue 2 years ago • 0 comments

Only when I check the source code did I guess right about how to use it,

async function scanFiles() {
  const results = await scanner.run({
    rootDir: '.',
    crawlFrom: 'app/react',
    includeSubComponents: true,
+    components: {
+      Switch: true,
+   },
    importedFrom: 'react-router-dom',
  });

it is also a little counter-intuitive. do you the author, think it should be:

...
components: ['Switch']
...

coolcorexix avatar Jul 20 '23 07:07 coolcorexix