Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomashubelbauer/todo
A utility to print to-do comments in the current directory recursively.
https://github.com/tomashubelbauer/todo
todo todo-comment
Last synced: about 1 month ago
JSON representation
A utility to print to-do comments in the current directory recursively.
- Host: GitHub
- URL: https://github.com/tomashubelbauer/todo
- Owner: TomasHubelbauer
- Created: 2020-11-16T21:16:30.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-15T22:08:45.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T03:56:48.195Z (9 months ago)
- Topics: todo, todo-comment
- Language: JavaScript
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# To-Do
[svg]: https://github.com/tomashubelbauer/todo/workflows/github-actions/badge.svg
[![][svg]](https://github.com/TomasHubelbauer/todo/actions)A simple utility to print code to-do comments and unchecked MarkDown checkboxes.
## Installation
`npm i -g tomashubelbauer/todo` or `npx tomashubelbauer/todo`
## Usage
### CLI
`todo`
**This will read all files in the directory, including binary files, read on!**
Sample output:
```
./test.md:10 MarkDown checkbox
./test.md:20 MarkDown sub-heading of "To-Do" heading
./test.js:10 JavaScript comment
./test.ps1:10 PowerShell comment
```Pass a regex to match paths against as a CLI argument. Prefix with a bang (`!`)
to reverse the logic.`todo "regex"` or `todo "!regex"`
- `!(\.git$|node_modules)`: ignore `.git` and `node_modules` (default)
- `.md$`: inspect only MarkDown files
- `.(md|js)$`: inspect only MarkDown and JavaScript files
- `!(\.git$|node_modules|png$|jpg$|gif$)`: ignore default and imagesEscape the bang if you want to use a regex starting with one. This trade-off has
been made to not force using negative lookahead syntax which is too confusing.### Node
```
git submodule add https://github.com/tomashubelbauer/todo
``````js
import todo from './todo/index.js';for await (const item of todo()) {
console.log(item);
}
```## Development
`npm test` to run tests or `node .` to run the app.
### To-Do
#### Allow ignoring specific lines
This should enable weeding out any false positives we encounter.
#### Warn on unused ignore rules (maybe opt-in)
This should highlight ignore rules which are no longer needed.
#### Reserve the MarkDown checkbox detection only for MarkDown files
At current, it also captures MarkDown fragments in JavaScript which I'm not 100%
sure is what I want.