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-collectornpm i debt-collector@1.0.0-alpha.5 -D
yarn add -D debt-collector@1.0.0-alpha.5Create a configuration file
module.exports = {
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