TODO
's that speak up for themselves via the TypeScript Language Server.
// Will result in your editor showing an error: "It's time to do it!" // TODO::after_date("2021-04-02"): remove april fools code
// Will result in your editor showing an error: // "Your package has arrived! now on 4.5.1" // FIXME::when("typescript", ">4.5.0"): check your typesRun as language server plugin
This plugin requires a project with TypeScript setup.
npm install --save-dev typescript-todo-or-die-plugin
or
yarn add typescript-todo-or-die-plugin --dev
{ "compilerOptions": { "plugins": [ { "name": "typescript-todo-or-die-plugin", "options": { "after_date": { "warn": "1w" }, "when": { "warn": "1p" } }, "additionalKeywords": ["FIX", "TODO_OR_DIE"] } ] } }
TODO
's with conditions to your codebaseNote: If you're using Visual Studio Code, you'll have to run the "TypeScript: Select TypeScript Version" command and choose "Use Workspace Version", or click the version number next to "TypeScript" in the lower-right corner. Otherwise, VS Code will not be able to find your plugin.
Follow steps 1 and 2 from "Run as language server plugin"
Run in command line:
The following conditions are available to use inside your TODO
comments
yyyy-mm-dd
Date after which an error will be shown.
Show an error if today is after the given date
Show a warning before the given date
Param Type Description package string Package name to be tracked as defined in the package.json file. version>1.0.0
A comparator (>
or =
) followed by the version to be matched
Show an error when version is compared with the current version as defined in the package.json
file.
Show a warning before the given version matching on M - major versions, m - minor versions, p - patches. Defaults to 1 patch ahead when warn
option is present.
Show an error if current git branch matches specified one
By default TODO
& FIXME
are valid keywords to use for your todo comments. Additional keywords can be added as shown here:
"plugins": [ { "name": "typescript-todo-or-die-plugin", "additionalKeywords": ["FIX", "TODO_OR_DIE"] } ]
Made with contributors-img.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4