Lint eslint/interface-name-prefix
See original GitHub issueDescribe 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’.
-
The code for do-not-begin-with-an-i
-
SO
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:
- Created 2 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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?