Unexpected 'todo' comment: 'TODO: assign behaviour to delete button'
398 }
399
400 return {
401 // TODO: assign behaviour to delete button402 delete: generic(QuickPromotionModal),
403 more: generic(createPolymorphicComponent<'button', PolyButtonProps>(Button)),
404 print: generic(PrintButton),
Unexpected 'todo' comment: 'TODO: [IN-786] Associate ActionButton...'
362
363const PrintButton = createPolymorphicComponent<'button', PolyButtonProps>(PrintBody)
364
365// TODO: [IN-786] Associate ActionButton click actions366
367// Previous actions object is now a hook to check user session before using save or saved actions
368const useActions = () => {
Description
Developers often add comments to code that is not complete or needs review. You probably want to fix or review the code and then remove the comments before considering the code to be production-ready. Issues are raised whenever our analyzer finds these keywords in the comments i.e., TODO, FIXME, XXX.
// TODO: do something
// FIXME: this is not a good idea
Bad Practice
// default - { "terms": ["todo", "fixme", "xxx"], "location": "start" }
function callback(err, results) {
if (err) {
console.error(err);
return;
}
// TODO
}
Recommended
// default - { "terms": ["todo", "fixme", "xxx"], "location": "start" }
function callback(err, results) {
if (err) {
console.error(err);
return;
}
// NOT READY FOR PRIME TIME
// but too bad, it is not a predefined warning term
}