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
Core rule messages should use our template syntax and avoid concatenation #6977
Comments
Note; Discussion came up in chat about whether we should consider just using ES6 templates instead. At this point I just want to get all the rules into our "current"/"old" style before we consider a huge change like that (which would be breaking unless we supported the current form, anyway). |
I like the idea of doing this task as a prerequisite to #6407 (comment). We can use ES6 template literals everywhere else. |
Working on this. I might just do the ES6 templates everywhere else in On Aug 25, 2016 9:56 PM, "Kai Cataldo" notifications@github.com wrote:
|
Great. I can work on the converting to template literals in other directories besides |
PR up at #6989. |
Just curious, why are we just not going directly to template strings? (sorry if I missed the discussion) |
@gyandeeps At this point, for no real reason besides following our own guidelines for how to write rules. There's also issue #6740-- one benefit I could see from that issue is being able to show possible rule messages (with format placeholder) in CLI docs. That said, if there is a way to take a template string and render it as a string without interpolation, I wouldn't be opposed to using that format. I'm not super familiar with template strings, so maybe there is a way. |
I prefer #6740 than ES templates because it's easier to support i18n 😇 |
Goal is to make sure all rule messages that need runtime data use the
{{ variable }}
format and thedata:
key, rather than string concatenation or ES6 template literals.The text was updated successfully, but these errors were encountered: