Detect useless code in the project, currently only supports ts and tsx code.
- Clone this repository
- Enter the directory and install the dependencies
cd check-useless-code
pnpm i
- Link package to global
node_modules
pnpm link --global
- Enter project directory and create a config file named
cuc.config.js
// cuc.config.js
// example
module.exports = {
entryPoints: [
'src/app.tsx',
'@/pages/notFound'
],
alias: {
'@/': 'src/'
}
}
- Execute the command
check-useless-code
and then the console will output the results.
pnpm check-useless-code