Open eloisetaylor5693 opened 2 years ago
After exploring past issues I modified my config, But components which reference other components are showing in the results.
Eg a title component might be used in a hero section component
"next-unused": {
"debug": true,
"alias": {
"components": "src/components/"
},
"include": [
"src/pages",
"src/components"
],
"exclude": [
".tests."
],
"entrypoints": [
"src/pages"
]
}
Did you try eslint:no-unused-modules?
I use this config:
"import/no-unused-modules": [
1,
{
"missingExports": true,
"unusedExports": true,
"ignoreExports": [
"src/pages",
"src/scripts",
"*.d.ts"
]
}
],
This library reports all component files are unused on our project.
Folder structure:
config:
we use a mix of import styles in our components: