Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support case insensitive purposes #31

Open
jesstelford opened this issue Sep 16, 2020 · 0 comments
Open

Support case insensitive purposes #31

jesstelford opened this issue Sep 16, 2020 · 0 comments

Comments

@jesstelford
Copy link
Contributor

jesstelford commented Sep 16, 2020

Problem Description

Currently, purposes must have a particular case to be detected / valid, which differs depending on the source:

@markings/source-comments

Requires purposes to be in uppercase to be detected. Anything else will be silently ignored.

Works:

// TODO: Do a thing

Silently ignored:

// todo: Do a thing
// Todo: Do a thing

@markings/source-react

Requires purposes to be in lowercase, else will throw an error.

Works:

<Marking purpose="todo" description="Do a thing" />

Throws an error:

<Marking purpose="Todo" description="Do a thing" />
<Marking purpose="TODO" description="Do a thing" />
Error: Purpose must be one of question, todo, fixme

Proposal

To reduce user errors and confusion (when comment sources are silently ignored), I propose:

  1. Make all purposes case insensitive:
    // Todo: Do a thing
    <Marking purpose="TODO" description="Do a thing" />
  2. Normalise the output of all purposes to lowercase (so TODO becomes todo, and Fixme becomes fixme, etc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant