Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat(eslint-plugin): addallowedPrefixes prop tointerface-name-prefix#1433
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat(eslint-plugin): addallowedPrefixes prop tointerface-name-prefix#1433
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@G-Rath! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day. |
codecovbot commentedJan 12, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #1433 +/- ##==========================================+ Coverage 94.48% 94.55% +0.06%========================================== Files 142 142 Lines 6077 6076 -1 Branches 1726 1726 ==========================================+ Hits 5742 5745 +3+ Misses 182 180 -2+ Partials 153 151 -2
|
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
allowedNames prop tointerface-name-prefixallowedPrefixes prop tointerface-name-prefixarmano2 commentedJan 12, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@G-Rath you don't have force push commits as we always squash changes before merging (all other merge methods are disabled in this repo) (this helps with tracking what review comments was addressed in commit) |
G-Rath commentedJan 12, 2020
@armano2 cheers for the reminder - I've been bouncing between a bunch of OSS repos, so my brains been autopiloting a bit 😂 Thanks btw for the very good example of PM vs AM - I completely didn't think of it. |
bradzacher commentedJan 12, 2020
Thanks for submitting this, but this rule is about to be deprecated. |
armano2 commentedJan 12, 2020
@bradzacher we do not know when#1318 will be ready, and this one can be good enough as temp fix while ppl are waiting. |
bradzacher commentedJan 12, 2020
#1318 is ready, I just need to fix up the recommended config tests/generator so that it doesn't remove deprecated rules. |
bradzacher commentedJan 16, 2020
|
G-Rath commentedJan 19, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@bradzacher hate to bother you with this, but would you be able to help me form a regex using The example you provided in the original PR works perfectly as a replacement for But I can't come up with a regex that doesn't match IAM but still matches other (I'm having trouble in general figuring out how to make exclusions work, such as to allow |
bradzacher commentedJan 21, 2020
For reference; the You could go with a more complex regex to support multiple cases. This will work if your node version supports negative look-behinds. Make sure |
G-Rath commentedJan 21, 2020
Which is why I made this PR :)
Amazing thanks! I had a feeling negative look-behinds would be the case - playing around with that regexp, to me it seems like that might actually be the The Right One for that rule? (not that it matters since it's deprecated) - I can't think of a combo that generates a false positive. Might be worth sticking somewhere - maybe a block under the deprecation notice for Regardless, thanks again 😄 |

I hit this when working on my Terraform generator/parser/importer, where I have interfaces called
IAM.I've added
IAMas the default value, but can remove that - it's the only real exception I could think of that made sense, but there could be more.Also happy to not make it an option and just hardcode it instead 🤷♂