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

[naming-convention] put identifiers in quotes in error messages #2178

Closed
kaiyoma opened this issue Jun 5, 2020 · 3 comments · Fixed by #2182
Closed

[naming-convention] put identifiers in quotes in error messages #2178

kaiyoma opened this issue Jun 5, 2020 · 3 comments · Fixed by #2182
Labels
enhancement New feature or request good first issue Good for newcomers package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@kaiyoma
Copy link

kaiyoma commented Jun 5, 2020

Here's an example of an error message I'm getting from eslint:

16:11  error  Property name AccessLeaf: HQ_IDF1 must match one of the following formats: camelCase, PascalCase, UPPER_CASE  @typescript-eslint/naming-convention

It would be clearer if AccessLeaf: HQ_IDF1 (the offending property name here) was in quotes, because otherwise it looks like two separate tokens in the sentence.

Suggested:

16:11  error  Property name "AccessLeaf: HQ_IDF1" must match one of the following formats: camelCase, PascalCase, UPPER_CASE  @typescript-eslint/naming-convention
@kaiyoma kaiyoma added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Jun 5, 2020
@bradzacher
Copy link
Member

happy to accept a PR, shouldn't be too difficult to do.

@bradzacher bradzacher added enhancement New feature or request good first issue Good for newcomers and removed triage Waiting for maintainers to take a look labels Jun 5, 2020
@segeda
Copy link
Contributor

segeda commented Jun 6, 2020

@bradzacher bradzacher changed the title Suggestion: put identifiers in quotes in error messages [naming-convention] put identifiers in quotes in error messages Jun 6, 2020
@bradzacher
Copy link
Member

I would usually prefer backticks (`) because in tools like vscode, the block for the error message is formatted with markdown, so it highlights the strict a bit nicer.

Note - this issue is specifically about the naming-convention rule.

bradzacher pushed a commit that referenced this issue Jun 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants