Detect dead code from stub
The following four placeholders are present in the stubs. They should be detected and a "must-fix" message should be added to remove the line which is now dead-code.
throw new Error('Please implement the (...) function')
throw new Error('Remove this line and implement the function')
throw new Error('Implement the (...) function')
throw new Error('Remove this statement and implement this function');
Is this an opportunity to switch them all to one consistent message style?
We would still need to support older versions, but yes, I have no issue with all of the messages being the same in the JS and TS track!
I'll be happy to switch them all to one consistent message and raise a PR on both the JS and TS tracks for the same. Just let me know which message should be used consistently throughout the track!
@Cool-Katt what is your preferred stub message?
I aways use
throw new Error('Remove this statement and implement this function');
But maybe this one can also work, in the light of being more direct
throw new Error('Remove this line and implement the function');
Yah I like throw new Error('Remove this line and implement the function');, but technically it's the statement to remove not the line, but I think it's fine in this case.
Let's go with
throw new Error('Remove this line and implement the function');
https://github.com/exercism/javascript/pull/2714 (JS Concept) https://github.com/exercism/javascript/pull/2715 (JS Practice) https://github.com/exercism/typescript/pull/1591 (TS Practice)
All concept exercises in the TS track (there was only one, apparently) already had the correct throw new line, so no changes were needed there!