putout-plugin-madrun

putout
plugin adds ability to fix issues with madrun config file.
Install
npm i putout @putout/plugin-madrun -D
Add .putout.json
with:
{
"plugins": [
"madrun"
]
}
Rules
{
"rules": {
"madrun/add-function": true,
"madrun/call-run": true,
"madrun/convert-run-argument": true,
"madrun/rename-series-to-run": true,
}
}
add-function
❌ Incorrect code example
module.exports = {
'hello': 'world'
};
✅ Correct code Example
module.exports = {
'hello': () => 'world'
};
add-madrun-to-lint
❌ Incorrect code example
module.exports = {
'lint': () => `eslint lib test --ignore-pattern test/fixture`,
};
✅ Correct code Example
module.exports = {
'lint': () => `eslint lib test madrun.js --ignore-pattern test/fixture`,
};
convert-run-argument
❌ Incorrect code example
module.exports = {
'hello': () => run(['a']),
};
✅ Correct code Example
module.exports = {
'hello': () => run('a'),
};
License
MIT