question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lint eslint/interface-name-prefix

See original GitHub issue

Describe the bug:

On the command line npm run lint causes some errors.

The first error is

Interface name must be prefixed with “I” @typescript-eslint/interface-name-prefix

Researching further results in finding that the current recommendation by the Typescipt team is to change the rule so that the interface names do NOT begin with ‘I’.

Looking into .eslintrc.json to see the rule for discussion.

"@typescript-eslint/interface-name-prefix": [
      2,
      { "prefixWithI": "always" }
    ]

We either need to fix the rule or fix the code 😃

Tell us about your browser and operating system:

  • Browser(s) name and version: terminal
  • Operating System: 5.3.7-301.fc31.x86_64 GNU/Linux

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
NorthDecodercommented, Apr 2, 2021

My understanding is that they left the option available for those who want it one way or the other. As you saw there was a long discussion by both sides of the opinion and that was the compromise.

I will change the setting to ‘no I’ to match the current status of the Chapter code.

0reactions
NorthDecodercommented, Apr 3, 2021

@timmyichen , in the blame for the file it looks like you edited this rule. Do you have a strong preference for the ‘I’ before the interface names? But maybe it was Fran Z. that added it? Do you know Fran’s preference?

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint-plugin-typescript/interface-name-prefix.md at master
This rule enforces consistency of interface naming prefix conventions. Options. This rule has a string option. "never" (default) disallows all interfaces being ...
Read more >
Eslint error when adding rule @typescript-eslint/interface ...
The rule @typescript-eslint/interface-name-prefix has been removed as you can see here. You can achieve the same effect of [ "error", ...
Read more >
naming-convention | typescript-eslint
Enforcing naming conventions helps keep the codebase consistent, and reduces overhead when thinking about how to name a variable.
Read more >
interface-name - Rule
"always-prefix" requires interface names to start with an “I”; "never-prefix" requires interface names to not have an “I” prefix ...
Read more >
tslint-to-eslint-config/community - Gitter
Hey mate, just got a question, how I can enforce semicolons after every curly brace statement? I followed the official documentation and noticed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found