First install and run
How to install and run your first analysis
Requirements
Install Debt-collector in your project
npm i debt-collector -D
yarn add -D debt-collector
pnpm add -D debt-collectornpm i debt-collector@1.0.0-alpha.13 -D
yarn add -D debt-collector@1.0.0-alpha.13
pnpm add -D debt-collector@1.0.0-alpha.13Create a configuration file
export default {
projectName: 'my-project',
include: ['./src/**/*'],
fileRules: [
{
id: 'REMOVE_FOO',
title: 'we should get rid of all "Foo" occurences',
debtScore: 3,
matchRule: ({ countAll }) => countAll('foo'),
}, {
id: 'MIGRATE_CSS_TO_SCSS',
title: 'use scss instead of css',
debtScore: 5,
include: ['**/*.css'],
}
]
}What we've done here :
Add a script to your package.json
Let's try it :
Last updated